From b468459b1aa1bd2f56b01e268083597bda4ed2f3 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Tue, 28 Jul 2026 15:44:51 +0200 Subject: [PATCH 01/69] chore: add test for admin controller permissions (#30316) --- server/src/controllers/index.spec.ts | 71 ++++++++++++++++++++++++++++ server/src/middleware/auth.guard.ts | 19 ++++---- 2 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 server/src/controllers/index.spec.ts diff --git a/server/src/controllers/index.spec.ts b/server/src/controllers/index.spec.ts new file mode 100644 index 0000000000..67962e8b3c --- /dev/null +++ b/server/src/controllers/index.spec.ts @@ -0,0 +1,71 @@ +import { RequestMethod } from '@nestjs/common'; +import { METHOD_METADATA, PATH_METADATA } from '@nestjs/common/constants'; +import { Reflector } from '@nestjs/core'; +import { controllers } from 'src/controllers'; +import { AuthenticatedOptions, getAuthenticatedOptions } from 'src/middleware/auth.guard'; + +const UNAUTHENTICATED_ADMIN_ROUTES = new Set([ + 'GET admin/maintenance/status', + 'POST admin/maintenance/login', + 'POST admin/database-backups/start-restore', +]); + +const isAdminPermission = (permission: AuthenticatedOptions['permission']) => + typeof permission === 'string' && permission.startsWith('admin'); + +const getRoutes = () => { + const reflector = new Reflector(); + + return controllers.flatMap((Controller) => { + const prefix = reflector.get(PATH_METADATA, Controller); + + return Object.getOwnPropertyNames(Controller.prototype).flatMap((name) => { + const handler = Object.getOwnPropertyDescriptor(Controller.prototype, name)?.value; + if (typeof handler !== 'function') { + return []; + } + + const requestMethod = reflector.get(METHOD_METADATA, handler); + if (requestMethod === undefined) { + return []; + } + + const method = RequestMethod[requestMethod]; + const path = [prefix, reflector.get(PATH_METADATA, handler)].filter((part) => part !== '/').join('/'); + + return { + id: `${method} ${path}`, + label: `${Controller.name}.${name} (${method} /${path})`, + path, + auth: getAuthenticatedOptions(reflector, handler), + }; + }); + }); +}; + +describe('controllers', () => { + const routes = getRoutes(); + const adminRoutes = routes.filter((route) => route.path === 'admin' || route.path.startsWith('admin/')); + + it('should only allow non-admin access to bootstrap routes under admin/', () => { + const reachableByNonAdmins = adminRoutes.filter((route) => !route.auth?.admin).map((route) => route.id); + + expect(new Set(reachableByNonAdmins)).toEqual(UNAUTHENTICATED_ADMIN_ROUTES); + }); + + it('should not authenticate the bootstrap routes under admin/', () => { + const authenticated = routes + .filter((route) => UNAUTHENTICATED_ADMIN_ROUTES.has(route.id) && route.auth !== undefined) + .map((route) => route.label); + + expect(authenticated).toEqual([]); + }); + + it('should require admin access for routes with an admin permission', () => { + const offenders = routes + .filter((route) => isAdminPermission(route.auth?.permission) && !route.auth?.admin) + .map((route) => route.label); + + expect(offenders).toEqual([]); + }); +}); diff --git a/server/src/middleware/auth.guard.ts b/server/src/middleware/auth.guard.ts index 4964fefbbc..d9870ec7b9 100644 --- a/server/src/middleware/auth.guard.ts +++ b/server/src/middleware/auth.guard.ts @@ -17,7 +17,15 @@ import { getUserAgentDetails } from 'src/utils/request'; type AdminRoute = { admin?: true }; type SharedLinkRoute = { sharedLink?: true }; -type AuthenticatedOptions = { permission?: Permission | false } & (AdminRoute | SharedLinkRoute); +export type AuthenticatedOptions = { permission?: Permission | false } & (AdminRoute | SharedLinkRoute); + +type ReflectorTarget = Parameters[1]; + +/** Resolves the `@Authenticated()` options of a route handler, with the defaults applied. */ +export const getAuthenticatedOptions = (reflector: Reflector, target: ReflectorTarget) => { + const options = reflector.getAllAndOverride(MetadataKey.AuthRoute, [target]); + return options && { sharedLink: false, admin: false, ...options }; +}; export const Authenticated = (options: AuthenticatedOptions = {}): MethodDecorator => { const decorators: MethodDecorator[] = [ @@ -86,17 +94,12 @@ export class AuthGuard implements CanActivate { } async canActivate(context: ExecutionContext): Promise { - const targets = [context.getHandler()]; - const options = this.reflector.getAllAndOverride(MetadataKey.AuthRoute, targets); + const options = getAuthenticatedOptions(this.reflector, context.getHandler()); if (!options) { return true; } - const { - admin: adminRoute, - sharedLink: sharedLinkRoute, - permission, - } = { sharedLink: false, admin: false, ...options }; + const { admin: adminRoute, sharedLink: sharedLinkRoute, permission } = options; const request = context.switchToHttp().getRequest(); request.user = await this.authService.authenticate({ From 8cb5bf92c2a657b0a985843efc96a8b9bc2c7c29 Mon Sep 17 00:00:00 2001 From: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> Date: Tue, 28 Jul 2026 15:55:17 +0200 Subject: [PATCH 02/69] chore: clarify contributing guidelines (#30330) --- CONTRIBUTING.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d04f89015e..4226a0a5ae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,9 @@ We usually do not assign issues to new contributors, since it happens often that ## Use of generative AI -We ask you not to open PRs generated with an LLM. We find that code generated like this tends to need a large amount of back-and-forth, which is a very inefficient use of our time. If we want LLM-generated code, it's much faster for us to use an LLM ourselves than to go through an intermediary via a pull request. +We ask you not to open PRs generated with an LLM. We find that code generated like this tends to need a large amount of back-and-forth, which is a very inefficient use of our time. Even a one line change can have significant impact. We cannot have any confidence in an LLM, so if it's non-trivial for us to verify it works and you don't show that you fully understand all implications of the change, reviewing the PR is not worth our time. If we want LLM-generated code, it's much faster for us to use an LLM ourselves than to go through an intermediary via a pull request. + +If you use an LLM to translate a PR description or title, that is fine. Please make sure however that you stick to the PR template and that the text is written concisely. ## Feature freezes @@ -38,7 +40,7 @@ All our translations are done through [Weblate](https://hosted.weblate.org/proje ### Datasets -Help us improve our [Immich Datasets](https://datasets.immich.app) by submitting photos and videos taken from a variety of devices, including smartphones, DSLRs, and action cameras, as well as photos with unique features, such as panoramas, burst photos, and photo spheres. These datasets will be publically available for anyone to use, do not submit private/sensitive photos. +Help us improve our [Immich Datasets](https://datasets.immich.app) by submitting photos and videos taken from a variety of devices, including smartphones, DSLRs, and action cameras, as well as photos with unique features, such as panoramas, burst photos, and photo spheres. These datasets will be publicly available for anyone to use, do not submit private/sensitive photos. ### Community support From 1094b69946e4919a573c5924cfafe4019b3d26a3 Mon Sep 17 00:00:00 2001 From: Matthew Momjian <50788000+mmomjian@users.noreply.github.com> Date: Tue, 28 Jul 2026 10:57:21 -0400 Subject: [PATCH 03/69] fix(deployment): matplotlib in rootless deployments (#30328) --- docker/docker-compose.rootless.yml | 2 -- docs/docs/FAQ.mdx | 2 -- machine-learning/Dockerfile | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docker/docker-compose.rootless.yml b/docker/docker-compose.rootless.yml index 287480fe6d..65b13f2b9d 100644 --- a/docker/docker-compose.rootless.yml +++ b/docker/docker-compose.rootless.yml @@ -51,8 +51,6 @@ services: - NET_RAW volumes: - ./ml-model-cache:/cache - - ./ml-dotcache:/.cache - - ./ml-config:/.config env_file: - .env restart: always diff --git a/docs/docs/FAQ.mdx b/docs/docs/FAQ.mdx index 214d692848..869e84e377 100644 --- a/docs/docs/FAQ.mdx +++ b/docs/docs/FAQ.mdx @@ -413,8 +413,6 @@ You can change the user in the container by setting the `user` argument in `dock You may need to add mount points or docker volumes for the following internal container paths: -- `immich-machine-learning:/.config` -- `immich-machine-learning:/.cache` - `redis:/data` The non-root user/group needs read/write access to the volume mounts, including `UPLOAD_LOCATION` and `/cache` for machine-learning. diff --git a/machine-learning/Dockerfile b/machine-learning/Dockerfile index 283d1f24d4..afbd72e99e 100644 --- a/machine-learning/Dockerfile +++ b/machine-learning/Dockerfile @@ -160,6 +160,9 @@ ENV IMMICH_SOURCE_REF=${BUILD_SOURCE_REF} ENV IMMICH_SOURCE_COMMIT=${BUILD_SOURCE_COMMIT} ENV IMMICH_SOURCE_URL=https://github.com/immich-app/immich/commit/${BUILD_SOURCE_COMMIT} +# store matplotlib config in /cache subfolder to enable rootless deployment with a single volume +ENV MPLCONFIGDIR=/cache/matplotlib + ENTRYPOINT ["tini", "--"] CMD ["python", "-m", "immich_ml"] From bcf6e66e26d4a26dc8e08da1423ff4e8a6cd1fd8 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Tue, 28 Jul 2026 13:49:26 -0400 Subject: [PATCH 04/69] chore: remove old makefiles (#30339) --- Makefile | 58 ------------------------------------------------- mobile/makefile | 26 ---------------------- 2 files changed, 84 deletions(-) delete mode 100644 Makefile delete mode 100644 mobile/makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index eb8bad09f3..0000000000 --- a/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -dev: - @printf "This command has been removed. Please use:\n\n mise dev # or mise //:dev from another directory\n\n" >&2 && exit 1 - -dev-down: - @printf "This command has been removed. Please use:\n\n mise dev-down # or mise //:dev-down from another directory\n\n" >&2 && exit 1 - -dev-update: - @printf "This command has been removed. Please use:\n\n mise dev-update # or mise //:dev-update from another directory\n\n" >&2 && exit 1 - -dev-scale: - @printf "This command has been removed. Please use:\n\n mise dev-scale # or mise //:dev-scale from another directory\n\n" >&2 && exit 1 - -dev-docs: - npm --prefix docs run start - -.PHONY: e2e -e2e: - @printf "This command has been removed. Please use:\n\n mise e2e # or mise //:e2e from another directory\n\n" >&2 && exit 1 - -e2e-dev: - @printf "This command has been removed. Please use:\n\n mise e2e-dev # or mise //:e2e-dev from another directory\n\n" >&2 && exit 1 - -e2e-update: - @printf "This command has been removed. Please use:\n\n mise e2e-update # or mise //:e2e-update from another directory\n\n" >&2 && exit 1 - -e2e-down: - @printf "This command has been removed. Please use:\n\n mise e2e-down # or mise //:e2e-down from another directory\n\n" >&2 && exit 1 - -prod: - @printf "This command has been removed. Please use:\n\n mise prod # or mise //:prod from another directory\n\n" >&2 && exit 1 - -prod-down: - @printf "This command has been removed. Please use:\n\n mise prod-down # or mise //:prod-down from another directory\n\n" >&2 && exit 1 - -prod-scale: - @printf "This command has been removed. Please use:\n\n mise prod-scale # or mise //:prod-scale from another directory\n\n" >&2 && exit 1 - -.PHONY: open-api -open-api: - @printf "This command has been removed. Please use:\n\n mise open-api # or mise //:open-api from another directory\n\n" >&2 && exit 1 - -sql: - @printf "This command has been removed. Please use:\n\n mise sql # or mise //:sql from another directory\n\n" >&2 && exit 1 - - -renovate: - LOG_LEVEL=debug pnpm exec renovate --platform=local --repository-cache=reset - -# Include .env file if it exists --include docker/.env - -MODULES = e2e server web cli sdk docs .github - -test-e2e: - @printf "This command has been removed. Please use:\n\n mise //e2e:test # or mise //e2e:test-web for web tests, respectively\n\n" >&2 && exit 1 - -clean: - @printf "This command has been removed. Please use:\n\n mise clean # or mise //:clean from another directory\n\n" >&2 && exit 1 diff --git a/mobile/makefile b/mobile/makefile deleted file mode 100644 index 645316efee..0000000000 --- a/mobile/makefile +++ /dev/null @@ -1,26 +0,0 @@ -.PHONY: build watch create_app_icon create_splash build_release_android pigeon test analyze format migration translation - -build: - @printf "This command has been removed. Please use:\n\n mise codegen # or mise //mobile:codegen:dart from another directory\n\n" >&2 && exit 1 - -pigeon: - @printf "This command has been removed. Please use:\n\n mise pigeon # or mise //mobile:codegen:pigeon from another directory\n\n" >&2 && exit 1 - - -build_release_android: - @printf "This command has been removed. Please use:\n\n mise run build:android # or mise //mobile:build:android from another directory\n\n" >&2 && exit 1 - -migration: - @printf "This command has been removed. Please use:\n\n mise migration # or mise //mobile:drift:migration from another directory\n\n" >&2 && exit 1 - -translation: - @printf "This command has been removed. Please use:\n\n mise translation # or mise //mobile:codegen:translation from another directory\n\n" >&2 && exit 1 - -analyze: - @printf "This command has been removed. Please use:\n\n mise analyze # or mise //mobile:lint from another directory\n\n" >&2 && exit 1 - -format: - @printf "This command has been removed. Please use:\n\n mise format # or mise //mobile:format from another directory\n\n" >&2 && exit 1 - -test: - @printf "This command has been removed. Please use:\n\n mise test # or mise //mobile:test from another directory\n\n" >&2 && exit 1 From 04baedcffbb50edca2bd23eff559750efdd49d31 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Tue, 28 Jul 2026 21:12:10 -0400 Subject: [PATCH 05/69] fix: privacy policy link (#30344) --- docs/docusaurus.config.js | 2 +- docs/src/components/timeline.tsx | 78 --------------------- docs/src/pages/privacy-policy.tsx | 110 ------------------------------ docs/static/_redirects | 1 + docs/tailwind.config.js | 6 -- 5 files changed, 2 insertions(+), 195 deletions(-) delete mode 100644 docs/src/components/timeline.tsx delete mode 100644 docs/src/pages/privacy-policy.tsx diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 734317a302..58a07b901f 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -191,7 +191,7 @@ const config = { }, { label: 'Privacy Policy', - to: '/privacy-policy', + href: 'https://immich.app/privacy-policy', }, ], }, diff --git a/docs/src/components/timeline.tsx b/docs/src/components/timeline.tsx deleted file mode 100644 index 32b15edb59..0000000000 --- a/docs/src/components/timeline.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import useIsBrowser from '@docusaurus/useIsBrowser'; -import { mdiCheckboxBlankCircle, mdiCheckboxMarkedCircle } from '@mdi/js'; -import Icon from '@mdi/react'; -import React from 'react'; - -export type Item = { - icon: string; - iconColor: string; - title: string; - description?: string; - link?: { url: string; text: string }; - done?: false; - getDateLabel: (language: string) => string; -}; - -interface Props { - items: Item[]; -} - -export function Timeline({ items }: Props): JSX.Element { - const isBrowser = useIsBrowser(); - - return ( -
    - {items.map((item, index) => { - const isFirst = index === 0; - const isLast = index === items.length - 1; - const done = item.done ?? true; - const dateLabel = item.getDateLabel(isBrowser ? navigator.language : 'en-US'); - const timelineIcon = done ? mdiCheckboxMarkedCircle : mdiCheckboxBlankCircle; - const cardIcon = item.icon; - - return ( -
  • -
    - {dateLabel} -
    -
    -
    -
    -
    - {} -
    -
    -
    -
    - {cardIcon === 'immich' ? ( - - ) : ( - - )} -

    - {item.title} -

    -
    -

    {item.description}

    -
    -
    - - {item.link && ( - - [{item.link.text}] - - )} - -
    {dateLabel}
    -
    -
    -
  • - ); - })} -
- ); -} diff --git a/docs/src/pages/privacy-policy.tsx b/docs/src/pages/privacy-policy.tsx deleted file mode 100644 index 36ac76945d..0000000000 --- a/docs/src/pages/privacy-policy.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import React from 'react'; -import Layout from '@theme/Layout'; -function HomepageHeader() { - return ( -
-
-
-

Privacy Policy

-

Last updated: July 31st 2024

-

- Welcome to Immich. We are committed to respecting your privacy. This Privacy Policy sets out how we collect, - use, and share information when you use our Immich app. -

-
- - {/* 1. Scope of This Policy */} -
-

1. Scope of This Policy

-

- This Privacy Policy applies to the Immich app ("we", "our", or "us") and covers our collection, use, and - disclosure of your information. This Policy does not cover any third-party websites, services, or - applications that can be accessed through our app, or third-party services you may access through Immich. -

-
- - {/* 2. Information We Collect */} -
-

2. Information We Collect

-
-

- Locally Stored Data: Immich stores all your photos, albums, settings, and locally on your - device. We do not have access to this data, nor do we transmit or store it on any of our servers. -

-
- -
-

- Purchase Information: When you make a purchase within the{' '} - https://buy.immich.app, we collect the following information for tax - calculation purposes: -

-
    -
  • Country of origin
  • -
  • Postal code (if the user is from Canada or the United States)
  • -
-
-
- - {/* 3. Use of Your Information */} -
-

3. Use of Your Information

-

- Tax Calculation: The country of origin and postal code (for users from Canada or the United - States) are collected solely for determining the applicable tax rates on your purchase. -

-
- - {/* 4. Sharing of Your Information */} -
-

4. Sharing of Your Information

-
    -
  • - Tax Authorities: The purchase information may be shared with tax authorities as required - by law. -
  • -
  • - Payment Providers: The purchase information may be shared with payment providers where - required. -
  • -
-
- - {/* 5. Changes to This Policy */} -
-

5. Changes to This Policy

-

- We may update our Privacy Policy from time to time. If we make any changes, we will notify you by revising - the "Last updated" date at the top of this policy. It's encouraged that users frequently check this page for - any changes to stay informed about how we are helping to protect the personal information we collect. -

-
- - {/* 6. Contact Us */} -
-

6. Contact Us

-

- If you have any questions about this Privacy Policy, please contact us at{' '} - immich@futo.org -

-
-
-
- ); -} - -export default function Home(): JSX.Element { - return ( - - -
-

This project is available under GNU AGPL v3 license.

-

Privacy should not be a luxury

-
-
- ); -} diff --git a/docs/static/_redirects b/docs/static/_redirects index 218bb71d69..633025ac17 100644 --- a/docs/static/_redirects +++ b/docs/static/_redirects @@ -36,3 +36,4 @@ /overview/welcome /overview/quick-start 307 /docs/* /:splat 307 /features/automatic-backup /features/mobile-backup 307 +/privacy-policy https://immich.app/privacy-policy 307 diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js index 9a654487cc..95a1e4fa1b 100644 --- a/docs/tailwind.config.js +++ b/docs/tailwind.config.js @@ -11,15 +11,9 @@ module.exports = { colors: { // Light Theme 'immich-primary': '#4250af', - 'immich-bg': '#f9f8fb', - 'immich-fg': 'black', - 'immich-gray': '#F6F6F4', // Dark Theme 'immich-dark-primary': '#adcbfa', - 'immich-dark-bg': '#000000', - 'immich-dark-fg': '#e5e7eb', - 'immich-dark-gray': '#111111', }, }, }, From 3ab09352eb2b1a702896438fcf77f23284c09d88 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Wed, 29 Jul 2026 16:17:49 +0200 Subject: [PATCH 06/69] feat: add spam rule to CONTRIBUTING.md genAI section (#30355) --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4226a0a5ae..4f2c9e62a0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,6 +23,8 @@ We ask you not to open PRs generated with an LLM. We find that code generated li If you use an LLM to translate a PR description or title, that is fine. Please make sure however that you stick to the PR template and that the text is written concisely. +Misrepresenting LLM use, contribution farming (automated low-effort PRs), or repeatedly hitting auto-close rules may be grounds for a block at maintainer discretion. + ## Feature freezes From time to time, we put a feature freeze on parts of the codebase. For us, this means we won't accept most PRs that make changes in that area. Exempted from this are simple bug fixes that require only minor changes. We will close feature PRs that target a feature-frozen area, even if that feature is highly requested and you put a lot of work into it. Please keep that in mind, and if you're ever uncertain if a PR would be accepted, reach out to us first (e.g., in the aforementioned `#contributing` channel). We hate to throw away work. Currently, we have feature freezes on: From af5ff4983ac327bf2d9412a256cec6b3ce1ef7d2 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Wed, 29 Jul 2026 17:08:35 +0200 Subject: [PATCH 07/69] chore: skip release label validation on merge queue PRs (#30361) --- .github/workflows/pr-label-validation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-label-validation.yml b/.github/workflows/pr-label-validation.yml index 5820a8b284..abbcfaebd0 100644 --- a/.github/workflows/pr-label-validation.yml +++ b/.github/workflows/pr-label-validation.yml @@ -8,6 +8,7 @@ permissions: {} jobs: validate-release-label: + if: ${{ !startsWith(github.event.pull_request.head.ref, 'mergify/merge-queue/') }} runs-on: ubuntu-latest permissions: issues: write From 534b8746e4953fd3c5547830729173c92550d2ff Mon Sep 17 00:00:00 2001 From: Santo Shakil Date: Wed, 29 Jul 2026 22:50:26 +0600 Subject: [PATCH 08/69] fix(mobile): refresh person thumbnail when the featured photo changes (#29350) --- .../pages/drift_library.page.dart | 6 +++- .../pages/drift_people_collection.page.dart | 4 ++- .../asset_details/people_details.widget.dart | 4 ++- .../repositories/person_api.repository.dart | 1 + mobile/lib/utils/image_url_builder.dart | 5 +-- .../widgets/common/person_sliver_app_bar.dart | 4 ++- .../search/search_filter/people_picker.dart | 4 ++- mobile/test/utils/image_url_builder_test.dart | 35 +++++++++++++++++++ 8 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 mobile/test/utils/image_url_builder_test.dart diff --git a/mobile/lib/presentation/pages/drift_library.page.dart b/mobile/lib/presentation/pages/drift_library.page.dart index 673df089d5..e93a58be7d 100644 --- a/mobile/lib/presentation/pages/drift_library.page.dart +++ b/mobile/lib/presentation/pages/drift_library.page.dart @@ -180,7 +180,11 @@ class _PeopleCollectionCard extends ConsumerWidget { mainAxisSpacing: 8, physics: const NeverScrollableScrollPhysics(), children: people.take(4).map((person) { - return CircleAvatar(backgroundImage: RemoteImageProvider(url: getFaceThumbnailUrl(person.id))); + return CircleAvatar( + backgroundImage: RemoteImageProvider( + url: getFaceThumbnailUrl(person.id, updatedAt: person.updatedAt), + ), + ); }).toList(), ); }, diff --git a/mobile/lib/presentation/pages/drift_people_collection.page.dart b/mobile/lib/presentation/pages/drift_people_collection.page.dart index 26aa2e62ab..0afe723dc6 100644 --- a/mobile/lib/presentation/pages/drift_people_collection.page.dart +++ b/mobile/lib/presentation/pages/drift_people_collection.page.dart @@ -94,7 +94,9 @@ class _DriftPeopleCollectionPageState extends ConsumerState with S elevation: 3, child: CircleAvatar( maxRadius: 84 / 2, - backgroundImage: RemoteImageProvider(url: getFaceThumbnailUrl(widget.person.id)), + backgroundImage: RemoteImageProvider( + url: getFaceThumbnailUrl(widget.person.id, updatedAt: widget.person.updatedAt), + ), ), ), ), diff --git a/mobile/lib/widgets/search/search_filter/people_picker.dart b/mobile/lib/widgets/search/search_filter/people_picker.dart index 24b625e95e..a9382ec3ae 100644 --- a/mobile/lib/widgets/search/search_filter/people_picker.dart +++ b/mobile/lib/widgets/search/search_filter/people_picker.dart @@ -80,7 +80,9 @@ class PeoplePicker extends HookConsumerWidget { child: CircleAvatar( key: ValueKey(person.id), maxRadius: imageSize / 2, - backgroundImage: RemoteImageProvider(url: getFaceThumbnailUrl(person.id)), + backgroundImage: RemoteImageProvider( + url: getFaceThumbnailUrl(person.id, updatedAt: person.updatedAt), + ), ), ), ), diff --git a/mobile/test/utils/image_url_builder_test.dart b/mobile/test/utils/image_url_builder_test.dart new file mode 100644 index 0000000000..1845d38eeb --- /dev/null +++ b/mobile/test/utils/image_url_builder_test.dart @@ -0,0 +1,35 @@ +import 'package:drift/drift.dart'; +import 'package:drift/native.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/store.model.dart'; +import 'package:immich_mobile/domain/services/store.service.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; +import 'package:immich_mobile/utils/image_url_builder.dart'; + +void main() { + const endpoint = 'http://localhost:3000'; + + setUpAll(() async { + final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); + await StoreService.init(storeRepository: DriftStoreRepository(db), listenUpdates: false); + await StoreService.I.put(StoreKey.serverEndpoint, endpoint); + }); + + group('getFaceThumbnailUrl', () { + test('omits the cache buster when updatedAt is null', () { + expect(getFaceThumbnailUrl('person-1'), '$endpoint/people/person-1/thumbnail'); + }); + + test('appends the updatedAt cache buster so a changed featured photo busts the cache (#27434)', () { + final url = getFaceThumbnailUrl('person-1', updatedAt: DateTime.fromMillisecondsSinceEpoch(1717000000000)); + expect(url, '$endpoint/people/person-1/thumbnail?c=1717000000000'); + }); + + test('a newer updatedAt yields a different url so the image cache key changes', () { + final before = getFaceThumbnailUrl('person-1', updatedAt: DateTime.fromMillisecondsSinceEpoch(1)); + final after = getFaceThumbnailUrl('person-1', updatedAt: DateTime.fromMillisecondsSinceEpoch(2)); + expect(before, isNot(after)); + }); + }); +} From 27a29b6fabd6ad1fbe7be68d02eb8918a76e6905 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 29 Jul 2026 13:29:07 -0700 Subject: [PATCH 09/69] chore(mobile): remove Drift generated code (#30297) * chore(mobile): remove Drift generated code * Remove Drift test generated files from tree * Make static_analysis use the shared mobile:codegen action * Remove static_analysis generated file diffing --- .gitattributes | 3 - .github/workflows/build-mobile.yml | 15 +- .github/workflows/static_analysis.yml | 30 +- .github/workflows/test.yml | 4 +- mobile/.gitignore | 2 + .../entities/asset_edit.entity.drift.dart | 743 -- .../entities/asset_face.entity.drift.dart | 1338 --- .../entities/asset_ocr.entity.drift.dart | 1279 -- .../entities/auth_user.entity.drift.dart | 933 -- .../entities/exif.entity.drift.dart | 1881 --- .../entities/local_album.entity.drift.dart | 897 -- .../local_album_asset.entity.drift.dart | 721 -- .../entities/local_asset.entity.drift.dart | 1354 --- .../entities/log.entity.drift.dart | 697 -- .../entities/memory.entity.drift.dart | 1170 -- .../entities/memory_asset.entity.drift.dart | 625 - .../entities/merged_asset.drift.dart | 179 - .../entities/partner.entity.drift.dart | 707 -- .../entities/person.entity.drift.dart | 1053 -- .../entities/remote_album.entity.drift.dart | 949 -- .../remote_album_asset.entity.drift.dart | 654 - .../remote_album_user.entity.drift.dart | 719 -- .../entities/remote_asset.entity.drift.dart | 1776 --- .../remote_asset_cloud_id.entity.drift.dart | 821 -- .../entities/settings.entity.drift.dart | 428 - .../entities/stack.entity.drift.dart | 708 -- .../entities/store.entity.drift.dart | 426 - .../trashed_local_asset.entity.drift.dart | 1241 -- .../entities/user.entity.drift.dart | 655 - .../entities/user_metadata.entity.drift.dart | 613 - .../repositories/db.repository.drift.dart | 418 - .../logger_db.repository.drift.dart | 27 - mobile/mise.toml | 12 +- mobile/test/drift/main/generated/schema.dart | 143 - .../test/drift/main/generated/schema_v1.dart | 5998 --------- .../test/drift/main/generated/schema_v10.dart | 7162 ----------- .../test/drift/main/generated/schema_v11.dart | 7201 ----------- .../test/drift/main/generated/schema_v12.dart | 7201 ----------- .../test/drift/main/generated/schema_v13.dart | 7768 ------------ .../test/drift/main/generated/schema_v14.dart | 7881 ------------ .../test/drift/main/generated/schema_v15.dart | 7916 ------------ .../test/drift/main/generated/schema_v16.dart | 8302 ------------- .../test/drift/main/generated/schema_v17.dart | 8340 ------------- .../test/drift/main/generated/schema_v18.dart | 8345 ------------- .../test/drift/main/generated/schema_v19.dart | 8400 ------------- .../test/drift/main/generated/schema_v2.dart | 5998 --------- .../test/drift/main/generated/schema_v20.dart | 8474 ------------- .../test/drift/main/generated/schema_v21.dart | 8548 ------------- .../test/drift/main/generated/schema_v22.dart | 8849 -------------- .../test/drift/main/generated/schema_v23.dart | 9179 -------------- .../test/drift/main/generated/schema_v24.dart | 9131 -------------- .../test/drift/main/generated/schema_v25.dart | 9345 -------------- .../test/drift/main/generated/schema_v26.dart | 9384 --------------- .../test/drift/main/generated/schema_v27.dart | 9384 --------------- .../test/drift/main/generated/schema_v28.dart | 9389 --------------- .../test/drift/main/generated/schema_v29.dart | 10027 --------------- .../test/drift/main/generated/schema_v3.dart | 5995 --------- .../test/drift/main/generated/schema_v30.dart | 10027 --------------- .../test/drift/main/generated/schema_v31.dart | 10032 ---------------- .../test/drift/main/generated/schema_v4.dart | 6444 ---------- .../test/drift/main/generated/schema_v5.dart | 6405 ---------- .../test/drift/main/generated/schema_v6.dart | 6451 ---------- .../test/drift/main/generated/schema_v7.dart | 6456 ---------- .../test/drift/main/generated/schema_v8.dart | 6666 ---------- .../test/drift/main/generated/schema_v9.dart | 6715 ----------- 65 files changed, 21 insertions(+), 270613 deletions(-) delete mode 100644 mobile/lib/infrastructure/entities/asset_edit.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/asset_face.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/asset_ocr.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/auth_user.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/exif.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/local_album.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/local_album_asset.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/local_asset.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/log.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/memory.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/memory_asset.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/merged_asset.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/partner.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/person.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/remote_album.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/remote_album_asset.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/remote_album_user.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/settings.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/stack.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/store.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/user.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/entities/user_metadata.entity.drift.dart delete mode 100644 mobile/lib/infrastructure/repositories/db.repository.drift.dart delete mode 100644 mobile/lib/infrastructure/repositories/logger_db.repository.drift.dart delete mode 100644 mobile/test/drift/main/generated/schema.dart delete mode 100644 mobile/test/drift/main/generated/schema_v1.dart delete mode 100644 mobile/test/drift/main/generated/schema_v10.dart delete mode 100644 mobile/test/drift/main/generated/schema_v11.dart delete mode 100644 mobile/test/drift/main/generated/schema_v12.dart delete mode 100644 mobile/test/drift/main/generated/schema_v13.dart delete mode 100644 mobile/test/drift/main/generated/schema_v14.dart delete mode 100644 mobile/test/drift/main/generated/schema_v15.dart delete mode 100644 mobile/test/drift/main/generated/schema_v16.dart delete mode 100644 mobile/test/drift/main/generated/schema_v17.dart delete mode 100644 mobile/test/drift/main/generated/schema_v18.dart delete mode 100644 mobile/test/drift/main/generated/schema_v19.dart delete mode 100644 mobile/test/drift/main/generated/schema_v2.dart delete mode 100644 mobile/test/drift/main/generated/schema_v20.dart delete mode 100644 mobile/test/drift/main/generated/schema_v21.dart delete mode 100644 mobile/test/drift/main/generated/schema_v22.dart delete mode 100644 mobile/test/drift/main/generated/schema_v23.dart delete mode 100644 mobile/test/drift/main/generated/schema_v24.dart delete mode 100644 mobile/test/drift/main/generated/schema_v25.dart delete mode 100644 mobile/test/drift/main/generated/schema_v26.dart delete mode 100644 mobile/test/drift/main/generated/schema_v27.dart delete mode 100644 mobile/test/drift/main/generated/schema_v28.dart delete mode 100644 mobile/test/drift/main/generated/schema_v29.dart delete mode 100644 mobile/test/drift/main/generated/schema_v3.dart delete mode 100644 mobile/test/drift/main/generated/schema_v30.dart delete mode 100644 mobile/test/drift/main/generated/schema_v31.dart delete mode 100644 mobile/test/drift/main/generated/schema_v4.dart delete mode 100644 mobile/test/drift/main/generated/schema_v5.dart delete mode 100644 mobile/test/drift/main/generated/schema_v6.dart delete mode 100644 mobile/test/drift/main/generated/schema_v7.dart delete mode 100644 mobile/test/drift/main/generated/schema_v8.dart delete mode 100644 mobile/test/drift/main/generated/schema_v9.dart diff --git a/.gitattributes b/.gitattributes index f1d1336935..935698a983 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,9 +21,6 @@ mobile/drift_schemas/main/drift_schema_*.json linguist-generated=true mobile/lib/infrastructure/repositories/db.repository.steps.dart -diff -merge mobile/lib/infrastructure/repositories/db.repository.steps.dart linguist-generated=true -mobile/test/drift/main/generated/** -diff -merge -mobile/test/drift/main/generated/** linguist-generated=true - packages/sdk/fetch-client.ts -diff -merge packages/sdk/fetch-client.ts linguist-generated=true diff --git a/.github/workflows/build-mobile.yml b/.github/workflows/build-mobile.yml index a197facfc5..d509b404a1 100644 --- a/.github/workflows/build-mobile.yml +++ b/.github/workflows/build-mobile.yml @@ -130,12 +130,8 @@ jobs: - name: Install dependencies run: mise //mobile:install:ci - - name: Generate translation file - run: mise //mobile:codegen:translation - - - name: Generate platform APIs - run: mise //mobile:codegen:pigeon - working-directory: ./mobile + - name: Perform codegen + run: mise //mobile:codegen - name: Build Android App Bundle working-directory: ./mobile @@ -228,11 +224,8 @@ jobs: - name: Install dependencies run: mise //mobile:install:ci - - name: Generate translation files - run: mise //mobile:codegen:translation - - - name: Generate platform APIs - run: mise //mobile:codegen:pigeon + - name: Perform codegen + run: mise //mobile:codegen - name: Resolve iOS Swift Packages working-directory: ./mobile diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 2ca3ac8f71..8fe1e1265c 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -76,34 +76,8 @@ jobs: run: flutter pub get --enforce-lockfile working-directory: ./mobile/packages/ui - - name: Generate translation files - run: mise //mobile:codegen:translation - - - name: Run Build Runner - run: mise //mobile:codegen:dart - - - name: Generate platform API - run: mise //mobile:codegen:pigeon - - - name: Find file changes - uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4 - id: verify-changed-files - with: - files: | - mobile/**/*.g.dart - mobile/**/*.gr.dart - mobile/**/*.drift.dart - mobile/**/*.g.swift - mobile/**/*.g.kt - - - name: Verify files have not changed - if: steps.verify-changed-files.outputs.files_changed == 'true' - env: - CHANGED_FILES: ${{ steps.verify-changed-files.outputs.changed_files }} - run: | - echo "ERROR: Generated files not up to date! Run 'mise //mobile:codegen:dart' and 'mise //mobile:codegen:pigeon'" - echo "Changed files: ${CHANGED_FILES}" - exit 1 + - name: Perform codegen + run: mise //mobile:codegen - name: Run analyze run: mise //mobile:analyze diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 77a6992058..e01d28ed9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -612,8 +612,8 @@ jobs: - name: Install dependencies run: mise //mobile:install:ci - - name: Generate translation files - run: mise //mobile:codegen:translation + - name: Perform codegen + run: mise //mobile:codegen - name: Run tests run: mise //mobile:test diff --git a/mobile/.gitignore b/mobile/.gitignore index 04eb74fddd..64aa4a8dd7 100644 --- a/mobile/.gitignore +++ b/mobile/.gitignore @@ -31,6 +31,8 @@ .pub-cache/ .pub/ /build/ +lib/**/*.drift.dart +test/drift/main/generated/ # Web related lib/generated_plugin_registrant.dart diff --git a/mobile/lib/infrastructure/entities/asset_edit.entity.drift.dart b/mobile/lib/infrastructure/entities/asset_edit.entity.drift.dart deleted file mode 100644 index 32a331b28e..0000000000 --- a/mobile/lib/infrastructure/entities/asset_edit.entity.drift.dart +++ /dev/null @@ -1,743 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/asset_edit.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/asset_edit.model.dart' as i2; -import 'dart:typed_data' as i3; -import 'package:immich_mobile/infrastructure/entities/asset_edit.entity.dart' - as i4; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$AssetEditEntityTableCreateCompanionBuilder = - i1.AssetEditEntityCompanion Function({ - required String id, - required String assetId, - required i2.AssetEditAction action, - required Map parameters, - required int sequence, - }); -typedef $$AssetEditEntityTableUpdateCompanionBuilder = - i1.AssetEditEntityCompanion Function({ - i0.Value id, - i0.Value assetId, - i0.Value action, - i0.Value> parameters, - i0.Value sequence, - }); - -final class $$AssetEditEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AssetEditEntityTable, - i1.AssetEditEntityData - > { - $$AssetEditEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i6.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias('asset_edit_entity__asset_id__remote_asset_entity__id'); - - i5.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i5 - .$$RemoteAssetEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$AssetEditEntityTableFilterComposer - extends i0.Composer { - $$AssetEditEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get action => $composableBuilder( - column: $table.action, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnWithTypeConverterFilters< - Map, - Map, - i3.Uint8List - > - get parameters => $composableBuilder( - column: $table.parameters, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get sequence => $composableBuilder( - column: $table.sequence, - builder: (column) => i0.ColumnFilters(column), - ); - - i5.$$RemoteAssetEntityTableFilterComposer get assetId { - final i5.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetEditEntityTableOrderingComposer - extends i0.Composer { - $$AssetEditEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get action => $composableBuilder( - column: $table.action, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get parameters => $composableBuilder( - column: $table.parameters, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get sequence => $composableBuilder( - column: $table.sequence, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i5.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetEditEntityTableAnnotationComposer - extends i0.Composer { - $$AssetEditEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter get action => - $composableBuilder(column: $table.action, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter, i3.Uint8List> - get parameters => $composableBuilder( - column: $table.parameters, - builder: (column) => column, - ); - - i0.GeneratedColumn get sequence => - $composableBuilder(column: $table.sequence, builder: (column) => column); - - i5.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i5.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetEditEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$AssetEditEntityTable, - i1.AssetEditEntityData, - i1.$$AssetEditEntityTableFilterComposer, - i1.$$AssetEditEntityTableOrderingComposer, - i1.$$AssetEditEntityTableAnnotationComposer, - $$AssetEditEntityTableCreateCompanionBuilder, - $$AssetEditEntityTableUpdateCompanionBuilder, - (i1.AssetEditEntityData, i1.$$AssetEditEntityTableReferences), - i1.AssetEditEntityData, - i0.PrefetchHooks Function({bool assetId}) - > { - $$AssetEditEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$AssetEditEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$AssetEditEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$AssetEditEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$AssetEditEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value assetId = const i0.Value.absent(), - i0.Value action = const i0.Value.absent(), - i0.Value> parameters = - const i0.Value.absent(), - i0.Value sequence = const i0.Value.absent(), - }) => i1.AssetEditEntityCompanion( - id: id, - assetId: assetId, - action: action, - parameters: parameters, - sequence: sequence, - ), - createCompanionCallback: - ({ - required String id, - required String assetId, - required i2.AssetEditAction action, - required Map parameters, - required int sequence, - }) => i1.AssetEditEntityCompanion.insert( - id: id, - assetId: assetId, - action: action, - parameters: parameters, - sequence: sequence, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$AssetEditEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$AssetEditEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$AssetEditEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$AssetEditEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$AssetEditEntityTable, - i1.AssetEditEntityData, - i1.$$AssetEditEntityTableFilterComposer, - i1.$$AssetEditEntityTableOrderingComposer, - i1.$$AssetEditEntityTableAnnotationComposer, - $$AssetEditEntityTableCreateCompanionBuilder, - $$AssetEditEntityTableUpdateCompanionBuilder, - (i1.AssetEditEntityData, i1.$$AssetEditEntityTableReferences), - i1.AssetEditEntityData, - i0.PrefetchHooks Function({bool assetId}) - >; -i0.Index get idxAssetEditAssetId => i0.Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', -); - -class $AssetEditEntityTable extends i4.AssetEditEntity - with i0.TableInfo<$AssetEditEntityTable, i1.AssetEditEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $AssetEditEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - @override - late final i0.GeneratedColumnWithTypeConverter - action = - i0.GeneratedColumn( - 'action', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$AssetEditEntityTable.$converteraction, - ); - @override - late final i0.GeneratedColumnWithTypeConverter< - Map, - i3.Uint8List - > - parameters = - i0.GeneratedColumn( - 'parameters', - aliasedName, - false, - type: i0.DriftSqlType.blob, - requiredDuringInsert: true, - ).withConverter>( - i1.$AssetEditEntityTable.$converterparameters, - ); - static const i0.VerificationMeta _sequenceMeta = const i0.VerificationMeta( - 'sequence', - ); - @override - late final i0.GeneratedColumn sequence = i0.GeneratedColumn( - 'sequence', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('sequence')) { - context.handle( - _sequenceMeta, - sequence.isAcceptableOrUnknown(data['sequence']!, _sequenceMeta), - ); - } else if (isInserting) { - context.missing(_sequenceMeta); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: i1.$AssetEditEntityTable.$converteraction.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - ), - parameters: i1.$AssetEditEntityTable.$converterparameters.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - ), - sequence: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - $AssetEditEntityTable createAlias(String alias) { - return $AssetEditEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converteraction = - const i0.EnumIndexConverter( - i2.AssetEditAction.values, - ); - static i0.JsonTypeConverter2, i3.Uint8List, Object?> - $converterparameters = i4.editParameterConverter; - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetEditEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String assetId; - final i2.AssetEditAction action; - final Map parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['asset_id'] = i0.Variable(assetId); - { - map['action'] = i0.Variable( - i1.$AssetEditEntityTable.$converteraction.toSql(action), - ); - } - { - map['parameters'] = i0.Variable( - i1.$AssetEditEntityTable.$converterparameters.toSql(parameters), - ); - } - map['sequence'] = i0.Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: i1.$AssetEditEntityTable.$converteraction.fromJson( - serializer.fromJson(json['action']), - ), - parameters: i1.$AssetEditEntityTable.$converterparameters.fromJson( - serializer.fromJson(json['parameters']), - ), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson( - i1.$AssetEditEntityTable.$converteraction.toJson(action), - ), - 'parameters': serializer.toJson( - i1.$AssetEditEntityTable.$converterparameters.toJson(parameters), - ), - 'sequence': serializer.toJson(sequence), - }; - } - - i1.AssetEditEntityData copyWith({ - String? id, - String? assetId, - i2.AssetEditAction? action, - Map? parameters, - int? sequence, - }) => i1.AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(i1.AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, assetId, action, parameters, sequence); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - other.parameters == this.parameters && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value assetId; - final i0.Value action; - final i0.Value> parameters; - final i0.Value sequence; - const AssetEditEntityCompanion({ - this.id = const i0.Value.absent(), - this.assetId = const i0.Value.absent(), - this.action = const i0.Value.absent(), - this.parameters = const i0.Value.absent(), - this.sequence = const i0.Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required i2.AssetEditAction action, - required Map parameters, - required int sequence, - }) : id = i0.Value(id), - assetId = i0.Value(assetId), - action = i0.Value(action), - parameters = i0.Value(parameters), - sequence = i0.Value(sequence); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? assetId, - i0.Expression? action, - i0.Expression? parameters, - i0.Expression? sequence, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - i1.AssetEditEntityCompanion copyWith({ - i0.Value? id, - i0.Value? assetId, - i0.Value? action, - i0.Value>? parameters, - i0.Value? sequence, - }) { - return i1.AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (action.present) { - map['action'] = i0.Variable( - i1.$AssetEditEntityTable.$converteraction.toSql(action.value), - ); - } - if (parameters.present) { - map['parameters'] = i0.Variable( - i1.$AssetEditEntityTable.$converterparameters.toSql(parameters.value), - ); - } - if (sequence.present) { - map['sequence'] = i0.Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/asset_face.entity.drift.dart b/mobile/lib/infrastructure/entities/asset_face.entity.drift.dart deleted file mode 100644 index 161e3ca05e..0000000000 --- a/mobile/lib/infrastructure/entities/asset_face.entity.drift.dart +++ /dev/null @@ -1,1338 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/asset_face.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/asset_face.entity.dart' - as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; -import 'package:immich_mobile/infrastructure/entities/person.entity.drift.dart' - as i6; - -typedef $$AssetFaceEntityTableCreateCompanionBuilder = - i1.AssetFaceEntityCompanion Function({ - required String id, - required String assetId, - i0.Value personId, - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - i0.Value isVisible, - i0.Value deletedAt, - }); -typedef $$AssetFaceEntityTableUpdateCompanionBuilder = - i1.AssetFaceEntityCompanion Function({ - i0.Value id, - i0.Value assetId, - i0.Value personId, - i0.Value imageWidth, - i0.Value imageHeight, - i0.Value boundingBoxX1, - i0.Value boundingBoxY1, - i0.Value boundingBoxX2, - i0.Value boundingBoxY2, - i0.Value sourceType, - i0.Value isVisible, - i0.Value deletedAt, - }); - -final class $$AssetFaceEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AssetFaceEntityTable, - i1.AssetFaceEntityData - > { - $$AssetFaceEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i4.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias('asset_face_entity__asset_id__remote_asset_entity__id'); - - i4.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i4 - .$$RemoteAssetEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i6.$PersonEntityTable _personIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('person_entity') - .createAlias('asset_face_entity__person_id__person_entity__id'); - - i6.$$PersonEntityTableProcessedTableManager? get personId { - final $_column = $_itemColumn('person_id'); - if ($_column == null) return null; - final manager = i6 - .$$PersonEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('person_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_personIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$AssetFaceEntityTableFilterComposer - extends i0.Composer { - $$AssetFaceEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get imageWidth => $composableBuilder( - column: $table.imageWidth, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get imageHeight => $composableBuilder( - column: $table.imageHeight, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boundingBoxX1 => $composableBuilder( - column: $table.boundingBoxX1, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boundingBoxY1 => $composableBuilder( - column: $table.boundingBoxY1, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boundingBoxX2 => $composableBuilder( - column: $table.boundingBoxX2, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boundingBoxY2 => $composableBuilder( - column: $table.boundingBoxY2, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get sourceType => $composableBuilder( - column: $table.sourceType, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isVisible => $composableBuilder( - column: $table.isVisible, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$RemoteAssetEntityTableFilterComposer get assetId { - final i4.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$PersonEntityTableFilterComposer get personId { - final i6.$$PersonEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.personId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$PersonEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetFaceEntityTableOrderingComposer - extends i0.Composer { - $$AssetFaceEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get imageWidth => $composableBuilder( - column: $table.imageWidth, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get imageHeight => $composableBuilder( - column: $table.imageHeight, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boundingBoxX1 => $composableBuilder( - column: $table.boundingBoxX1, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boundingBoxY1 => $composableBuilder( - column: $table.boundingBoxY1, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boundingBoxX2 => $composableBuilder( - column: $table.boundingBoxX2, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boundingBoxY2 => $composableBuilder( - column: $table.boundingBoxY2, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get sourceType => $composableBuilder( - column: $table.sourceType, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isVisible => $composableBuilder( - column: $table.isVisible, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i4.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$PersonEntityTableOrderingComposer get personId { - final i6.$$PersonEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.personId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$PersonEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetFaceEntityTableAnnotationComposer - extends i0.Composer { - $$AssetFaceEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get imageWidth => $composableBuilder( - column: $table.imageWidth, - builder: (column) => column, - ); - - i0.GeneratedColumn get imageHeight => $composableBuilder( - column: $table.imageHeight, - builder: (column) => column, - ); - - i0.GeneratedColumn get boundingBoxX1 => $composableBuilder( - column: $table.boundingBoxX1, - builder: (column) => column, - ); - - i0.GeneratedColumn get boundingBoxY1 => $composableBuilder( - column: $table.boundingBoxY1, - builder: (column) => column, - ); - - i0.GeneratedColumn get boundingBoxX2 => $composableBuilder( - column: $table.boundingBoxX2, - builder: (column) => column, - ); - - i0.GeneratedColumn get boundingBoxY2 => $composableBuilder( - column: $table.boundingBoxY2, - builder: (column) => column, - ); - - i0.GeneratedColumn get sourceType => $composableBuilder( - column: $table.sourceType, - builder: (column) => column, - ); - - i0.GeneratedColumn get isVisible => - $composableBuilder(column: $table.isVisible, builder: (column) => column); - - i0.GeneratedColumn get deletedAt => - $composableBuilder(column: $table.deletedAt, builder: (column) => column); - - i4.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i4.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$PersonEntityTableAnnotationComposer get personId { - final i6.$$PersonEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.personId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$PersonEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('person_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetFaceEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$AssetFaceEntityTable, - i1.AssetFaceEntityData, - i1.$$AssetFaceEntityTableFilterComposer, - i1.$$AssetFaceEntityTableOrderingComposer, - i1.$$AssetFaceEntityTableAnnotationComposer, - $$AssetFaceEntityTableCreateCompanionBuilder, - $$AssetFaceEntityTableUpdateCompanionBuilder, - (i1.AssetFaceEntityData, i1.$$AssetFaceEntityTableReferences), - i1.AssetFaceEntityData, - i0.PrefetchHooks Function({bool assetId, bool personId}) - > { - $$AssetFaceEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$AssetFaceEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$AssetFaceEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$AssetFaceEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$AssetFaceEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value assetId = const i0.Value.absent(), - i0.Value personId = const i0.Value.absent(), - i0.Value imageWidth = const i0.Value.absent(), - i0.Value imageHeight = const i0.Value.absent(), - i0.Value boundingBoxX1 = const i0.Value.absent(), - i0.Value boundingBoxY1 = const i0.Value.absent(), - i0.Value boundingBoxX2 = const i0.Value.absent(), - i0.Value boundingBoxY2 = const i0.Value.absent(), - i0.Value sourceType = const i0.Value.absent(), - i0.Value isVisible = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - }) => i1.AssetFaceEntityCompanion( - id: id, - assetId: assetId, - personId: personId, - imageWidth: imageWidth, - imageHeight: imageHeight, - boundingBoxX1: boundingBoxX1, - boundingBoxY1: boundingBoxY1, - boundingBoxX2: boundingBoxX2, - boundingBoxY2: boundingBoxY2, - sourceType: sourceType, - isVisible: isVisible, - deletedAt: deletedAt, - ), - createCompanionCallback: - ({ - required String id, - required String assetId, - i0.Value personId = const i0.Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - i0.Value isVisible = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - }) => i1.AssetFaceEntityCompanion.insert( - id: id, - assetId: assetId, - personId: personId, - imageWidth: imageWidth, - imageHeight: imageHeight, - boundingBoxX1: boundingBoxX1, - boundingBoxY1: boundingBoxY1, - boundingBoxX2: boundingBoxX2, - boundingBoxY2: boundingBoxY2, - sourceType: sourceType, - isVisible: isVisible, - deletedAt: deletedAt, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$AssetFaceEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false, personId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$AssetFaceEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$AssetFaceEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - if (personId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.personId, - referencedTable: i1 - .$$AssetFaceEntityTableReferences - ._personIdTable(db), - referencedColumn: i1 - .$$AssetFaceEntityTableReferences - ._personIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$AssetFaceEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$AssetFaceEntityTable, - i1.AssetFaceEntityData, - i1.$$AssetFaceEntityTableFilterComposer, - i1.$$AssetFaceEntityTableOrderingComposer, - i1.$$AssetFaceEntityTableAnnotationComposer, - $$AssetFaceEntityTableCreateCompanionBuilder, - $$AssetFaceEntityTableUpdateCompanionBuilder, - (i1.AssetFaceEntityData, i1.$$AssetFaceEntityTableReferences), - i1.AssetFaceEntityData, - i0.PrefetchHooks Function({bool assetId, bool personId}) - >; -i0.Index get idxAssetFacePersonId => i0.Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', -); - -class $AssetFaceEntityTable extends i2.AssetFaceEntity - with i0.TableInfo<$AssetFaceEntityTable, i1.AssetFaceEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $AssetFaceEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _personIdMeta = const i0.VerificationMeta( - 'personId', - ); - @override - late final i0.GeneratedColumn personId = i0.GeneratedColumn( - 'person_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - static const i0.VerificationMeta _imageWidthMeta = const i0.VerificationMeta( - 'imageWidth', - ); - @override - late final i0.GeneratedColumn imageWidth = i0.GeneratedColumn( - 'image_width', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _imageHeightMeta = const i0.VerificationMeta( - 'imageHeight', - ); - @override - late final i0.GeneratedColumn imageHeight = i0.GeneratedColumn( - 'image_height', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boundingBoxX1Meta = - const i0.VerificationMeta('boundingBoxX1'); - @override - late final i0.GeneratedColumn boundingBoxX1 = i0.GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boundingBoxY1Meta = - const i0.VerificationMeta('boundingBoxY1'); - @override - late final i0.GeneratedColumn boundingBoxY1 = i0.GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boundingBoxX2Meta = - const i0.VerificationMeta('boundingBoxX2'); - @override - late final i0.GeneratedColumn boundingBoxX2 = i0.GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boundingBoxY2Meta = - const i0.VerificationMeta('boundingBoxY2'); - @override - late final i0.GeneratedColumn boundingBoxY2 = i0.GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _sourceTypeMeta = const i0.VerificationMeta( - 'sourceType', - ); - @override - late final i0.GeneratedColumn sourceType = i0.GeneratedColumn( - 'source_type', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _isVisibleMeta = const i0.VerificationMeta( - 'isVisible', - ); - @override - late final i0.GeneratedColumn isVisible = i0.GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const i3.Constant(true), - ); - static const i0.VerificationMeta _deletedAtMeta = const i0.VerificationMeta( - 'deletedAt', - ); - @override - late final i0.GeneratedColumn deletedAt = - i0.GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('person_id')) { - context.handle( - _personIdMeta, - personId.isAcceptableOrUnknown(data['person_id']!, _personIdMeta), - ); - } - if (data.containsKey('image_width')) { - context.handle( - _imageWidthMeta, - imageWidth.isAcceptableOrUnknown(data['image_width']!, _imageWidthMeta), - ); - } else if (isInserting) { - context.missing(_imageWidthMeta); - } - if (data.containsKey('image_height')) { - context.handle( - _imageHeightMeta, - imageHeight.isAcceptableOrUnknown( - data['image_height']!, - _imageHeightMeta, - ), - ); - } else if (isInserting) { - context.missing(_imageHeightMeta); - } - if (data.containsKey('bounding_box_x1')) { - context.handle( - _boundingBoxX1Meta, - boundingBoxX1.isAcceptableOrUnknown( - data['bounding_box_x1']!, - _boundingBoxX1Meta, - ), - ); - } else if (isInserting) { - context.missing(_boundingBoxX1Meta); - } - if (data.containsKey('bounding_box_y1')) { - context.handle( - _boundingBoxY1Meta, - boundingBoxY1.isAcceptableOrUnknown( - data['bounding_box_y1']!, - _boundingBoxY1Meta, - ), - ); - } else if (isInserting) { - context.missing(_boundingBoxY1Meta); - } - if (data.containsKey('bounding_box_x2')) { - context.handle( - _boundingBoxX2Meta, - boundingBoxX2.isAcceptableOrUnknown( - data['bounding_box_x2']!, - _boundingBoxX2Meta, - ), - ); - } else if (isInserting) { - context.missing(_boundingBoxX2Meta); - } - if (data.containsKey('bounding_box_y2')) { - context.handle( - _boundingBoxY2Meta, - boundingBoxY2.isAcceptableOrUnknown( - data['bounding_box_y2']!, - _boundingBoxY2Meta, - ), - ); - } else if (isInserting) { - context.missing(_boundingBoxY2Meta); - } - if (data.containsKey('source_type')) { - context.handle( - _sourceTypeMeta, - sourceType.isAcceptableOrUnknown(data['source_type']!, _sourceTypeMeta), - ); - } else if (isInserting) { - context.missing(_sourceTypeMeta); - } - if (data.containsKey('is_visible')) { - context.handle( - _isVisibleMeta, - isVisible.isAcceptableOrUnknown(data['is_visible']!, _isVisibleMeta), - ); - } - if (data.containsKey('deleted_at')) { - context.handle( - _deletedAtMeta, - deletedAt.isAcceptableOrUnknown(data['deleted_at']!, _deletedAtMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - $AssetFaceEntityTable createAlias(String alias) { - return $AssetFaceEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final bool isVisible; - final DateTime? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['asset_id'] = i0.Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = i0.Variable(personId); - } - map['image_width'] = i0.Variable(imageWidth); - map['image_height'] = i0.Variable(imageHeight); - map['bounding_box_x1'] = i0.Variable(boundingBoxX1); - map['bounding_box_y1'] = i0.Variable(boundingBoxY1); - map['bounding_box_x2'] = i0.Variable(boundingBoxX2); - map['bounding_box_y2'] = i0.Variable(boundingBoxY2); - map['source_type'] = i0.Variable(sourceType); - map['is_visible'] = i0.Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = i0.Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - i1.AssetFaceEntityData copyWith({ - String? id, - String? assetId, - i0.Value personId = const i0.Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - bool? isVisible, - i0.Value deletedAt = const i0.Value.absent(), - }) => i1.AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(i1.AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value assetId; - final i0.Value personId; - final i0.Value imageWidth; - final i0.Value imageHeight; - final i0.Value boundingBoxX1; - final i0.Value boundingBoxY1; - final i0.Value boundingBoxX2; - final i0.Value boundingBoxY2; - final i0.Value sourceType; - final i0.Value isVisible; - final i0.Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const i0.Value.absent(), - this.assetId = const i0.Value.absent(), - this.personId = const i0.Value.absent(), - this.imageWidth = const i0.Value.absent(), - this.imageHeight = const i0.Value.absent(), - this.boundingBoxX1 = const i0.Value.absent(), - this.boundingBoxY1 = const i0.Value.absent(), - this.boundingBoxX2 = const i0.Value.absent(), - this.boundingBoxY2 = const i0.Value.absent(), - this.sourceType = const i0.Value.absent(), - this.isVisible = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const i0.Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - }) : id = i0.Value(id), - assetId = i0.Value(assetId), - imageWidth = i0.Value(imageWidth), - imageHeight = i0.Value(imageHeight), - boundingBoxX1 = i0.Value(boundingBoxX1), - boundingBoxY1 = i0.Value(boundingBoxY1), - boundingBoxX2 = i0.Value(boundingBoxX2), - boundingBoxY2 = i0.Value(boundingBoxY2), - sourceType = i0.Value(sourceType); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? assetId, - i0.Expression? personId, - i0.Expression? imageWidth, - i0.Expression? imageHeight, - i0.Expression? boundingBoxX1, - i0.Expression? boundingBoxY1, - i0.Expression? boundingBoxX2, - i0.Expression? boundingBoxY2, - i0.Expression? sourceType, - i0.Expression? isVisible, - i0.Expression? deletedAt, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - i1.AssetFaceEntityCompanion copyWith({ - i0.Value? id, - i0.Value? assetId, - i0.Value? personId, - i0.Value? imageWidth, - i0.Value? imageHeight, - i0.Value? boundingBoxX1, - i0.Value? boundingBoxY1, - i0.Value? boundingBoxX2, - i0.Value? boundingBoxY2, - i0.Value? sourceType, - i0.Value? isVisible, - i0.Value? deletedAt, - }) { - return i1.AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = i0.Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = i0.Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = i0.Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = i0.Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = i0.Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = i0.Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = i0.Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = i0.Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = i0.Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = i0.Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -i0.Index get idxAssetFaceAssetId => i0.Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', -); -i0.Index get idxAssetFaceVisiblePerson => i0.Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', -); diff --git a/mobile/lib/infrastructure/entities/asset_ocr.entity.drift.dart b/mobile/lib/infrastructure/entities/asset_ocr.entity.drift.dart deleted file mode 100644 index 21f743296f..0000000000 --- a/mobile/lib/infrastructure/entities/asset_ocr.entity.drift.dart +++ /dev/null @@ -1,1279 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/asset_ocr.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/asset_ocr.entity.dart' - as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; - -typedef $$AssetOcrEntityTableCreateCompanionBuilder = - i1.AssetOcrEntityCompanion Function({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - i0.Value isVisible, - }); -typedef $$AssetOcrEntityTableUpdateCompanionBuilder = - i1.AssetOcrEntityCompanion Function({ - i0.Value id, - i0.Value assetId, - i0.Value x1, - i0.Value y1, - i0.Value x2, - i0.Value y2, - i0.Value x3, - i0.Value y3, - i0.Value x4, - i0.Value y4, - i0.Value boxScore, - i0.Value textScore, - i0.Value recognizedText, - i0.Value isVisible, - }); - -final class $$AssetOcrEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AssetOcrEntityTable, - i1.AssetOcrEntityData - > { - $$AssetOcrEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i4.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias('asset_ocr_entity__asset_id__remote_asset_entity__id'); - - i4.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i4 - .$$RemoteAssetEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$AssetOcrEntityTableFilterComposer - extends i0.Composer { - $$AssetOcrEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get x1 => $composableBuilder( - column: $table.x1, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get y1 => $composableBuilder( - column: $table.y1, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get x2 => $composableBuilder( - column: $table.x2, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get y2 => $composableBuilder( - column: $table.y2, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get x3 => $composableBuilder( - column: $table.x3, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get y3 => $composableBuilder( - column: $table.y3, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get x4 => $composableBuilder( - column: $table.x4, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get y4 => $composableBuilder( - column: $table.y4, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get boxScore => $composableBuilder( - column: $table.boxScore, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get textScore => $composableBuilder( - column: $table.textScore, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get recognizedText => $composableBuilder( - column: $table.recognizedText, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isVisible => $composableBuilder( - column: $table.isVisible, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$RemoteAssetEntityTableFilterComposer get assetId { - final i4.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetOcrEntityTableOrderingComposer - extends i0.Composer { - $$AssetOcrEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get x1 => $composableBuilder( - column: $table.x1, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get y1 => $composableBuilder( - column: $table.y1, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get x2 => $composableBuilder( - column: $table.x2, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get y2 => $composableBuilder( - column: $table.y2, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get x3 => $composableBuilder( - column: $table.x3, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get y3 => $composableBuilder( - column: $table.y3, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get x4 => $composableBuilder( - column: $table.x4, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get y4 => $composableBuilder( - column: $table.y4, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get boxScore => $composableBuilder( - column: $table.boxScore, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get textScore => $composableBuilder( - column: $table.textScore, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get recognizedText => $composableBuilder( - column: $table.recognizedText, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isVisible => $composableBuilder( - column: $table.isVisible, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i4.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetOcrEntityTableAnnotationComposer - extends i0.Composer { - $$AssetOcrEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get x1 => - $composableBuilder(column: $table.x1, builder: (column) => column); - - i0.GeneratedColumn get y1 => - $composableBuilder(column: $table.y1, builder: (column) => column); - - i0.GeneratedColumn get x2 => - $composableBuilder(column: $table.x2, builder: (column) => column); - - i0.GeneratedColumn get y2 => - $composableBuilder(column: $table.y2, builder: (column) => column); - - i0.GeneratedColumn get x3 => - $composableBuilder(column: $table.x3, builder: (column) => column); - - i0.GeneratedColumn get y3 => - $composableBuilder(column: $table.y3, builder: (column) => column); - - i0.GeneratedColumn get x4 => - $composableBuilder(column: $table.x4, builder: (column) => column); - - i0.GeneratedColumn get y4 => - $composableBuilder(column: $table.y4, builder: (column) => column); - - i0.GeneratedColumn get boxScore => - $composableBuilder(column: $table.boxScore, builder: (column) => column); - - i0.GeneratedColumn get textScore => - $composableBuilder(column: $table.textScore, builder: (column) => column); - - i0.GeneratedColumn get recognizedText => $composableBuilder( - column: $table.recognizedText, - builder: (column) => column, - ); - - i0.GeneratedColumn get isVisible => - $composableBuilder(column: $table.isVisible, builder: (column) => column); - - i4.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i4.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$AssetOcrEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$AssetOcrEntityTable, - i1.AssetOcrEntityData, - i1.$$AssetOcrEntityTableFilterComposer, - i1.$$AssetOcrEntityTableOrderingComposer, - i1.$$AssetOcrEntityTableAnnotationComposer, - $$AssetOcrEntityTableCreateCompanionBuilder, - $$AssetOcrEntityTableUpdateCompanionBuilder, - (i1.AssetOcrEntityData, i1.$$AssetOcrEntityTableReferences), - i1.AssetOcrEntityData, - i0.PrefetchHooks Function({bool assetId}) - > { - $$AssetOcrEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$AssetOcrEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$AssetOcrEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$AssetOcrEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$AssetOcrEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value assetId = const i0.Value.absent(), - i0.Value x1 = const i0.Value.absent(), - i0.Value y1 = const i0.Value.absent(), - i0.Value x2 = const i0.Value.absent(), - i0.Value y2 = const i0.Value.absent(), - i0.Value x3 = const i0.Value.absent(), - i0.Value y3 = const i0.Value.absent(), - i0.Value x4 = const i0.Value.absent(), - i0.Value y4 = const i0.Value.absent(), - i0.Value boxScore = const i0.Value.absent(), - i0.Value textScore = const i0.Value.absent(), - i0.Value recognizedText = const i0.Value.absent(), - i0.Value isVisible = const i0.Value.absent(), - }) => i1.AssetOcrEntityCompanion( - id: id, - assetId: assetId, - x1: x1, - y1: y1, - x2: x2, - y2: y2, - x3: x3, - y3: y3, - x4: x4, - y4: y4, - boxScore: boxScore, - textScore: textScore, - recognizedText: recognizedText, - isVisible: isVisible, - ), - createCompanionCallback: - ({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - i0.Value isVisible = const i0.Value.absent(), - }) => i1.AssetOcrEntityCompanion.insert( - id: id, - assetId: assetId, - x1: x1, - y1: y1, - x2: x2, - y2: y2, - x3: x3, - y3: y3, - x4: x4, - y4: y4, - boxScore: boxScore, - textScore: textScore, - recognizedText: recognizedText, - isVisible: isVisible, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$AssetOcrEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$AssetOcrEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$AssetOcrEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$AssetOcrEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$AssetOcrEntityTable, - i1.AssetOcrEntityData, - i1.$$AssetOcrEntityTableFilterComposer, - i1.$$AssetOcrEntityTableOrderingComposer, - i1.$$AssetOcrEntityTableAnnotationComposer, - $$AssetOcrEntityTableCreateCompanionBuilder, - $$AssetOcrEntityTableUpdateCompanionBuilder, - (i1.AssetOcrEntityData, i1.$$AssetOcrEntityTableReferences), - i1.AssetOcrEntityData, - i0.PrefetchHooks Function({bool assetId}) - >; -i0.Index get idxAssetOcrAssetId => i0.Index( - 'idx_asset_ocr_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)', -); - -class $AssetOcrEntityTable extends i2.AssetOcrEntity - with i0.TableInfo<$AssetOcrEntityTable, i1.AssetOcrEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $AssetOcrEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _x1Meta = const i0.VerificationMeta('x1'); - @override - late final i0.GeneratedColumn x1 = i0.GeneratedColumn( - 'x1', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _y1Meta = const i0.VerificationMeta('y1'); - @override - late final i0.GeneratedColumn y1 = i0.GeneratedColumn( - 'y1', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _x2Meta = const i0.VerificationMeta('x2'); - @override - late final i0.GeneratedColumn x2 = i0.GeneratedColumn( - 'x2', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _y2Meta = const i0.VerificationMeta('y2'); - @override - late final i0.GeneratedColumn y2 = i0.GeneratedColumn( - 'y2', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _x3Meta = const i0.VerificationMeta('x3'); - @override - late final i0.GeneratedColumn x3 = i0.GeneratedColumn( - 'x3', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _y3Meta = const i0.VerificationMeta('y3'); - @override - late final i0.GeneratedColumn y3 = i0.GeneratedColumn( - 'y3', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _x4Meta = const i0.VerificationMeta('x4'); - @override - late final i0.GeneratedColumn x4 = i0.GeneratedColumn( - 'x4', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _y4Meta = const i0.VerificationMeta('y4'); - @override - late final i0.GeneratedColumn y4 = i0.GeneratedColumn( - 'y4', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _boxScoreMeta = const i0.VerificationMeta( - 'boxScore', - ); - @override - late final i0.GeneratedColumn boxScore = i0.GeneratedColumn( - 'box_score', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _textScoreMeta = const i0.VerificationMeta( - 'textScore', - ); - @override - late final i0.GeneratedColumn textScore = i0.GeneratedColumn( - 'text_score', - aliasedName, - false, - type: i0.DriftSqlType.double, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _recognizedTextMeta = - const i0.VerificationMeta('recognizedText'); - @override - late final i0.GeneratedColumn recognizedText = - i0.GeneratedColumn( - 'recognized_text', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _isVisibleMeta = const i0.VerificationMeta( - 'isVisible', - ); - @override - late final i0.GeneratedColumn isVisible = i0.GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const i3.Constant(true), - ); - @override - List get $columns => [ - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_ocr_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('x1')) { - context.handle(_x1Meta, x1.isAcceptableOrUnknown(data['x1']!, _x1Meta)); - } else if (isInserting) { - context.missing(_x1Meta); - } - if (data.containsKey('y1')) { - context.handle(_y1Meta, y1.isAcceptableOrUnknown(data['y1']!, _y1Meta)); - } else if (isInserting) { - context.missing(_y1Meta); - } - if (data.containsKey('x2')) { - context.handle(_x2Meta, x2.isAcceptableOrUnknown(data['x2']!, _x2Meta)); - } else if (isInserting) { - context.missing(_x2Meta); - } - if (data.containsKey('y2')) { - context.handle(_y2Meta, y2.isAcceptableOrUnknown(data['y2']!, _y2Meta)); - } else if (isInserting) { - context.missing(_y2Meta); - } - if (data.containsKey('x3')) { - context.handle(_x3Meta, x3.isAcceptableOrUnknown(data['x3']!, _x3Meta)); - } else if (isInserting) { - context.missing(_x3Meta); - } - if (data.containsKey('y3')) { - context.handle(_y3Meta, y3.isAcceptableOrUnknown(data['y3']!, _y3Meta)); - } else if (isInserting) { - context.missing(_y3Meta); - } - if (data.containsKey('x4')) { - context.handle(_x4Meta, x4.isAcceptableOrUnknown(data['x4']!, _x4Meta)); - } else if (isInserting) { - context.missing(_x4Meta); - } - if (data.containsKey('y4')) { - context.handle(_y4Meta, y4.isAcceptableOrUnknown(data['y4']!, _y4Meta)); - } else if (isInserting) { - context.missing(_y4Meta); - } - if (data.containsKey('box_score')) { - context.handle( - _boxScoreMeta, - boxScore.isAcceptableOrUnknown(data['box_score']!, _boxScoreMeta), - ); - } else if (isInserting) { - context.missing(_boxScoreMeta); - } - if (data.containsKey('text_score')) { - context.handle( - _textScoreMeta, - textScore.isAcceptableOrUnknown(data['text_score']!, _textScoreMeta), - ); - } else if (isInserting) { - context.missing(_textScoreMeta); - } - if (data.containsKey('recognized_text')) { - context.handle( - _recognizedTextMeta, - recognizedText.isAcceptableOrUnknown( - data['recognized_text']!, - _recognizedTextMeta, - ), - ); - } else if (isInserting) { - context.missing(_recognizedTextMeta); - } - if (data.containsKey('is_visible')) { - context.handle( - _isVisibleMeta, - isVisible.isAcceptableOrUnknown(data['is_visible']!, _isVisibleMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.AssetOcrEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.AssetOcrEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - x1: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}x1'], - )!, - y1: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}y1'], - )!, - x2: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}x2'], - )!, - y2: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}y2'], - )!, - x3: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}x3'], - )!, - y3: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}y3'], - )!, - x4: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}x4'], - )!, - y4: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}y4'], - )!, - boxScore: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}box_score'], - )!, - textScore: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}text_score'], - )!, - recognizedText: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}recognized_text'], - )!, - isVisible: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - ); - } - - @override - $AssetOcrEntityTable createAlias(String alias) { - return $AssetOcrEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetOcrEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String assetId; - final double x1; - final double y1; - final double x2; - final double y2; - final double x3; - final double y3; - final double x4; - final double y4; - final double boxScore; - final double textScore; - final String recognizedText; - final bool isVisible; - const AssetOcrEntityData({ - required this.id, - required this.assetId, - required this.x1, - required this.y1, - required this.x2, - required this.y2, - required this.x3, - required this.y3, - required this.x4, - required this.y4, - required this.boxScore, - required this.textScore, - required this.recognizedText, - required this.isVisible, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['asset_id'] = i0.Variable(assetId); - map['x1'] = i0.Variable(x1); - map['y1'] = i0.Variable(y1); - map['x2'] = i0.Variable(x2); - map['y2'] = i0.Variable(y2); - map['x3'] = i0.Variable(x3); - map['y3'] = i0.Variable(y3); - map['x4'] = i0.Variable(x4); - map['y4'] = i0.Variable(y4); - map['box_score'] = i0.Variable(boxScore); - map['text_score'] = i0.Variable(textScore); - map['recognized_text'] = i0.Variable(recognizedText); - map['is_visible'] = i0.Variable(isVisible); - return map; - } - - factory AssetOcrEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return AssetOcrEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - x1: serializer.fromJson(json['x1']), - y1: serializer.fromJson(json['y1']), - x2: serializer.fromJson(json['x2']), - y2: serializer.fromJson(json['y2']), - x3: serializer.fromJson(json['x3']), - y3: serializer.fromJson(json['y3']), - x4: serializer.fromJson(json['x4']), - y4: serializer.fromJson(json['y4']), - boxScore: serializer.fromJson(json['boxScore']), - textScore: serializer.fromJson(json['textScore']), - recognizedText: serializer.fromJson(json['recognizedText']), - isVisible: serializer.fromJson(json['isVisible']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'x1': serializer.toJson(x1), - 'y1': serializer.toJson(y1), - 'x2': serializer.toJson(x2), - 'y2': serializer.toJson(y2), - 'x3': serializer.toJson(x3), - 'y3': serializer.toJson(y3), - 'x4': serializer.toJson(x4), - 'y4': serializer.toJson(y4), - 'boxScore': serializer.toJson(boxScore), - 'textScore': serializer.toJson(textScore), - 'recognizedText': serializer.toJson(recognizedText), - 'isVisible': serializer.toJson(isVisible), - }; - } - - i1.AssetOcrEntityData copyWith({ - String? id, - String? assetId, - double? x1, - double? y1, - double? x2, - double? y2, - double? x3, - double? y3, - double? x4, - double? y4, - double? boxScore, - double? textScore, - String? recognizedText, - bool? isVisible, - }) => i1.AssetOcrEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - AssetOcrEntityData copyWithCompanion(i1.AssetOcrEntityCompanion data) { - return AssetOcrEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - x1: data.x1.present ? data.x1.value : this.x1, - y1: data.y1.present ? data.y1.value : this.y1, - x2: data.x2.present ? data.x2.value : this.x2, - y2: data.y2.present ? data.y2.value : this.y2, - x3: data.x3.present ? data.x3.value : this.x3, - y3: data.y3.present ? data.y3.value : this.y3, - x4: data.x4.present ? data.x4.value : this.x4, - y4: data.y4.present ? data.y4.value : this.y4, - boxScore: data.boxScore.present ? data.boxScore.value : this.boxScore, - textScore: data.textScore.present ? data.textScore.value : this.textScore, - recognizedText: data.recognizedText.present - ? data.recognizedText.value - : this.recognizedText, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - ); - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.AssetOcrEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.x1 == this.x1 && - other.y1 == this.y1 && - other.x2 == this.x2 && - other.y2 == this.y2 && - other.x3 == this.x3 && - other.y3 == this.y3 && - other.x4 == this.x4 && - other.y4 == this.y4 && - other.boxScore == this.boxScore && - other.textScore == this.textScore && - other.recognizedText == this.recognizedText && - other.isVisible == this.isVisible); -} - -class AssetOcrEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value assetId; - final i0.Value x1; - final i0.Value y1; - final i0.Value x2; - final i0.Value y2; - final i0.Value x3; - final i0.Value y3; - final i0.Value x4; - final i0.Value y4; - final i0.Value boxScore; - final i0.Value textScore; - final i0.Value recognizedText; - final i0.Value isVisible; - const AssetOcrEntityCompanion({ - this.id = const i0.Value.absent(), - this.assetId = const i0.Value.absent(), - this.x1 = const i0.Value.absent(), - this.y1 = const i0.Value.absent(), - this.x2 = const i0.Value.absent(), - this.y2 = const i0.Value.absent(), - this.x3 = const i0.Value.absent(), - this.y3 = const i0.Value.absent(), - this.x4 = const i0.Value.absent(), - this.y4 = const i0.Value.absent(), - this.boxScore = const i0.Value.absent(), - this.textScore = const i0.Value.absent(), - this.recognizedText = const i0.Value.absent(), - this.isVisible = const i0.Value.absent(), - }); - AssetOcrEntityCompanion.insert({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - this.isVisible = const i0.Value.absent(), - }) : id = i0.Value(id), - assetId = i0.Value(assetId), - x1 = i0.Value(x1), - y1 = i0.Value(y1), - x2 = i0.Value(x2), - y2 = i0.Value(y2), - x3 = i0.Value(x3), - y3 = i0.Value(y3), - x4 = i0.Value(x4), - y4 = i0.Value(y4), - boxScore = i0.Value(boxScore), - textScore = i0.Value(textScore), - recognizedText = i0.Value(recognizedText); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? assetId, - i0.Expression? x1, - i0.Expression? y1, - i0.Expression? x2, - i0.Expression? y2, - i0.Expression? x3, - i0.Expression? y3, - i0.Expression? x4, - i0.Expression? y4, - i0.Expression? boxScore, - i0.Expression? textScore, - i0.Expression? recognizedText, - i0.Expression? isVisible, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (x1 != null) 'x1': x1, - if (y1 != null) 'y1': y1, - if (x2 != null) 'x2': x2, - if (y2 != null) 'y2': y2, - if (x3 != null) 'x3': x3, - if (y3 != null) 'y3': y3, - if (x4 != null) 'x4': x4, - if (y4 != null) 'y4': y4, - if (boxScore != null) 'box_score': boxScore, - if (textScore != null) 'text_score': textScore, - if (recognizedText != null) 'recognized_text': recognizedText, - if (isVisible != null) 'is_visible': isVisible, - }); - } - - i1.AssetOcrEntityCompanion copyWith({ - i0.Value? id, - i0.Value? assetId, - i0.Value? x1, - i0.Value? y1, - i0.Value? x2, - i0.Value? y2, - i0.Value? x3, - i0.Value? y3, - i0.Value? x4, - i0.Value? y4, - i0.Value? boxScore, - i0.Value? textScore, - i0.Value? recognizedText, - i0.Value? isVisible, - }) { - return i1.AssetOcrEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (x1.present) { - map['x1'] = i0.Variable(x1.value); - } - if (y1.present) { - map['y1'] = i0.Variable(y1.value); - } - if (x2.present) { - map['x2'] = i0.Variable(x2.value); - } - if (y2.present) { - map['y2'] = i0.Variable(y2.value); - } - if (x3.present) { - map['x3'] = i0.Variable(x3.value); - } - if (y3.present) { - map['y3'] = i0.Variable(y3.value); - } - if (x4.present) { - map['x4'] = i0.Variable(x4.value); - } - if (y4.present) { - map['y4'] = i0.Variable(y4.value); - } - if (boxScore.present) { - map['box_score'] = i0.Variable(boxScore.value); - } - if (textScore.present) { - map['text_score'] = i0.Variable(textScore.value); - } - if (recognizedText.present) { - map['recognized_text'] = i0.Variable(recognizedText.value); - } - if (isVisible.present) { - map['is_visible'] = i0.Variable(isVisible.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/auth_user.entity.drift.dart b/mobile/lib/infrastructure/entities/auth_user.entity.drift.dart deleted file mode 100644 index 4dba1c42fb..0000000000 --- a/mobile/lib/infrastructure/entities/auth_user.entity.drift.dart +++ /dev/null @@ -1,933 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/auth_user.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/user.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/auth_user.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; - -typedef $$AuthUserEntityTableCreateCompanionBuilder = - i1.AuthUserEntityCompanion Function({ - required String id, - required String name, - required String email, - i0.Value isAdmin, - i0.Value hasProfileImage, - i0.Value profileChangedAt, - required i2.AvatarColor avatarColor, - i0.Value quotaSizeInBytes, - i0.Value quotaUsageInBytes, - i0.Value pinCode, - }); -typedef $$AuthUserEntityTableUpdateCompanionBuilder = - i1.AuthUserEntityCompanion Function({ - i0.Value id, - i0.Value name, - i0.Value email, - i0.Value isAdmin, - i0.Value hasProfileImage, - i0.Value profileChangedAt, - i0.Value avatarColor, - i0.Value quotaSizeInBytes, - i0.Value quotaUsageInBytes, - i0.Value pinCode, - }); - -class $$AuthUserEntityTableFilterComposer - extends i0.Composer { - $$AuthUserEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get email => $composableBuilder( - column: $table.email, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isAdmin => $composableBuilder( - column: $table.isAdmin, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get avatarColor => $composableBuilder( - column: $table.avatarColor, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get quotaSizeInBytes => $composableBuilder( - column: $table.quotaSizeInBytes, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get quotaUsageInBytes => $composableBuilder( - column: $table.quotaUsageInBytes, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get pinCode => $composableBuilder( - column: $table.pinCode, - builder: (column) => i0.ColumnFilters(column), - ); -} - -class $$AuthUserEntityTableOrderingComposer - extends i0.Composer { - $$AuthUserEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get email => $composableBuilder( - column: $table.email, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isAdmin => $composableBuilder( - column: $table.isAdmin, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get avatarColor => $composableBuilder( - column: $table.avatarColor, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get quotaSizeInBytes => $composableBuilder( - column: $table.quotaSizeInBytes, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get quotaUsageInBytes => $composableBuilder( - column: $table.quotaUsageInBytes, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get pinCode => $composableBuilder( - column: $table.pinCode, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$AuthUserEntityTableAnnotationComposer - extends i0.Composer { - $$AuthUserEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get email => - $composableBuilder(column: $table.email, builder: (column) => column); - - i0.GeneratedColumn get isAdmin => - $composableBuilder(column: $table.isAdmin, builder: (column) => column); - - i0.GeneratedColumn get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => column, - ); - - i0.GeneratedColumn get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => column, - ); - - i0.GeneratedColumnWithTypeConverter get avatarColor => - $composableBuilder( - column: $table.avatarColor, - builder: (column) => column, - ); - - i0.GeneratedColumn get quotaSizeInBytes => $composableBuilder( - column: $table.quotaSizeInBytes, - builder: (column) => column, - ); - - i0.GeneratedColumn get quotaUsageInBytes => $composableBuilder( - column: $table.quotaUsageInBytes, - builder: (column) => column, - ); - - i0.GeneratedColumn get pinCode => - $composableBuilder(column: $table.pinCode, builder: (column) => column); -} - -class $$AuthUserEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$AuthUserEntityTable, - i1.AuthUserEntityData, - i1.$$AuthUserEntityTableFilterComposer, - i1.$$AuthUserEntityTableOrderingComposer, - i1.$$AuthUserEntityTableAnnotationComposer, - $$AuthUserEntityTableCreateCompanionBuilder, - $$AuthUserEntityTableUpdateCompanionBuilder, - ( - i1.AuthUserEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AuthUserEntityTable, - i1.AuthUserEntityData - >, - ), - i1.AuthUserEntityData, - i0.PrefetchHooks Function() - > { - $$AuthUserEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$AuthUserEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$AuthUserEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$AuthUserEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$AuthUserEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value email = const i0.Value.absent(), - i0.Value isAdmin = const i0.Value.absent(), - i0.Value hasProfileImage = const i0.Value.absent(), - i0.Value profileChangedAt = const i0.Value.absent(), - i0.Value avatarColor = const i0.Value.absent(), - i0.Value quotaSizeInBytes = const i0.Value.absent(), - i0.Value quotaUsageInBytes = const i0.Value.absent(), - i0.Value pinCode = const i0.Value.absent(), - }) => i1.AuthUserEntityCompanion( - id: id, - name: name, - email: email, - isAdmin: isAdmin, - hasProfileImage: hasProfileImage, - profileChangedAt: profileChangedAt, - avatarColor: avatarColor, - quotaSizeInBytes: quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes, - pinCode: pinCode, - ), - createCompanionCallback: - ({ - required String id, - required String name, - required String email, - i0.Value isAdmin = const i0.Value.absent(), - i0.Value hasProfileImage = const i0.Value.absent(), - i0.Value profileChangedAt = const i0.Value.absent(), - required i2.AvatarColor avatarColor, - i0.Value quotaSizeInBytes = const i0.Value.absent(), - i0.Value quotaUsageInBytes = const i0.Value.absent(), - i0.Value pinCode = const i0.Value.absent(), - }) => i1.AuthUserEntityCompanion.insert( - id: id, - name: name, - email: email, - isAdmin: isAdmin, - hasProfileImage: hasProfileImage, - profileChangedAt: profileChangedAt, - avatarColor: avatarColor, - quotaSizeInBytes: quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes, - pinCode: pinCode, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$AuthUserEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$AuthUserEntityTable, - i1.AuthUserEntityData, - i1.$$AuthUserEntityTableFilterComposer, - i1.$$AuthUserEntityTableOrderingComposer, - i1.$$AuthUserEntityTableAnnotationComposer, - $$AuthUserEntityTableCreateCompanionBuilder, - $$AuthUserEntityTableUpdateCompanionBuilder, - ( - i1.AuthUserEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$AuthUserEntityTable, - i1.AuthUserEntityData - >, - ), - i1.AuthUserEntityData, - i0.PrefetchHooks Function() - >; - -class $AuthUserEntityTable extends i3.AuthUserEntity - with i0.TableInfo<$AuthUserEntityTable, i1.AuthUserEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $AuthUserEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _emailMeta = const i0.VerificationMeta( - 'email', - ); - @override - late final i0.GeneratedColumn email = i0.GeneratedColumn( - 'email', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _isAdminMeta = const i0.VerificationMeta( - 'isAdmin', - ); - @override - late final i0.GeneratedColumn isAdmin = i0.GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _hasProfileImageMeta = - const i0.VerificationMeta('hasProfileImage'); - @override - late final i0.GeneratedColumn hasProfileImage = - i0.GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _profileChangedAtMeta = - const i0.VerificationMeta('profileChangedAt'); - @override - late final i0.GeneratedColumn profileChangedAt = - i0.GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - avatarColor = - i0.GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$AuthUserEntityTable.$converteravatarColor, - ); - static const i0.VerificationMeta _quotaSizeInBytesMeta = - const i0.VerificationMeta('quotaSizeInBytes'); - @override - late final i0.GeneratedColumn quotaSizeInBytes = i0.GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ); - static const i0.VerificationMeta _quotaUsageInBytesMeta = - const i0.VerificationMeta('quotaUsageInBytes'); - @override - late final i0.GeneratedColumn quotaUsageInBytes = - i0.GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ); - static const i0.VerificationMeta _pinCodeMeta = const i0.VerificationMeta( - 'pinCode', - ); - @override - late final i0.GeneratedColumn pinCode = i0.GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('email')) { - context.handle( - _emailMeta, - email.isAcceptableOrUnknown(data['email']!, _emailMeta), - ); - } else if (isInserting) { - context.missing(_emailMeta); - } - if (data.containsKey('is_admin')) { - context.handle( - _isAdminMeta, - isAdmin.isAcceptableOrUnknown(data['is_admin']!, _isAdminMeta), - ); - } - if (data.containsKey('has_profile_image')) { - context.handle( - _hasProfileImageMeta, - hasProfileImage.isAcceptableOrUnknown( - data['has_profile_image']!, - _hasProfileImageMeta, - ), - ); - } - if (data.containsKey('profile_changed_at')) { - context.handle( - _profileChangedAtMeta, - profileChangedAt.isAcceptableOrUnknown( - data['profile_changed_at']!, - _profileChangedAtMeta, - ), - ); - } - if (data.containsKey('quota_size_in_bytes')) { - context.handle( - _quotaSizeInBytesMeta, - quotaSizeInBytes.isAcceptableOrUnknown( - data['quota_size_in_bytes']!, - _quotaSizeInBytesMeta, - ), - ); - } - if (data.containsKey('quota_usage_in_bytes')) { - context.handle( - _quotaUsageInBytesMeta, - quotaUsageInBytes.isAcceptableOrUnknown( - data['quota_usage_in_bytes']!, - _quotaUsageInBytesMeta, - ), - ); - } - if (data.containsKey('pin_code')) { - context.handle( - _pinCodeMeta, - pinCode.isAcceptableOrUnknown(data['pin_code']!, _pinCodeMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: i1.$AuthUserEntityTable.$converteravatarColor.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ), - quotaSizeInBytes: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - $AuthUserEntityTable createAlias(String alias) { - return $AuthUserEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converteravatarColor = - const i0.EnumIndexConverter(i2.AvatarColor.values); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final i2.AvatarColor avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['name'] = i0.Variable(name); - map['email'] = i0.Variable(email); - map['is_admin'] = i0.Variable(isAdmin); - map['has_profile_image'] = i0.Variable(hasProfileImage); - map['profile_changed_at'] = i0.Variable(profileChangedAt); - { - map['avatar_color'] = i0.Variable( - i1.$AuthUserEntityTable.$converteravatarColor.toSql(avatarColor), - ); - } - map['quota_size_in_bytes'] = i0.Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = i0.Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = i0.Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: i1.$AuthUserEntityTable.$converteravatarColor.fromJson( - serializer.fromJson(json['avatarColor']), - ), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson( - i1.$AuthUserEntityTable.$converteravatarColor.toJson(avatarColor), - ), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - i1.AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - i2.AvatarColor? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - i0.Value pinCode = const i0.Value.absent(), - }) => i1.AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(i1.AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value name; - final i0.Value email; - final i0.Value isAdmin; - final i0.Value hasProfileImage; - final i0.Value profileChangedAt; - final i0.Value avatarColor; - final i0.Value quotaSizeInBytes; - final i0.Value quotaUsageInBytes; - final i0.Value pinCode; - const AuthUserEntityCompanion({ - this.id = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.email = const i0.Value.absent(), - this.isAdmin = const i0.Value.absent(), - this.hasProfileImage = const i0.Value.absent(), - this.profileChangedAt = const i0.Value.absent(), - this.avatarColor = const i0.Value.absent(), - this.quotaSizeInBytes = const i0.Value.absent(), - this.quotaUsageInBytes = const i0.Value.absent(), - this.pinCode = const i0.Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const i0.Value.absent(), - this.hasProfileImage = const i0.Value.absent(), - this.profileChangedAt = const i0.Value.absent(), - required i2.AvatarColor avatarColor, - this.quotaSizeInBytes = const i0.Value.absent(), - this.quotaUsageInBytes = const i0.Value.absent(), - this.pinCode = const i0.Value.absent(), - }) : id = i0.Value(id), - name = i0.Value(name), - email = i0.Value(email), - avatarColor = i0.Value(avatarColor); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? name, - i0.Expression? email, - i0.Expression? isAdmin, - i0.Expression? hasProfileImage, - i0.Expression? profileChangedAt, - i0.Expression? avatarColor, - i0.Expression? quotaSizeInBytes, - i0.Expression? quotaUsageInBytes, - i0.Expression? pinCode, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - i1.AuthUserEntityCompanion copyWith({ - i0.Value? id, - i0.Value? name, - i0.Value? email, - i0.Value? isAdmin, - i0.Value? hasProfileImage, - i0.Value? profileChangedAt, - i0.Value? avatarColor, - i0.Value? quotaSizeInBytes, - i0.Value? quotaUsageInBytes, - i0.Value? pinCode, - }) { - return i1.AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (email.present) { - map['email'] = i0.Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = i0.Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = i0.Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = i0.Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = i0.Variable( - i1.$AuthUserEntityTable.$converteravatarColor.toSql(avatarColor.value), - ); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = i0.Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = i0.Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = i0.Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/exif.entity.drift.dart b/mobile/lib/infrastructure/entities/exif.entity.drift.dart deleted file mode 100644 index 70b0793601..0000000000 --- a/mobile/lib/infrastructure/entities/exif.entity.drift.dart +++ /dev/null @@ -1,1881 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/exif.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/exif.entity.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; - -typedef $$RemoteExifEntityTableCreateCompanionBuilder = - i1.RemoteExifEntityCompanion Function({ - required String assetId, - i0.Value city, - i0.Value state, - i0.Value country, - i0.Value dateTimeOriginal, - i0.Value description, - i0.Value height, - i0.Value width, - i0.Value exposureTime, - i0.Value fNumber, - i0.Value fileSize, - i0.Value focalLength, - i0.Value latitude, - i0.Value longitude, - i0.Value iso, - i0.Value make, - i0.Value model, - i0.Value lens, - i0.Value orientation, - i0.Value timeZone, - i0.Value rating, - i0.Value projectionType, - }); -typedef $$RemoteExifEntityTableUpdateCompanionBuilder = - i1.RemoteExifEntityCompanion Function({ - i0.Value assetId, - i0.Value city, - i0.Value state, - i0.Value country, - i0.Value dateTimeOriginal, - i0.Value description, - i0.Value height, - i0.Value width, - i0.Value exposureTime, - i0.Value fNumber, - i0.Value fileSize, - i0.Value focalLength, - i0.Value latitude, - i0.Value longitude, - i0.Value iso, - i0.Value make, - i0.Value model, - i0.Value lens, - i0.Value orientation, - i0.Value timeZone, - i0.Value rating, - i0.Value projectionType, - }); - -final class $$RemoteExifEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteExifEntityTable, - i1.RemoteExifEntityData - > { - $$RemoteExifEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias('remote_exif_entity__asset_id__remote_asset_entity__id'); - - i3.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$RemoteAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteExifEntityTableFilterComposer - extends i0.Composer { - $$RemoteExifEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get city => $composableBuilder( - column: $table.city, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get state => $composableBuilder( - column: $table.state, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get country => $composableBuilder( - column: $table.country, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get dateTimeOriginal => $composableBuilder( - column: $table.dateTimeOriginal, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get description => $composableBuilder( - column: $table.description, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get exposureTime => $composableBuilder( - column: $table.exposureTime, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get fNumber => $composableBuilder( - column: $table.fNumber, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get fileSize => $composableBuilder( - column: $table.fileSize, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get focalLength => $composableBuilder( - column: $table.focalLength, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get iso => $composableBuilder( - column: $table.iso, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get make => $composableBuilder( - column: $table.make, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get model => $composableBuilder( - column: $table.model, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get lens => $composableBuilder( - column: $table.lens, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get timeZone => $composableBuilder( - column: $table.timeZone, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get rating => $composableBuilder( - column: $table.rating, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get projectionType => $composableBuilder( - column: $table.projectionType, - builder: (column) => i0.ColumnFilters(column), - ); - - i3.$$RemoteAssetEntityTableFilterComposer get assetId { - final i3.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteExifEntityTableOrderingComposer - extends i0.Composer { - $$RemoteExifEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get city => $composableBuilder( - column: $table.city, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get state => $composableBuilder( - column: $table.state, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get country => $composableBuilder( - column: $table.country, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get dateTimeOriginal => $composableBuilder( - column: $table.dateTimeOriginal, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get description => $composableBuilder( - column: $table.description, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get exposureTime => $composableBuilder( - column: $table.exposureTime, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get fNumber => $composableBuilder( - column: $table.fNumber, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get fileSize => $composableBuilder( - column: $table.fileSize, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get focalLength => $composableBuilder( - column: $table.focalLength, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get iso => $composableBuilder( - column: $table.iso, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get make => $composableBuilder( - column: $table.make, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get model => $composableBuilder( - column: $table.model, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get lens => $composableBuilder( - column: $table.lens, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get timeZone => $composableBuilder( - column: $table.timeZone, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get rating => $composableBuilder( - column: $table.rating, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get projectionType => $composableBuilder( - column: $table.projectionType, - builder: (column) => i0.ColumnOrderings(column), - ); - - i3.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i3.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteExifEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteExifEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get city => - $composableBuilder(column: $table.city, builder: (column) => column); - - i0.GeneratedColumn get state => - $composableBuilder(column: $table.state, builder: (column) => column); - - i0.GeneratedColumn get country => - $composableBuilder(column: $table.country, builder: (column) => column); - - i0.GeneratedColumn get dateTimeOriginal => $composableBuilder( - column: $table.dateTimeOriginal, - builder: (column) => column, - ); - - i0.GeneratedColumn get description => $composableBuilder( - column: $table.description, - builder: (column) => column, - ); - - i0.GeneratedColumn get height => - $composableBuilder(column: $table.height, builder: (column) => column); - - i0.GeneratedColumn get width => - $composableBuilder(column: $table.width, builder: (column) => column); - - i0.GeneratedColumn get exposureTime => $composableBuilder( - column: $table.exposureTime, - builder: (column) => column, - ); - - i0.GeneratedColumn get fNumber => - $composableBuilder(column: $table.fNumber, builder: (column) => column); - - i0.GeneratedColumn get fileSize => - $composableBuilder(column: $table.fileSize, builder: (column) => column); - - i0.GeneratedColumn get focalLength => $composableBuilder( - column: $table.focalLength, - builder: (column) => column, - ); - - i0.GeneratedColumn get latitude => - $composableBuilder(column: $table.latitude, builder: (column) => column); - - i0.GeneratedColumn get longitude => - $composableBuilder(column: $table.longitude, builder: (column) => column); - - i0.GeneratedColumn get iso => - $composableBuilder(column: $table.iso, builder: (column) => column); - - i0.GeneratedColumn get make => - $composableBuilder(column: $table.make, builder: (column) => column); - - i0.GeneratedColumn get model => - $composableBuilder(column: $table.model, builder: (column) => column); - - i0.GeneratedColumn get lens => - $composableBuilder(column: $table.lens, builder: (column) => column); - - i0.GeneratedColumn get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => column, - ); - - i0.GeneratedColumn get timeZone => - $composableBuilder(column: $table.timeZone, builder: (column) => column); - - i0.GeneratedColumn get rating => - $composableBuilder(column: $table.rating, builder: (column) => column); - - i0.GeneratedColumn get projectionType => $composableBuilder( - column: $table.projectionType, - builder: (column) => column, - ); - - i3.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i3.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteExifEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteExifEntityTable, - i1.RemoteExifEntityData, - i1.$$RemoteExifEntityTableFilterComposer, - i1.$$RemoteExifEntityTableOrderingComposer, - i1.$$RemoteExifEntityTableAnnotationComposer, - $$RemoteExifEntityTableCreateCompanionBuilder, - $$RemoteExifEntityTableUpdateCompanionBuilder, - (i1.RemoteExifEntityData, i1.$$RemoteExifEntityTableReferences), - i1.RemoteExifEntityData, - i0.PrefetchHooks Function({bool assetId}) - > { - $$RemoteExifEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteExifEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteExifEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$RemoteExifEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$RemoteExifEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value city = const i0.Value.absent(), - i0.Value state = const i0.Value.absent(), - i0.Value country = const i0.Value.absent(), - i0.Value dateTimeOriginal = const i0.Value.absent(), - i0.Value description = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value exposureTime = const i0.Value.absent(), - i0.Value fNumber = const i0.Value.absent(), - i0.Value fileSize = const i0.Value.absent(), - i0.Value focalLength = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value iso = const i0.Value.absent(), - i0.Value make = const i0.Value.absent(), - i0.Value model = const i0.Value.absent(), - i0.Value lens = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value timeZone = const i0.Value.absent(), - i0.Value rating = const i0.Value.absent(), - i0.Value projectionType = const i0.Value.absent(), - }) => i1.RemoteExifEntityCompanion( - assetId: assetId, - city: city, - state: state, - country: country, - dateTimeOriginal: dateTimeOriginal, - description: description, - height: height, - width: width, - exposureTime: exposureTime, - fNumber: fNumber, - fileSize: fileSize, - focalLength: focalLength, - latitude: latitude, - longitude: longitude, - iso: iso, - make: make, - model: model, - lens: lens, - orientation: orientation, - timeZone: timeZone, - rating: rating, - projectionType: projectionType, - ), - createCompanionCallback: - ({ - required String assetId, - i0.Value city = const i0.Value.absent(), - i0.Value state = const i0.Value.absent(), - i0.Value country = const i0.Value.absent(), - i0.Value dateTimeOriginal = const i0.Value.absent(), - i0.Value description = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value exposureTime = const i0.Value.absent(), - i0.Value fNumber = const i0.Value.absent(), - i0.Value fileSize = const i0.Value.absent(), - i0.Value focalLength = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value iso = const i0.Value.absent(), - i0.Value make = const i0.Value.absent(), - i0.Value model = const i0.Value.absent(), - i0.Value lens = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value timeZone = const i0.Value.absent(), - i0.Value rating = const i0.Value.absent(), - i0.Value projectionType = const i0.Value.absent(), - }) => i1.RemoteExifEntityCompanion.insert( - assetId: assetId, - city: city, - state: state, - country: country, - dateTimeOriginal: dateTimeOriginal, - description: description, - height: height, - width: width, - exposureTime: exposureTime, - fNumber: fNumber, - fileSize: fileSize, - focalLength: focalLength, - latitude: latitude, - longitude: longitude, - iso: iso, - make: make, - model: model, - lens: lens, - orientation: orientation, - timeZone: timeZone, - rating: rating, - projectionType: projectionType, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteExifEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$RemoteExifEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$RemoteExifEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteExifEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteExifEntityTable, - i1.RemoteExifEntityData, - i1.$$RemoteExifEntityTableFilterComposer, - i1.$$RemoteExifEntityTableOrderingComposer, - i1.$$RemoteExifEntityTableAnnotationComposer, - $$RemoteExifEntityTableCreateCompanionBuilder, - $$RemoteExifEntityTableUpdateCompanionBuilder, - (i1.RemoteExifEntityData, i1.$$RemoteExifEntityTableReferences), - i1.RemoteExifEntityData, - i0.PrefetchHooks Function({bool assetId}) - >; -i0.Index get idxLatLng => i0.Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', -); - -class $RemoteExifEntityTable extends i2.RemoteExifEntity - with i0.TableInfo<$RemoteExifEntityTable, i1.RemoteExifEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteExifEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _cityMeta = const i0.VerificationMeta( - 'city', - ); - @override - late final i0.GeneratedColumn city = i0.GeneratedColumn( - 'city', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _stateMeta = const i0.VerificationMeta( - 'state', - ); - @override - late final i0.GeneratedColumn state = i0.GeneratedColumn( - 'state', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _countryMeta = const i0.VerificationMeta( - 'country', - ); - @override - late final i0.GeneratedColumn country = i0.GeneratedColumn( - 'country', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _dateTimeOriginalMeta = - const i0.VerificationMeta('dateTimeOriginal'); - @override - late final i0.GeneratedColumn dateTimeOriginal = - i0.GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _descriptionMeta = const i0.VerificationMeta( - 'description', - ); - @override - late final i0.GeneratedColumn description = - i0.GeneratedColumn( - 'description', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _heightMeta = const i0.VerificationMeta( - 'height', - ); - @override - late final i0.GeneratedColumn height = i0.GeneratedColumn( - 'height', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _widthMeta = const i0.VerificationMeta( - 'width', - ); - @override - late final i0.GeneratedColumn width = i0.GeneratedColumn( - 'width', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _exposureTimeMeta = - const i0.VerificationMeta('exposureTime'); - @override - late final i0.GeneratedColumn exposureTime = - i0.GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _fNumberMeta = const i0.VerificationMeta( - 'fNumber', - ); - @override - late final i0.GeneratedColumn fNumber = i0.GeneratedColumn( - 'f_number', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _fileSizeMeta = const i0.VerificationMeta( - 'fileSize', - ); - @override - late final i0.GeneratedColumn fileSize = i0.GeneratedColumn( - 'file_size', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _focalLengthMeta = const i0.VerificationMeta( - 'focalLength', - ); - @override - late final i0.GeneratedColumn focalLength = - i0.GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _latitudeMeta = const i0.VerificationMeta( - 'latitude', - ); - @override - late final i0.GeneratedColumn latitude = i0.GeneratedColumn( - 'latitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _longitudeMeta = const i0.VerificationMeta( - 'longitude', - ); - @override - late final i0.GeneratedColumn longitude = i0.GeneratedColumn( - 'longitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _isoMeta = const i0.VerificationMeta('iso'); - @override - late final i0.GeneratedColumn iso = i0.GeneratedColumn( - 'iso', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _makeMeta = const i0.VerificationMeta( - 'make', - ); - @override - late final i0.GeneratedColumn make = i0.GeneratedColumn( - 'make', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _modelMeta = const i0.VerificationMeta( - 'model', - ); - @override - late final i0.GeneratedColumn model = i0.GeneratedColumn( - 'model', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _lensMeta = const i0.VerificationMeta( - 'lens', - ); - @override - late final i0.GeneratedColumn lens = i0.GeneratedColumn( - 'lens', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _orientationMeta = const i0.VerificationMeta( - 'orientation', - ); - @override - late final i0.GeneratedColumn orientation = - i0.GeneratedColumn( - 'orientation', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _timeZoneMeta = const i0.VerificationMeta( - 'timeZone', - ); - @override - late final i0.GeneratedColumn timeZone = i0.GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _ratingMeta = const i0.VerificationMeta( - 'rating', - ); - @override - late final i0.GeneratedColumn rating = i0.GeneratedColumn( - 'rating', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _projectionTypeMeta = - const i0.VerificationMeta('projectionType'); - @override - late final i0.GeneratedColumn projectionType = - i0.GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('city')) { - context.handle( - _cityMeta, - city.isAcceptableOrUnknown(data['city']!, _cityMeta), - ); - } - if (data.containsKey('state')) { - context.handle( - _stateMeta, - state.isAcceptableOrUnknown(data['state']!, _stateMeta), - ); - } - if (data.containsKey('country')) { - context.handle( - _countryMeta, - country.isAcceptableOrUnknown(data['country']!, _countryMeta), - ); - } - if (data.containsKey('date_time_original')) { - context.handle( - _dateTimeOriginalMeta, - dateTimeOriginal.isAcceptableOrUnknown( - data['date_time_original']!, - _dateTimeOriginalMeta, - ), - ); - } - if (data.containsKey('description')) { - context.handle( - _descriptionMeta, - description.isAcceptableOrUnknown( - data['description']!, - _descriptionMeta, - ), - ); - } - if (data.containsKey('height')) { - context.handle( - _heightMeta, - height.isAcceptableOrUnknown(data['height']!, _heightMeta), - ); - } - if (data.containsKey('width')) { - context.handle( - _widthMeta, - width.isAcceptableOrUnknown(data['width']!, _widthMeta), - ); - } - if (data.containsKey('exposure_time')) { - context.handle( - _exposureTimeMeta, - exposureTime.isAcceptableOrUnknown( - data['exposure_time']!, - _exposureTimeMeta, - ), - ); - } - if (data.containsKey('f_number')) { - context.handle( - _fNumberMeta, - fNumber.isAcceptableOrUnknown(data['f_number']!, _fNumberMeta), - ); - } - if (data.containsKey('file_size')) { - context.handle( - _fileSizeMeta, - fileSize.isAcceptableOrUnknown(data['file_size']!, _fileSizeMeta), - ); - } - if (data.containsKey('focal_length')) { - context.handle( - _focalLengthMeta, - focalLength.isAcceptableOrUnknown( - data['focal_length']!, - _focalLengthMeta, - ), - ); - } - if (data.containsKey('latitude')) { - context.handle( - _latitudeMeta, - latitude.isAcceptableOrUnknown(data['latitude']!, _latitudeMeta), - ); - } - if (data.containsKey('longitude')) { - context.handle( - _longitudeMeta, - longitude.isAcceptableOrUnknown(data['longitude']!, _longitudeMeta), - ); - } - if (data.containsKey('iso')) { - context.handle( - _isoMeta, - iso.isAcceptableOrUnknown(data['iso']!, _isoMeta), - ); - } - if (data.containsKey('make')) { - context.handle( - _makeMeta, - make.isAcceptableOrUnknown(data['make']!, _makeMeta), - ); - } - if (data.containsKey('model')) { - context.handle( - _modelMeta, - model.isAcceptableOrUnknown(data['model']!, _modelMeta), - ); - } - if (data.containsKey('lens')) { - context.handle( - _lensMeta, - lens.isAcceptableOrUnknown(data['lens']!, _lensMeta), - ); - } - if (data.containsKey('orientation')) { - context.handle( - _orientationMeta, - orientation.isAcceptableOrUnknown( - data['orientation']!, - _orientationMeta, - ), - ); - } - if (data.containsKey('time_zone')) { - context.handle( - _timeZoneMeta, - timeZone.isAcceptableOrUnknown(data['time_zone']!, _timeZoneMeta), - ); - } - if (data.containsKey('rating')) { - context.handle( - _ratingMeta, - rating.isAcceptableOrUnknown(data['rating']!, _ratingMeta), - ); - } - if (data.containsKey('projection_type')) { - context.handle( - _projectionTypeMeta, - projectionType.isAcceptableOrUnknown( - data['projection_type']!, - _projectionTypeMeta, - ), - ); - } - return context; - } - - @override - Set get $primaryKey => {assetId}; - @override - i1.RemoteExifEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - $RemoteExifEntityTable createAlias(String alias) { - return $RemoteExifEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends i0.DataClass - implements i0.Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = i0.Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = i0.Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = i0.Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = i0.Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = i0.Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = i0.Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = i0.Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = i0.Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = i0.Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = i0.Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = i0.Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = i0.Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = i0.Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = i0.Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = i0.Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = i0.Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = i0.Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = i0.Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = i0.Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = i0.Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = i0.Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = i0.Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - i1.RemoteExifEntityData copyWith({ - String? assetId, - i0.Value city = const i0.Value.absent(), - i0.Value state = const i0.Value.absent(), - i0.Value country = const i0.Value.absent(), - i0.Value dateTimeOriginal = const i0.Value.absent(), - i0.Value description = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value exposureTime = const i0.Value.absent(), - i0.Value fNumber = const i0.Value.absent(), - i0.Value fileSize = const i0.Value.absent(), - i0.Value focalLength = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value iso = const i0.Value.absent(), - i0.Value make = const i0.Value.absent(), - i0.Value model = const i0.Value.absent(), - i0.Value lens = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value timeZone = const i0.Value.absent(), - i0.Value rating = const i0.Value.absent(), - i0.Value projectionType = const i0.Value.absent(), - }) => i1.RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(i1.RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion - extends i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value city; - final i0.Value state; - final i0.Value country; - final i0.Value dateTimeOriginal; - final i0.Value description; - final i0.Value height; - final i0.Value width; - final i0.Value exposureTime; - final i0.Value fNumber; - final i0.Value fileSize; - final i0.Value focalLength; - final i0.Value latitude; - final i0.Value longitude; - final i0.Value iso; - final i0.Value make; - final i0.Value model; - final i0.Value lens; - final i0.Value orientation; - final i0.Value timeZone; - final i0.Value rating; - final i0.Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.city = const i0.Value.absent(), - this.state = const i0.Value.absent(), - this.country = const i0.Value.absent(), - this.dateTimeOriginal = const i0.Value.absent(), - this.description = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.exposureTime = const i0.Value.absent(), - this.fNumber = const i0.Value.absent(), - this.fileSize = const i0.Value.absent(), - this.focalLength = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - this.iso = const i0.Value.absent(), - this.make = const i0.Value.absent(), - this.model = const i0.Value.absent(), - this.lens = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - this.timeZone = const i0.Value.absent(), - this.rating = const i0.Value.absent(), - this.projectionType = const i0.Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const i0.Value.absent(), - this.state = const i0.Value.absent(), - this.country = const i0.Value.absent(), - this.dateTimeOriginal = const i0.Value.absent(), - this.description = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.exposureTime = const i0.Value.absent(), - this.fNumber = const i0.Value.absent(), - this.fileSize = const i0.Value.absent(), - this.focalLength = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - this.iso = const i0.Value.absent(), - this.make = const i0.Value.absent(), - this.model = const i0.Value.absent(), - this.lens = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - this.timeZone = const i0.Value.absent(), - this.rating = const i0.Value.absent(), - this.projectionType = const i0.Value.absent(), - }) : assetId = i0.Value(assetId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? city, - i0.Expression? state, - i0.Expression? country, - i0.Expression? dateTimeOriginal, - i0.Expression? description, - i0.Expression? height, - i0.Expression? width, - i0.Expression? exposureTime, - i0.Expression? fNumber, - i0.Expression? fileSize, - i0.Expression? focalLength, - i0.Expression? latitude, - i0.Expression? longitude, - i0.Expression? iso, - i0.Expression? make, - i0.Expression? model, - i0.Expression? lens, - i0.Expression? orientation, - i0.Expression? timeZone, - i0.Expression? rating, - i0.Expression? projectionType, - }) { - return i0.RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - i1.RemoteExifEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? city, - i0.Value? state, - i0.Value? country, - i0.Value? dateTimeOriginal, - i0.Value? description, - i0.Value? height, - i0.Value? width, - i0.Value? exposureTime, - i0.Value? fNumber, - i0.Value? fileSize, - i0.Value? focalLength, - i0.Value? latitude, - i0.Value? longitude, - i0.Value? iso, - i0.Value? make, - i0.Value? model, - i0.Value? lens, - i0.Value? orientation, - i0.Value? timeZone, - i0.Value? rating, - i0.Value? projectionType, - }) { - return i1.RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (city.present) { - map['city'] = i0.Variable(city.value); - } - if (state.present) { - map['state'] = i0.Variable(state.value); - } - if (country.present) { - map['country'] = i0.Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = i0.Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = i0.Variable(description.value); - } - if (height.present) { - map['height'] = i0.Variable(height.value); - } - if (width.present) { - map['width'] = i0.Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = i0.Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = i0.Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = i0.Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = i0.Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = i0.Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = i0.Variable(longitude.value); - } - if (iso.present) { - map['iso'] = i0.Variable(iso.value); - } - if (make.present) { - map['make'] = i0.Variable(make.value); - } - if (model.present) { - map['model'] = i0.Variable(model.value); - } - if (lens.present) { - map['lens'] = i0.Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = i0.Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = i0.Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = i0.Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = i0.Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -i0.Index get idxRemoteExifCity => i0.Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', -); diff --git a/mobile/lib/infrastructure/entities/local_album.entity.drift.dart b/mobile/lib/infrastructure/entities/local_album.entity.drift.dart deleted file mode 100644 index 1479ec813a..0000000000 --- a/mobile/lib/infrastructure/entities/local_album.entity.drift.dart +++ /dev/null @@ -1,897 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/album/local_album.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$LocalAlbumEntityTableCreateCompanionBuilder = - i1.LocalAlbumEntityCompanion Function({ - required String id, - required String name, - i0.Value updatedAt, - required i2.BackupSelection backupSelection, - i0.Value isIosSharedAlbum, - i0.Value linkedRemoteAlbumId, - i0.Value marker_, - }); -typedef $$LocalAlbumEntityTableUpdateCompanionBuilder = - i1.LocalAlbumEntityCompanion Function({ - i0.Value id, - i0.Value name, - i0.Value updatedAt, - i0.Value backupSelection, - i0.Value isIosSharedAlbum, - i0.Value linkedRemoteAlbumId, - i0.Value marker_, - }); - -final class $$LocalAlbumEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LocalAlbumEntityTable, - i1.LocalAlbumEntityData - > { - $$LocalAlbumEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$RemoteAlbumEntityTable _linkedRemoteAlbumIdTable( - i0.GeneratedDatabase db, - ) => i6.ReadDatabaseContainer(db) - .resultSet('remote_album_entity') - .createAlias( - 'local_album_entity__linked_remote_album_id__remote_album_entity__id', - ); - - i5.$$RemoteAlbumEntityTableProcessedTableManager? get linkedRemoteAlbumId { - final $_column = $_itemColumn('linked_remote_album_id'); - if ($_column == null) return null; - final manager = i5 - .$$RemoteAlbumEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('remote_album_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_linkedRemoteAlbumIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$LocalAlbumEntityTableFilterComposer - extends i0.Composer { - $$LocalAlbumEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get backupSelection => $composableBuilder( - column: $table.backupSelection, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get isIosSharedAlbum => $composableBuilder( - column: $table.isIosSharedAlbum, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get marker_ => $composableBuilder( - column: $table.marker_, - builder: (column) => i0.ColumnFilters(column), - ); - - i5.$$RemoteAlbumEntityTableFilterComposer get linkedRemoteAlbumId { - final i5.$$RemoteAlbumEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.linkedRemoteAlbumId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumEntityTableOrderingComposer - extends i0.Composer { - $$LocalAlbumEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get backupSelection => $composableBuilder( - column: $table.backupSelection, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isIosSharedAlbum => $composableBuilder( - column: $table.isIosSharedAlbum, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get marker_ => $composableBuilder( - column: $table.marker_, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$RemoteAlbumEntityTableOrderingComposer get linkedRemoteAlbumId { - final i5.$$RemoteAlbumEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.linkedRemoteAlbumId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumEntityTableAnnotationComposer - extends i0.Composer { - $$LocalAlbumEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter - get backupSelection => $composableBuilder( - column: $table.backupSelection, - builder: (column) => column, - ); - - i0.GeneratedColumn get isIosSharedAlbum => $composableBuilder( - column: $table.isIosSharedAlbum, - builder: (column) => column, - ); - - i0.GeneratedColumn get marker_ => - $composableBuilder(column: $table.marker_, builder: (column) => column); - - i5.$$RemoteAlbumEntityTableAnnotationComposer get linkedRemoteAlbumId { - final i5.$$RemoteAlbumEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.linkedRemoteAlbumId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$LocalAlbumEntityTable, - i1.LocalAlbumEntityData, - i1.$$LocalAlbumEntityTableFilterComposer, - i1.$$LocalAlbumEntityTableOrderingComposer, - i1.$$LocalAlbumEntityTableAnnotationComposer, - $$LocalAlbumEntityTableCreateCompanionBuilder, - $$LocalAlbumEntityTableUpdateCompanionBuilder, - (i1.LocalAlbumEntityData, i1.$$LocalAlbumEntityTableReferences), - i1.LocalAlbumEntityData, - i0.PrefetchHooks Function({bool linkedRemoteAlbumId}) - > { - $$LocalAlbumEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$LocalAlbumEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$LocalAlbumEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$LocalAlbumEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$LocalAlbumEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value backupSelection = - const i0.Value.absent(), - i0.Value isIosSharedAlbum = const i0.Value.absent(), - i0.Value linkedRemoteAlbumId = const i0.Value.absent(), - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumEntityCompanion( - id: id, - name: name, - updatedAt: updatedAt, - backupSelection: backupSelection, - isIosSharedAlbum: isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId, - marker_: marker_, - ), - createCompanionCallback: - ({ - required String id, - required String name, - i0.Value updatedAt = const i0.Value.absent(), - required i2.BackupSelection backupSelection, - i0.Value isIosSharedAlbum = const i0.Value.absent(), - i0.Value linkedRemoteAlbumId = const i0.Value.absent(), - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumEntityCompanion.insert( - id: id, - name: name, - updatedAt: updatedAt, - backupSelection: backupSelection, - isIosSharedAlbum: isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId, - marker_: marker_, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$LocalAlbumEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({linkedRemoteAlbumId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (linkedRemoteAlbumId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.linkedRemoteAlbumId, - referencedTable: i1 - .$$LocalAlbumEntityTableReferences - ._linkedRemoteAlbumIdTable(db), - referencedColumn: i1 - .$$LocalAlbumEntityTableReferences - ._linkedRemoteAlbumIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$LocalAlbumEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$LocalAlbumEntityTable, - i1.LocalAlbumEntityData, - i1.$$LocalAlbumEntityTableFilterComposer, - i1.$$LocalAlbumEntityTableOrderingComposer, - i1.$$LocalAlbumEntityTableAnnotationComposer, - $$LocalAlbumEntityTableCreateCompanionBuilder, - $$LocalAlbumEntityTableUpdateCompanionBuilder, - (i1.LocalAlbumEntityData, i1.$$LocalAlbumEntityTableReferences), - i1.LocalAlbumEntityData, - i0.PrefetchHooks Function({bool linkedRemoteAlbumId}) - >; - -class $LocalAlbumEntityTable extends i3.LocalAlbumEntity - with i0.TableInfo<$LocalAlbumEntityTable, i1.LocalAlbumEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $LocalAlbumEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( - 'updatedAt', - ); - @override - late final i0.GeneratedColumn updatedAt = - i0.GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - backupSelection = - i0.GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$LocalAlbumEntityTable.$converterbackupSelection, - ); - static const i0.VerificationMeta _isIosSharedAlbumMeta = - const i0.VerificationMeta('isIosSharedAlbum'); - @override - late final i0.GeneratedColumn isIosSharedAlbum = - i0.GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _linkedRemoteAlbumIdMeta = - const i0.VerificationMeta('linkedRemoteAlbumId'); - @override - late final i0.GeneratedColumn linkedRemoteAlbumId = - i0.GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - static const i0.VerificationMeta _marker_Meta = const i0.VerificationMeta( - 'marker_', - ); - @override - late final i0.GeneratedColumn marker_ = i0.GeneratedColumn( - 'marker', - aliasedName, - true, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - if (data.containsKey('is_ios_shared_album')) { - context.handle( - _isIosSharedAlbumMeta, - isIosSharedAlbum.isAcceptableOrUnknown( - data['is_ios_shared_album']!, - _isIosSharedAlbumMeta, - ), - ); - } - if (data.containsKey('linked_remote_album_id')) { - context.handle( - _linkedRemoteAlbumIdMeta, - linkedRemoteAlbumId.isAcceptableOrUnknown( - data['linked_remote_album_id']!, - _linkedRemoteAlbumIdMeta, - ), - ); - } - if (data.containsKey('marker')) { - context.handle( - _marker_Meta, - marker_.isAcceptableOrUnknown(data['marker']!, _marker_Meta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.LocalAlbumEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: i1.$LocalAlbumEntityTable.$converterbackupSelection - .fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - ), - isIosSharedAlbum: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - $LocalAlbumEntityTable createAlias(String alias) { - return $LocalAlbumEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 - $converterbackupSelection = const i0.EnumIndexConverter( - i2.BackupSelection.values, - ); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String name; - final DateTime updatedAt; - final i2.BackupSelection backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['name'] = i0.Variable(name); - map['updated_at'] = i0.Variable(updatedAt); - { - map['backup_selection'] = i0.Variable( - i1.$LocalAlbumEntityTable.$converterbackupSelection.toSql( - backupSelection, - ), - ); - } - map['is_ios_shared_album'] = i0.Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = i0.Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = i0.Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: i1.$LocalAlbumEntityTable.$converterbackupSelection - .fromJson(serializer.fromJson(json['backupSelection'])), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson( - i1.$LocalAlbumEntityTable.$converterbackupSelection.toJson( - backupSelection, - ), - ), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - i1.LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - i2.BackupSelection? backupSelection, - bool? isIosSharedAlbum, - i0.Value linkedRemoteAlbumId = const i0.Value.absent(), - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(i1.LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value name; - final i0.Value updatedAt; - final i0.Value backupSelection; - final i0.Value isIosSharedAlbum; - final i0.Value linkedRemoteAlbumId; - final i0.Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.backupSelection = const i0.Value.absent(), - this.isIosSharedAlbum = const i0.Value.absent(), - this.linkedRemoteAlbumId = const i0.Value.absent(), - this.marker_ = const i0.Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const i0.Value.absent(), - required i2.BackupSelection backupSelection, - this.isIosSharedAlbum = const i0.Value.absent(), - this.linkedRemoteAlbumId = const i0.Value.absent(), - this.marker_ = const i0.Value.absent(), - }) : id = i0.Value(id), - name = i0.Value(name), - backupSelection = i0.Value(backupSelection); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? name, - i0.Expression? updatedAt, - i0.Expression? backupSelection, - i0.Expression? isIosSharedAlbum, - i0.Expression? linkedRemoteAlbumId, - i0.Expression? marker_, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - i1.LocalAlbumEntityCompanion copyWith({ - i0.Value? id, - i0.Value? name, - i0.Value? updatedAt, - i0.Value? backupSelection, - i0.Value? isIosSharedAlbum, - i0.Value? linkedRemoteAlbumId, - i0.Value? marker_, - }) { - return i1.LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = i0.Variable( - i1.$LocalAlbumEntityTable.$converterbackupSelection.toSql( - backupSelection.value, - ), - ); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = i0.Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = i0.Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = i0.Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/local_album_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/local_album_asset.entity.drift.dart deleted file mode 100644 index c4869a3593..0000000000 --- a/mobile/lib/infrastructure/entities/local_album_asset.entity.drift.dart +++ /dev/null @@ -1,721 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart' - as i5; - -typedef $$LocalAlbumAssetEntityTableCreateCompanionBuilder = - i1.LocalAlbumAssetEntityCompanion Function({ - required String assetId, - required String albumId, - i0.Value marker_, - }); -typedef $$LocalAlbumAssetEntityTableUpdateCompanionBuilder = - i1.LocalAlbumAssetEntityCompanion Function({ - i0.Value assetId, - i0.Value albumId, - i0.Value marker_, - }); - -final class $$LocalAlbumAssetEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LocalAlbumAssetEntityTable, - i1.LocalAlbumAssetEntityData - > { - $$LocalAlbumAssetEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$LocalAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('local_asset_entity') - .createAlias( - 'local_album_asset_entity__asset_id__local_asset_entity__id', - ); - - i3.$$LocalAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$LocalAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('local_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i5.$LocalAlbumEntityTable _albumIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('local_album_entity') - .createAlias( - 'local_album_asset_entity__album_id__local_album_entity__id', - ); - - i5.$$LocalAlbumEntityTableProcessedTableManager get albumId { - final $_column = $_itemColumn('album_id')!; - - final manager = i5 - .$$LocalAlbumEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('local_album_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_albumIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$LocalAlbumAssetEntityTableFilterComposer - extends i0.Composer { - $$LocalAlbumAssetEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get marker_ => $composableBuilder( - column: $table.marker_, - builder: (column) => i0.ColumnFilters(column), - ); - - i3.$$LocalAssetEntityTableFilterComposer get assetId { - final i3.$$LocalAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$LocalAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$LocalAlbumEntityTableFilterComposer get albumId { - final i5.$$LocalAlbumEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$LocalAlbumEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumAssetEntityTableOrderingComposer - extends i0.Composer { - $$LocalAlbumAssetEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get marker_ => $composableBuilder( - column: $table.marker_, - builder: (column) => i0.ColumnOrderings(column), - ); - - i3.$$LocalAssetEntityTableOrderingComposer get assetId { - final i3.$$LocalAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$LocalAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$LocalAlbumEntityTableOrderingComposer get albumId { - final i5.$$LocalAlbumEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$LocalAlbumEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumAssetEntityTableAnnotationComposer - extends i0.Composer { - $$LocalAlbumAssetEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get marker_ => - $composableBuilder(column: $table.marker_, builder: (column) => column); - - i3.$$LocalAssetEntityTableAnnotationComposer get assetId { - final i3.$$LocalAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$LocalAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$LocalAlbumEntityTableAnnotationComposer get albumId { - final i5.$$LocalAlbumEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$LocalAlbumEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('local_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$LocalAlbumAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$LocalAlbumAssetEntityTable, - i1.LocalAlbumAssetEntityData, - i1.$$LocalAlbumAssetEntityTableFilterComposer, - i1.$$LocalAlbumAssetEntityTableOrderingComposer, - i1.$$LocalAlbumAssetEntityTableAnnotationComposer, - $$LocalAlbumAssetEntityTableCreateCompanionBuilder, - $$LocalAlbumAssetEntityTableUpdateCompanionBuilder, - ( - i1.LocalAlbumAssetEntityData, - i1.$$LocalAlbumAssetEntityTableReferences, - ), - i1.LocalAlbumAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool albumId}) - > { - $$LocalAlbumAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$LocalAlbumAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$LocalAlbumAssetEntityTableFilterComposer( - $db: db, - $table: table, - ), - createOrderingComposer: () => - i1.$$LocalAlbumAssetEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$LocalAlbumAssetEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value albumId = const i0.Value.absent(), - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumAssetEntityCompanion( - assetId: assetId, - albumId: albumId, - marker_: marker_, - ), - createCompanionCallback: - ({ - required String assetId, - required String albumId, - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumAssetEntityCompanion.insert( - assetId: assetId, - albumId: albumId, - marker_: marker_, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$LocalAlbumAssetEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false, albumId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$LocalAlbumAssetEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$LocalAlbumAssetEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - if (albumId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.albumId, - referencedTable: i1 - .$$LocalAlbumAssetEntityTableReferences - ._albumIdTable(db), - referencedColumn: i1 - .$$LocalAlbumAssetEntityTableReferences - ._albumIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$LocalAlbumAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$LocalAlbumAssetEntityTable, - i1.LocalAlbumAssetEntityData, - i1.$$LocalAlbumAssetEntityTableFilterComposer, - i1.$$LocalAlbumAssetEntityTableOrderingComposer, - i1.$$LocalAlbumAssetEntityTableAnnotationComposer, - $$LocalAlbumAssetEntityTableCreateCompanionBuilder, - $$LocalAlbumAssetEntityTableUpdateCompanionBuilder, - (i1.LocalAlbumAssetEntityData, i1.$$LocalAlbumAssetEntityTableReferences), - i1.LocalAlbumAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool albumId}) - >; -i0.Index get idxLocalAlbumAssetAlbumAsset => i0.Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', -); - -class $LocalAlbumAssetEntityTable extends i2.LocalAlbumAssetEntity - with - i0.TableInfo< - $LocalAlbumAssetEntityTable, - i1.LocalAlbumAssetEntityData - > { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $LocalAlbumAssetEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _albumIdMeta = const i0.VerificationMeta( - 'albumId', - ); - @override - late final i0.GeneratedColumn albumId = i0.GeneratedColumn( - 'album_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _marker_Meta = const i0.VerificationMeta( - 'marker_', - ); - @override - late final i0.GeneratedColumn marker_ = i0.GeneratedColumn( - 'marker', - aliasedName, - true, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('album_id')) { - context.handle( - _albumIdMeta, - albumId.isAcceptableOrUnknown(data['album_id']!, _albumIdMeta), - ); - } else if (isInserting) { - context.missing(_albumIdMeta); - } - if (data.containsKey('marker')) { - context.handle( - _marker_Meta, - marker_.isAcceptableOrUnknown(data['marker']!, _marker_Meta), - ); - } - return context; - } - - @override - Set get $primaryKey => {assetId, albumId}; - @override - i1.LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - $LocalAlbumAssetEntityTable createAlias(String alias) { - return $LocalAlbumAssetEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends i0.DataClass - implements i0.Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = i0.Variable(assetId); - map['album_id'] = i0.Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = i0.Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - i1.LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - i0.Value marker_ = const i0.Value.absent(), - }) => i1.LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - i1.LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value albumId; - final i0.Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.albumId = const i0.Value.absent(), - this.marker_ = const i0.Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const i0.Value.absent(), - }) : assetId = i0.Value(assetId), - albumId = i0.Value(albumId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? albumId, - i0.Expression? marker_, - }) { - return i0.RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - i1.LocalAlbumAssetEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? albumId, - i0.Value? marker_, - }) { - return i1.LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = i0.Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = i0.Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart deleted file mode 100644 index fe03f9b208..0000000000 --- a/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart +++ /dev/null @@ -1,1354 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; - -typedef $$LocalAssetEntityTableCreateCompanionBuilder = - i1.LocalAssetEntityCompanion Function({ - required String name, - required i2.AssetType type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - required String id, - i0.Value checksum, - i0.Value isFavorite, - i0.Value orientation, - i0.Value iCloudId, - i0.Value adjustmentTime, - i0.Value latitude, - i0.Value longitude, - i0.Value playbackStyle, - }); -typedef $$LocalAssetEntityTableUpdateCompanionBuilder = - i1.LocalAssetEntityCompanion Function({ - i0.Value name, - i0.Value type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - i0.Value id, - i0.Value checksum, - i0.Value isFavorite, - i0.Value orientation, - i0.Value iCloudId, - i0.Value adjustmentTime, - i0.Value latitude, - i0.Value longitude, - i0.Value playbackStyle, - }); - -class $$LocalAssetEntityTableFilterComposer - extends i0.Composer { - $$LocalAssetEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters get type => - $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get checksum => $composableBuilder( - column: $table.checksum, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get iCloudId => $composableBuilder( - column: $table.iCloudId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters< - i2.AssetPlaybackStyle, - i2.AssetPlaybackStyle, - int - > - get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); -} - -class $$LocalAssetEntityTableOrderingComposer - extends i0.Composer { - $$LocalAssetEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get type => $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get checksum => $composableBuilder( - column: $table.checksum, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get iCloudId => $composableBuilder( - column: $table.iCloudId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$LocalAssetEntityTableAnnotationComposer - extends i0.Composer { - $$LocalAssetEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter get type => - $composableBuilder(column: $table.type, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); - - i0.GeneratedColumn get width => - $composableBuilder(column: $table.width, builder: (column) => column); - - i0.GeneratedColumn get height => - $composableBuilder(column: $table.height, builder: (column) => column); - - i0.GeneratedColumn get durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => column, - ); - - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get checksum => - $composableBuilder(column: $table.checksum, builder: (column) => column); - - i0.GeneratedColumn get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => column, - ); - - i0.GeneratedColumn get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => column, - ); - - i0.GeneratedColumn get iCloudId => - $composableBuilder(column: $table.iCloudId, builder: (column) => column); - - i0.GeneratedColumn get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => column, - ); - - i0.GeneratedColumn get latitude => - $composableBuilder(column: $table.latitude, builder: (column) => column); - - i0.GeneratedColumn get longitude => - $composableBuilder(column: $table.longitude, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter - get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => column, - ); -} - -class $$LocalAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$LocalAssetEntityTable, - i1.LocalAssetEntityData, - i1.$$LocalAssetEntityTableFilterComposer, - i1.$$LocalAssetEntityTableOrderingComposer, - i1.$$LocalAssetEntityTableAnnotationComposer, - $$LocalAssetEntityTableCreateCompanionBuilder, - $$LocalAssetEntityTableUpdateCompanionBuilder, - ( - i1.LocalAssetEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LocalAssetEntityTable, - i1.LocalAssetEntityData - >, - ), - i1.LocalAssetEntityData, - i0.PrefetchHooks Function() - > { - $$LocalAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$LocalAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$LocalAssetEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$LocalAssetEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$LocalAssetEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value name = const i0.Value.absent(), - i0.Value type = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value durationMs = const i0.Value.absent(), - i0.Value id = const i0.Value.absent(), - i0.Value checksum = const i0.Value.absent(), - i0.Value isFavorite = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value iCloudId = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value playbackStyle = - const i0.Value.absent(), - }) => i1.LocalAssetEntityCompanion( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - checksum: checksum, - isFavorite: isFavorite, - orientation: orientation, - iCloudId: iCloudId, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - playbackStyle: playbackStyle, - ), - createCompanionCallback: - ({ - required String name, - required i2.AssetType type, - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value durationMs = const i0.Value.absent(), - required String id, - i0.Value checksum = const i0.Value.absent(), - i0.Value isFavorite = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value iCloudId = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i0.Value playbackStyle = - const i0.Value.absent(), - }) => i1.LocalAssetEntityCompanion.insert( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - checksum: checksum, - isFavorite: isFavorite, - orientation: orientation, - iCloudId: iCloudId, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - playbackStyle: playbackStyle, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$LocalAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$LocalAssetEntityTable, - i1.LocalAssetEntityData, - i1.$$LocalAssetEntityTableFilterComposer, - i1.$$LocalAssetEntityTableOrderingComposer, - i1.$$LocalAssetEntityTableAnnotationComposer, - $$LocalAssetEntityTableCreateCompanionBuilder, - $$LocalAssetEntityTableUpdateCompanionBuilder, - ( - i1.LocalAssetEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LocalAssetEntityTable, - i1.LocalAssetEntityData - >, - ), - i1.LocalAssetEntityData, - i0.PrefetchHooks Function() - >; -i0.Index get idxLocalAssetChecksum => i0.Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', -); - -class $LocalAssetEntityTable extends i3.LocalAssetEntity - with i0.TableInfo<$LocalAssetEntityTable, i1.LocalAssetEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $LocalAssetEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - late final i0.GeneratedColumnWithTypeConverter type = - i0.GeneratedColumn( - 'type', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter(i1.$LocalAssetEntityTable.$convertertype); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( - 'updatedAt', - ); - @override - late final i0.GeneratedColumn updatedAt = - i0.GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _widthMeta = const i0.VerificationMeta( - 'width', - ); - @override - late final i0.GeneratedColumn width = i0.GeneratedColumn( - 'width', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _heightMeta = const i0.VerificationMeta( - 'height', - ); - @override - late final i0.GeneratedColumn height = i0.GeneratedColumn( - 'height', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _durationMsMeta = const i0.VerificationMeta( - 'durationMs', - ); - @override - late final i0.GeneratedColumn durationMs = i0.GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _checksumMeta = const i0.VerificationMeta( - 'checksum', - ); - @override - late final i0.GeneratedColumn checksum = i0.GeneratedColumn( - 'checksum', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _isFavoriteMeta = const i0.VerificationMeta( - 'isFavorite', - ); - @override - late final i0.GeneratedColumn isFavorite = i0.GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _orientationMeta = const i0.VerificationMeta( - 'orientation', - ); - @override - late final i0.GeneratedColumn orientation = i0.GeneratedColumn( - 'orientation', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ); - static const i0.VerificationMeta _iCloudIdMeta = const i0.VerificationMeta( - 'iCloudId', - ); - @override - late final i0.GeneratedColumn iCloudId = i0.GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _adjustmentTimeMeta = - const i0.VerificationMeta('adjustmentTime'); - @override - late final i0.GeneratedColumn adjustmentTime = - i0.GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _latitudeMeta = const i0.VerificationMeta( - 'latitude', - ); - @override - late final i0.GeneratedColumn latitude = i0.GeneratedColumn( - 'latitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _longitudeMeta = const i0.VerificationMeta( - 'longitude', - ); - @override - late final i0.GeneratedColumn longitude = i0.GeneratedColumn( - 'longitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - playbackStyle = - i0.GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ).withConverter( - i1.$LocalAssetEntityTable.$converterplaybackStyle, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - if (data.containsKey('width')) { - context.handle( - _widthMeta, - width.isAcceptableOrUnknown(data['width']!, _widthMeta), - ); - } - if (data.containsKey('height')) { - context.handle( - _heightMeta, - height.isAcceptableOrUnknown(data['height']!, _heightMeta), - ); - } - if (data.containsKey('duration_ms')) { - context.handle( - _durationMsMeta, - durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta), - ); - } - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('checksum')) { - context.handle( - _checksumMeta, - checksum.isAcceptableOrUnknown(data['checksum']!, _checksumMeta), - ); - } - if (data.containsKey('is_favorite')) { - context.handle( - _isFavoriteMeta, - isFavorite.isAcceptableOrUnknown(data['is_favorite']!, _isFavoriteMeta), - ); - } - if (data.containsKey('orientation')) { - context.handle( - _orientationMeta, - orientation.isAcceptableOrUnknown( - data['orientation']!, - _orientationMeta, - ), - ); - } - if (data.containsKey('i_cloud_id')) { - context.handle( - _iCloudIdMeta, - iCloudId.isAcceptableOrUnknown(data['i_cloud_id']!, _iCloudIdMeta), - ); - } - if (data.containsKey('adjustment_time')) { - context.handle( - _adjustmentTimeMeta, - adjustmentTime.isAcceptableOrUnknown( - data['adjustment_time']!, - _adjustmentTimeMeta, - ), - ); - } - if (data.containsKey('latitude')) { - context.handle( - _latitudeMeta, - latitude.isAcceptableOrUnknown(data['latitude']!, _latitudeMeta), - ); - } - if (data.containsKey('longitude')) { - context.handle( - _longitudeMeta, - longitude.isAcceptableOrUnknown(data['longitude']!, _longitudeMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.LocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: i1.$LocalAssetEntityTable.$convertertype.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - ), - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: i1.$LocalAssetEntityTable.$converterplaybackStyle.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ), - ); - } - - @override - $LocalAssetEntityTable createAlias(String alias) { - return $LocalAssetEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $convertertype = - const i0.EnumIndexConverter(i2.AssetType.values); - static i0.JsonTypeConverter2 - $converterplaybackStyle = const i0.EnumIndexConverter( - i2.AssetPlaybackStyle.values, - ); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends i0.DataClass - implements i0.Insertable { - final String name; - final i2.AssetType type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - final i2.AssetPlaybackStyle playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = i0.Variable(name); - { - map['type'] = i0.Variable( - i1.$LocalAssetEntityTable.$convertertype.toSql(type), - ); - } - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = i0.Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = i0.Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = i0.Variable(durationMs); - } - map['id'] = i0.Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = i0.Variable(checksum); - } - map['is_favorite'] = i0.Variable(isFavorite); - map['orientation'] = i0.Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = i0.Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = i0.Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = i0.Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = i0.Variable(longitude); - } - { - map['playback_style'] = i0.Variable( - i1.$LocalAssetEntityTable.$converterplaybackStyle.toSql(playbackStyle), - ); - } - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: i1.$LocalAssetEntityTable.$convertertype.fromJson( - serializer.fromJson(json['type']), - ), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: i1.$LocalAssetEntityTable.$converterplaybackStyle.fromJson( - serializer.fromJson(json['playbackStyle']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson( - i1.$LocalAssetEntityTable.$convertertype.toJson(type), - ), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson( - i1.$LocalAssetEntityTable.$converterplaybackStyle.toJson(playbackStyle), - ), - }; - } - - i1.LocalAssetEntityData copyWith({ - String? name, - i2.AssetType? type, - DateTime? createdAt, - DateTime? updatedAt, - i0.Value width = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value durationMs = const i0.Value.absent(), - String? id, - i0.Value checksum = const i0.Value.absent(), - bool? isFavorite, - int? orientation, - i0.Value iCloudId = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - i2.AssetPlaybackStyle? playbackStyle, - }) => i1.LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(i1.LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion - extends i0.UpdateCompanion { - final i0.Value name; - final i0.Value type; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value width; - final i0.Value height; - final i0.Value durationMs; - final i0.Value id; - final i0.Value checksum; - final i0.Value isFavorite; - final i0.Value orientation; - final i0.Value iCloudId; - final i0.Value adjustmentTime; - final i0.Value latitude; - final i0.Value longitude; - final i0.Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const i0.Value.absent(), - this.type = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.durationMs = const i0.Value.absent(), - this.id = const i0.Value.absent(), - this.checksum = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - this.iCloudId = const i0.Value.absent(), - this.adjustmentTime = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - this.playbackStyle = const i0.Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required i2.AssetType type, - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.durationMs = const i0.Value.absent(), - required String id, - this.checksum = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - this.iCloudId = const i0.Value.absent(), - this.adjustmentTime = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - this.playbackStyle = const i0.Value.absent(), - }) : name = i0.Value(name), - type = i0.Value(type), - id = i0.Value(id); - static i0.Insertable custom({ - i0.Expression? name, - i0.Expression? type, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? width, - i0.Expression? height, - i0.Expression? durationMs, - i0.Expression? id, - i0.Expression? checksum, - i0.Expression? isFavorite, - i0.Expression? orientation, - i0.Expression? iCloudId, - i0.Expression? adjustmentTime, - i0.Expression? latitude, - i0.Expression? longitude, - i0.Expression? playbackStyle, - }) { - return i0.RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - i1.LocalAssetEntityCompanion copyWith({ - i0.Value? name, - i0.Value? type, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? width, - i0.Value? height, - i0.Value? durationMs, - i0.Value? id, - i0.Value? checksum, - i0.Value? isFavorite, - i0.Value? orientation, - i0.Value? iCloudId, - i0.Value? adjustmentTime, - i0.Value? latitude, - i0.Value? longitude, - i0.Value? playbackStyle, - }) { - return i1.LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (type.present) { - map['type'] = i0.Variable( - i1.$LocalAssetEntityTable.$convertertype.toSql(type.value), - ); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (width.present) { - map['width'] = i0.Variable(width.value); - } - if (height.present) { - map['height'] = i0.Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = i0.Variable(durationMs.value); - } - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (checksum.present) { - map['checksum'] = i0.Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = i0.Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = i0.Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = i0.Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = i0.Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = i0.Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = i0.Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = i0.Variable( - i1.$LocalAssetEntityTable.$converterplaybackStyle.toSql( - playbackStyle.value, - ), - ); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -i0.Index get idxLocalAssetCloudId => i0.Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', -); -i0.Index get idxLocalAssetCreatedAt => i0.Index( - 'idx_local_asset_created_at', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', -); diff --git a/mobile/lib/infrastructure/entities/log.entity.drift.dart b/mobile/lib/infrastructure/entities/log.entity.drift.dart deleted file mode 100644 index d04cd5b7a2..0000000000 --- a/mobile/lib/infrastructure/entities/log.entity.drift.dart +++ /dev/null @@ -1,697 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/log.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/log.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/log.entity.dart' as i3; - -typedef $$LogMessageEntityTableCreateCompanionBuilder = - i1.LogMessageEntityCompanion Function({ - i0.Value id, - required String message, - i0.Value details, - required i2.LogLevel level, - required DateTime createdAt, - i0.Value logger, - i0.Value stack, - }); -typedef $$LogMessageEntityTableUpdateCompanionBuilder = - i1.LogMessageEntityCompanion Function({ - i0.Value id, - i0.Value message, - i0.Value details, - i0.Value level, - i0.Value createdAt, - i0.Value logger, - i0.Value stack, - }); - -class $$LogMessageEntityTableFilterComposer - extends i0.Composer { - $$LogMessageEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get message => $composableBuilder( - column: $table.message, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get details => $composableBuilder( - column: $table.details, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters get level => - $composableBuilder( - column: $table.level, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get logger => $composableBuilder( - column: $table.logger, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get stack => $composableBuilder( - column: $table.stack, - builder: (column) => i0.ColumnFilters(column), - ); -} - -class $$LogMessageEntityTableOrderingComposer - extends i0.Composer { - $$LogMessageEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get message => $composableBuilder( - column: $table.message, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get details => $composableBuilder( - column: $table.details, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get level => $composableBuilder( - column: $table.level, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get logger => $composableBuilder( - column: $table.logger, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get stack => $composableBuilder( - column: $table.stack, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$LogMessageEntityTableAnnotationComposer - extends i0.Composer { - $$LogMessageEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get message => - $composableBuilder(column: $table.message, builder: (column) => column); - - i0.GeneratedColumn get details => - $composableBuilder(column: $table.details, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter get level => - $composableBuilder(column: $table.level, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get logger => - $composableBuilder(column: $table.logger, builder: (column) => column); - - i0.GeneratedColumn get stack => - $composableBuilder(column: $table.stack, builder: (column) => column); -} - -class $$LogMessageEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$LogMessageEntityTable, - i1.LogMessageEntityData, - i1.$$LogMessageEntityTableFilterComposer, - i1.$$LogMessageEntityTableOrderingComposer, - i1.$$LogMessageEntityTableAnnotationComposer, - $$LogMessageEntityTableCreateCompanionBuilder, - $$LogMessageEntityTableUpdateCompanionBuilder, - ( - i1.LogMessageEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LogMessageEntityTable, - i1.LogMessageEntityData - >, - ), - i1.LogMessageEntityData, - i0.PrefetchHooks Function() - > { - $$LogMessageEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$LogMessageEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$LogMessageEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$LogMessageEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$LogMessageEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value message = const i0.Value.absent(), - i0.Value details = const i0.Value.absent(), - i0.Value level = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value logger = const i0.Value.absent(), - i0.Value stack = const i0.Value.absent(), - }) => i1.LogMessageEntityCompanion( - id: id, - message: message, - details: details, - level: level, - createdAt: createdAt, - logger: logger, - stack: stack, - ), - createCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - required String message, - i0.Value details = const i0.Value.absent(), - required i2.LogLevel level, - required DateTime createdAt, - i0.Value logger = const i0.Value.absent(), - i0.Value stack = const i0.Value.absent(), - }) => i1.LogMessageEntityCompanion.insert( - id: id, - message: message, - details: details, - level: level, - createdAt: createdAt, - logger: logger, - stack: stack, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$LogMessageEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$LogMessageEntityTable, - i1.LogMessageEntityData, - i1.$$LogMessageEntityTableFilterComposer, - i1.$$LogMessageEntityTableOrderingComposer, - i1.$$LogMessageEntityTableAnnotationComposer, - $$LogMessageEntityTableCreateCompanionBuilder, - $$LogMessageEntityTableUpdateCompanionBuilder, - ( - i1.LogMessageEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$LogMessageEntityTable, - i1.LogMessageEntityData - >, - ), - i1.LogMessageEntityData, - i0.PrefetchHooks Function() - >; - -class $LogMessageEntityTable extends i3.LogMessageEntity - with i0.TableInfo<$LogMessageEntityTable, i1.LogMessageEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $LogMessageEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - hasAutoIncrement: true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'PRIMARY KEY AUTOINCREMENT', - ), - ); - static const i0.VerificationMeta _messageMeta = const i0.VerificationMeta( - 'message', - ); - @override - late final i0.GeneratedColumn message = i0.GeneratedColumn( - 'message', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _detailsMeta = const i0.VerificationMeta( - 'details', - ); - @override - late final i0.GeneratedColumn details = i0.GeneratedColumn( - 'details', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - late final i0.GeneratedColumnWithTypeConverter level = - i0.GeneratedColumn( - 'level', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter(i1.$LogMessageEntityTable.$converterlevel); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _loggerMeta = const i0.VerificationMeta( - 'logger', - ); - @override - late final i0.GeneratedColumn logger = i0.GeneratedColumn( - 'logger', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _stackMeta = const i0.VerificationMeta( - 'stack', - ); - @override - late final i0.GeneratedColumn stack = i0.GeneratedColumn( - 'stack', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - message, - details, - level, - createdAt, - logger, - stack, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'logger_messages'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } - if (data.containsKey('message')) { - context.handle( - _messageMeta, - message.isAcceptableOrUnknown(data['message']!, _messageMeta), - ); - } else if (isInserting) { - context.missing(_messageMeta); - } - if (data.containsKey('details')) { - context.handle( - _detailsMeta, - details.isAcceptableOrUnknown(data['details']!, _detailsMeta), - ); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } else if (isInserting) { - context.missing(_createdAtMeta); - } - if (data.containsKey('logger')) { - context.handle( - _loggerMeta, - logger.isAcceptableOrUnknown(data['logger']!, _loggerMeta), - ); - } - if (data.containsKey('stack')) { - context.handle( - _stackMeta, - stack.isAcceptableOrUnknown(data['stack']!, _stackMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.LogMessageEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.LogMessageEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - message: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}message'], - )!, - details: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}details'], - ), - level: i1.$LogMessageEntityTable.$converterlevel.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}level'], - )!, - ), - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - logger: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}logger'], - ), - stack: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}stack'], - ), - ); - } - - @override - $LogMessageEntityTable createAlias(String alias) { - return $LogMessageEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converterlevel = - const i0.EnumIndexConverter(i2.LogLevel.values); -} - -class LogMessageEntityData extends i0.DataClass - implements i0.Insertable { - final int id; - final String message; - final String? details; - final i2.LogLevel level; - final DateTime createdAt; - final String? logger; - final String? stack; - const LogMessageEntityData({ - required this.id, - required this.message, - this.details, - required this.level, - required this.createdAt, - this.logger, - this.stack, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['message'] = i0.Variable(message); - if (!nullToAbsent || details != null) { - map['details'] = i0.Variable(details); - } - { - map['level'] = i0.Variable( - i1.$LogMessageEntityTable.$converterlevel.toSql(level), - ); - } - map['created_at'] = i0.Variable(createdAt); - if (!nullToAbsent || logger != null) { - map['logger'] = i0.Variable(logger); - } - if (!nullToAbsent || stack != null) { - map['stack'] = i0.Variable(stack); - } - return map; - } - - factory LogMessageEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return LogMessageEntityData( - id: serializer.fromJson(json['id']), - message: serializer.fromJson(json['message']), - details: serializer.fromJson(json['details']), - level: i1.$LogMessageEntityTable.$converterlevel.fromJson( - serializer.fromJson(json['level']), - ), - createdAt: serializer.fromJson(json['createdAt']), - logger: serializer.fromJson(json['logger']), - stack: serializer.fromJson(json['stack']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'message': serializer.toJson(message), - 'details': serializer.toJson(details), - 'level': serializer.toJson( - i1.$LogMessageEntityTable.$converterlevel.toJson(level), - ), - 'createdAt': serializer.toJson(createdAt), - 'logger': serializer.toJson(logger), - 'stack': serializer.toJson(stack), - }; - } - - i1.LogMessageEntityData copyWith({ - int? id, - String? message, - i0.Value details = const i0.Value.absent(), - i2.LogLevel? level, - DateTime? createdAt, - i0.Value logger = const i0.Value.absent(), - i0.Value stack = const i0.Value.absent(), - }) => i1.LogMessageEntityData( - id: id ?? this.id, - message: message ?? this.message, - details: details.present ? details.value : this.details, - level: level ?? this.level, - createdAt: createdAt ?? this.createdAt, - logger: logger.present ? logger.value : this.logger, - stack: stack.present ? stack.value : this.stack, - ); - LogMessageEntityData copyWithCompanion(i1.LogMessageEntityCompanion data) { - return LogMessageEntityData( - id: data.id.present ? data.id.value : this.id, - message: data.message.present ? data.message.value : this.message, - details: data.details.present ? data.details.value : this.details, - level: data.level.present ? data.level.value : this.level, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - logger: data.logger.present ? data.logger.value : this.logger, - stack: data.stack.present ? data.stack.value : this.stack, - ); - } - - @override - String toString() { - return (StringBuffer('LogMessageEntityData(') - ..write('id: $id, ') - ..write('message: $message, ') - ..write('details: $details, ') - ..write('level: $level, ') - ..write('createdAt: $createdAt, ') - ..write('logger: $logger, ') - ..write('stack: $stack') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, message, details, level, createdAt, logger, stack); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.LogMessageEntityData && - other.id == this.id && - other.message == this.message && - other.details == this.details && - other.level == this.level && - other.createdAt == this.createdAt && - other.logger == this.logger && - other.stack == this.stack); -} - -class LogMessageEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value message; - final i0.Value details; - final i0.Value level; - final i0.Value createdAt; - final i0.Value logger; - final i0.Value stack; - const LogMessageEntityCompanion({ - this.id = const i0.Value.absent(), - this.message = const i0.Value.absent(), - this.details = const i0.Value.absent(), - this.level = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.logger = const i0.Value.absent(), - this.stack = const i0.Value.absent(), - }); - LogMessageEntityCompanion.insert({ - this.id = const i0.Value.absent(), - required String message, - this.details = const i0.Value.absent(), - required i2.LogLevel level, - required DateTime createdAt, - this.logger = const i0.Value.absent(), - this.stack = const i0.Value.absent(), - }) : message = i0.Value(message), - level = i0.Value(level), - createdAt = i0.Value(createdAt); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? message, - i0.Expression? details, - i0.Expression? level, - i0.Expression? createdAt, - i0.Expression? logger, - i0.Expression? stack, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (message != null) 'message': message, - if (details != null) 'details': details, - if (level != null) 'level': level, - if (createdAt != null) 'created_at': createdAt, - if (logger != null) 'logger': logger, - if (stack != null) 'stack': stack, - }); - } - - i1.LogMessageEntityCompanion copyWith({ - i0.Value? id, - i0.Value? message, - i0.Value? details, - i0.Value? level, - i0.Value? createdAt, - i0.Value? logger, - i0.Value? stack, - }) { - return i1.LogMessageEntityCompanion( - id: id ?? this.id, - message: message ?? this.message, - details: details ?? this.details, - level: level ?? this.level, - createdAt: createdAt ?? this.createdAt, - logger: logger ?? this.logger, - stack: stack ?? this.stack, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (message.present) { - map['message'] = i0.Variable(message.value); - } - if (details.present) { - map['details'] = i0.Variable(details.value); - } - if (level.present) { - map['level'] = i0.Variable( - i1.$LogMessageEntityTable.$converterlevel.toSql(level.value), - ); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (logger.present) { - map['logger'] = i0.Variable(logger.value); - } - if (stack.present) { - map['stack'] = i0.Variable(stack.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LogMessageEntityCompanion(') - ..write('id: $id, ') - ..write('message: $message, ') - ..write('details: $details, ') - ..write('level: $level, ') - ..write('createdAt: $createdAt, ') - ..write('logger: $logger, ') - ..write('stack: $stack') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/memory.entity.drift.dart b/mobile/lib/infrastructure/entities/memory.entity.drift.dart deleted file mode 100644 index 67da03509a..0000000000 --- a/mobile/lib/infrastructure/entities/memory.entity.drift.dart +++ /dev/null @@ -1,1170 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/memory.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/memory.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/memory.entity.dart' as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$MemoryEntityTableCreateCompanionBuilder = - i1.MemoryEntityCompanion Function({ - required String id, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value deletedAt, - required String ownerId, - required i2.MemoryTypeEnum type, - required String data, - i0.Value isSaved, - required DateTime memoryAt, - i0.Value seenAt, - i0.Value showAt, - i0.Value hideAt, - }); -typedef $$MemoryEntityTableUpdateCompanionBuilder = - i1.MemoryEntityCompanion Function({ - i0.Value id, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value deletedAt, - i0.Value ownerId, - i0.Value type, - i0.Value data, - i0.Value isSaved, - i0.Value memoryAt, - i0.Value seenAt, - i0.Value showAt, - i0.Value hideAt, - }); - -final class $$MemoryEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$MemoryEntityTable, - i1.MemoryEntityData - > { - $$MemoryEntityTableReferences(super.$_db, super.$_table, super.$_typedResult); - - static i5.$UserEntityTable _ownerIdTable(i0.GeneratedDatabase db) => - i6.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias('memory_entity__owner_id__user_entity__id'); - - i5.$$UserEntityTableProcessedTableManager get ownerId { - final $_column = $_itemColumn('owner_id')!; - - final manager = i5 - .$$UserEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_ownerIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$MemoryEntityTableFilterComposer - extends i0.Composer { - $$MemoryEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get type => $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get data => $composableBuilder( - column: $table.data, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isSaved => $composableBuilder( - column: $table.isSaved, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get memoryAt => $composableBuilder( - column: $table.memoryAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get seenAt => $composableBuilder( - column: $table.seenAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get showAt => $composableBuilder( - column: $table.showAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get hideAt => $composableBuilder( - column: $table.hideAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i5.$$UserEntityTableFilterComposer get ownerId { - final i5.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryEntityTableOrderingComposer - extends i0.Composer { - $$MemoryEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get type => $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get data => $composableBuilder( - column: $table.data, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isSaved => $composableBuilder( - column: $table.isSaved, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get memoryAt => $composableBuilder( - column: $table.memoryAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get seenAt => $composableBuilder( - column: $table.seenAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get showAt => $composableBuilder( - column: $table.showAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get hideAt => $composableBuilder( - column: $table.hideAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$UserEntityTableOrderingComposer get ownerId { - final i5.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryEntityTableAnnotationComposer - extends i0.Composer { - $$MemoryEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); - - i0.GeneratedColumn get deletedAt => - $composableBuilder(column: $table.deletedAt, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter get type => - $composableBuilder(column: $table.type, builder: (column) => column); - - i0.GeneratedColumn get data => - $composableBuilder(column: $table.data, builder: (column) => column); - - i0.GeneratedColumn get isSaved => - $composableBuilder(column: $table.isSaved, builder: (column) => column); - - i0.GeneratedColumn get memoryAt => - $composableBuilder(column: $table.memoryAt, builder: (column) => column); - - i0.GeneratedColumn get seenAt => - $composableBuilder(column: $table.seenAt, builder: (column) => column); - - i0.GeneratedColumn get showAt => - $composableBuilder(column: $table.showAt, builder: (column) => column); - - i0.GeneratedColumn get hideAt => - $composableBuilder(column: $table.hideAt, builder: (column) => column); - - i5.$$UserEntityTableAnnotationComposer get ownerId { - final i5.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$MemoryEntityTable, - i1.MemoryEntityData, - i1.$$MemoryEntityTableFilterComposer, - i1.$$MemoryEntityTableOrderingComposer, - i1.$$MemoryEntityTableAnnotationComposer, - $$MemoryEntityTableCreateCompanionBuilder, - $$MemoryEntityTableUpdateCompanionBuilder, - (i1.MemoryEntityData, i1.$$MemoryEntityTableReferences), - i1.MemoryEntityData, - i0.PrefetchHooks Function({bool ownerId}) - > { - $$MemoryEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$MemoryEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$MemoryEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$MemoryEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$MemoryEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - i0.Value ownerId = const i0.Value.absent(), - i0.Value type = const i0.Value.absent(), - i0.Value data = const i0.Value.absent(), - i0.Value isSaved = const i0.Value.absent(), - i0.Value memoryAt = const i0.Value.absent(), - i0.Value seenAt = const i0.Value.absent(), - i0.Value showAt = const i0.Value.absent(), - i0.Value hideAt = const i0.Value.absent(), - }) => i1.MemoryEntityCompanion( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - deletedAt: deletedAt, - ownerId: ownerId, - type: type, - data: data, - isSaved: isSaved, - memoryAt: memoryAt, - seenAt: seenAt, - showAt: showAt, - hideAt: hideAt, - ), - createCompanionCallback: - ({ - required String id, - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - required String ownerId, - required i2.MemoryTypeEnum type, - required String data, - i0.Value isSaved = const i0.Value.absent(), - required DateTime memoryAt, - i0.Value seenAt = const i0.Value.absent(), - i0.Value showAt = const i0.Value.absent(), - i0.Value hideAt = const i0.Value.absent(), - }) => i1.MemoryEntityCompanion.insert( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - deletedAt: deletedAt, - ownerId: ownerId, - type: type, - data: data, - isSaved: isSaved, - memoryAt: memoryAt, - seenAt: seenAt, - showAt: showAt, - hideAt: hideAt, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$MemoryEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({ownerId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (ownerId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.ownerId, - referencedTable: i1 - .$$MemoryEntityTableReferences - ._ownerIdTable(db), - referencedColumn: i1 - .$$MemoryEntityTableReferences - ._ownerIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$MemoryEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$MemoryEntityTable, - i1.MemoryEntityData, - i1.$$MemoryEntityTableFilterComposer, - i1.$$MemoryEntityTableOrderingComposer, - i1.$$MemoryEntityTableAnnotationComposer, - $$MemoryEntityTableCreateCompanionBuilder, - $$MemoryEntityTableUpdateCompanionBuilder, - (i1.MemoryEntityData, i1.$$MemoryEntityTableReferences), - i1.MemoryEntityData, - i0.PrefetchHooks Function({bool ownerId}) - >; - -class $MemoryEntityTable extends i3.MemoryEntity - with i0.TableInfo<$MemoryEntityTable, i1.MemoryEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $MemoryEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( - 'updatedAt', - ); - @override - late final i0.GeneratedColumn updatedAt = - i0.GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _deletedAtMeta = const i0.VerificationMeta( - 'deletedAt', - ); - @override - late final i0.GeneratedColumn deletedAt = - i0.GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _ownerIdMeta = const i0.VerificationMeta( - 'ownerId', - ); - @override - late final i0.GeneratedColumn ownerId = i0.GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - @override - late final i0.GeneratedColumnWithTypeConverter type = - i0.GeneratedColumn( - 'type', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter(i1.$MemoryEntityTable.$convertertype); - static const i0.VerificationMeta _dataMeta = const i0.VerificationMeta( - 'data', - ); - @override - late final i0.GeneratedColumn data = i0.GeneratedColumn( - 'data', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _isSavedMeta = const i0.VerificationMeta( - 'isSaved', - ); - @override - late final i0.GeneratedColumn isSaved = i0.GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _memoryAtMeta = const i0.VerificationMeta( - 'memoryAt', - ); - @override - late final i0.GeneratedColumn memoryAt = - i0.GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _seenAtMeta = const i0.VerificationMeta( - 'seenAt', - ); - @override - late final i0.GeneratedColumn seenAt = i0.GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _showAtMeta = const i0.VerificationMeta( - 'showAt', - ); - @override - late final i0.GeneratedColumn showAt = i0.GeneratedColumn( - 'show_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _hideAtMeta = const i0.VerificationMeta( - 'hideAt', - ); - @override - late final i0.GeneratedColumn hideAt = i0.GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - if (data.containsKey('deleted_at')) { - context.handle( - _deletedAtMeta, - deletedAt.isAcceptableOrUnknown(data['deleted_at']!, _deletedAtMeta), - ); - } - if (data.containsKey('owner_id')) { - context.handle( - _ownerIdMeta, - ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta), - ); - } else if (isInserting) { - context.missing(_ownerIdMeta); - } - if (data.containsKey('data')) { - context.handle( - _dataMeta, - this.data.isAcceptableOrUnknown(data['data']!, _dataMeta), - ); - } else if (isInserting) { - context.missing(_dataMeta); - } - if (data.containsKey('is_saved')) { - context.handle( - _isSavedMeta, - isSaved.isAcceptableOrUnknown(data['is_saved']!, _isSavedMeta), - ); - } - if (data.containsKey('memory_at')) { - context.handle( - _memoryAtMeta, - memoryAt.isAcceptableOrUnknown(data['memory_at']!, _memoryAtMeta), - ); - } else if (isInserting) { - context.missing(_memoryAtMeta); - } - if (data.containsKey('seen_at')) { - context.handle( - _seenAtMeta, - seenAt.isAcceptableOrUnknown(data['seen_at']!, _seenAtMeta), - ); - } - if (data.containsKey('show_at')) { - context.handle( - _showAtMeta, - showAt.isAcceptableOrUnknown(data['show_at']!, _showAtMeta), - ); - } - if (data.containsKey('hide_at')) { - context.handle( - _hideAtMeta, - hideAt.isAcceptableOrUnknown(data['hide_at']!, _hideAtMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.MemoryEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: i1.$MemoryEntityTable.$convertertype.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - ), - data: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - $MemoryEntityTable createAlias(String alias) { - return $MemoryEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $convertertype = - const i0.EnumIndexConverter(i2.MemoryTypeEnum.values); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final i2.MemoryTypeEnum type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = i0.Variable(deletedAt); - } - map['owner_id'] = i0.Variable(ownerId); - { - map['type'] = i0.Variable( - i1.$MemoryEntityTable.$convertertype.toSql(type), - ); - } - map['data'] = i0.Variable(data); - map['is_saved'] = i0.Variable(isSaved); - map['memory_at'] = i0.Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = i0.Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = i0.Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = i0.Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: i1.$MemoryEntityTable.$convertertype.fromJson( - serializer.fromJson(json['type']), - ), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson( - i1.$MemoryEntityTable.$convertertype.toJson(type), - ), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - i1.MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - i0.Value deletedAt = const i0.Value.absent(), - String? ownerId, - i2.MemoryTypeEnum? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - i0.Value seenAt = const i0.Value.absent(), - i0.Value showAt = const i0.Value.absent(), - i0.Value hideAt = const i0.Value.absent(), - }) => i1.MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(i1.MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value deletedAt; - final i0.Value ownerId; - final i0.Value type; - final i0.Value data; - final i0.Value isSaved; - final i0.Value memoryAt; - final i0.Value seenAt; - final i0.Value showAt; - final i0.Value hideAt; - const MemoryEntityCompanion({ - this.id = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - this.ownerId = const i0.Value.absent(), - this.type = const i0.Value.absent(), - this.data = const i0.Value.absent(), - this.isSaved = const i0.Value.absent(), - this.memoryAt = const i0.Value.absent(), - this.seenAt = const i0.Value.absent(), - this.showAt = const i0.Value.absent(), - this.hideAt = const i0.Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - required String ownerId, - required i2.MemoryTypeEnum type, - required String data, - this.isSaved = const i0.Value.absent(), - required DateTime memoryAt, - this.seenAt = const i0.Value.absent(), - this.showAt = const i0.Value.absent(), - this.hideAt = const i0.Value.absent(), - }) : id = i0.Value(id), - ownerId = i0.Value(ownerId), - type = i0.Value(type), - data = i0.Value(data), - memoryAt = i0.Value(memoryAt); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? deletedAt, - i0.Expression? ownerId, - i0.Expression? type, - i0.Expression? data, - i0.Expression? isSaved, - i0.Expression? memoryAt, - i0.Expression? seenAt, - i0.Expression? showAt, - i0.Expression? hideAt, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - i1.MemoryEntityCompanion copyWith({ - i0.Value? id, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? deletedAt, - i0.Value? ownerId, - i0.Value? type, - i0.Value? data, - i0.Value? isSaved, - i0.Value? memoryAt, - i0.Value? seenAt, - i0.Value? showAt, - i0.Value? hideAt, - }) { - return i1.MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = i0.Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = i0.Variable(ownerId.value); - } - if (type.present) { - map['type'] = i0.Variable( - i1.$MemoryEntityTable.$convertertype.toSql(type.value), - ); - } - if (data.present) { - map['data'] = i0.Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = i0.Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = i0.Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = i0.Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = i0.Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = i0.Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/memory_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/memory_asset.entity.drift.dart deleted file mode 100644 index a42384ac76..0000000000 --- a/mobile/lib/infrastructure/entities/memory_asset.entity.drift.dart +++ /dev/null @@ -1,625 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/memory_asset.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/memory_asset.entity.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/memory.entity.drift.dart' - as i5; - -typedef $$MemoryAssetEntityTableCreateCompanionBuilder = - i1.MemoryAssetEntityCompanion Function({ - required String assetId, - required String memoryId, - }); -typedef $$MemoryAssetEntityTableUpdateCompanionBuilder = - i1.MemoryAssetEntityCompanion Function({ - i0.Value assetId, - i0.Value memoryId, - }); - -final class $$MemoryAssetEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$MemoryAssetEntityTable, - i1.MemoryAssetEntityData - > { - $$MemoryAssetEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - 'memory_asset_entity__asset_id__remote_asset_entity__id', - ); - - i3.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$RemoteAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i5.$MemoryEntityTable _memoryIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('memory_entity') - .createAlias('memory_asset_entity__memory_id__memory_entity__id'); - - i5.$$MemoryEntityTableProcessedTableManager get memoryId { - final $_column = $_itemColumn('memory_id')!; - - final manager = i5 - .$$MemoryEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('memory_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_memoryIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$MemoryAssetEntityTableFilterComposer - extends i0.Composer { - $$MemoryAssetEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableFilterComposer get assetId { - final i3.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$MemoryEntityTableFilterComposer get memoryId { - final i5.$$MemoryEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.memoryId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$MemoryEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryAssetEntityTableOrderingComposer - extends i0.Composer { - $$MemoryAssetEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i3.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$MemoryEntityTableOrderingComposer get memoryId { - final i5.$$MemoryEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.memoryId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$MemoryEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryAssetEntityTableAnnotationComposer - extends i0.Composer { - $$MemoryAssetEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i3.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$MemoryEntityTableAnnotationComposer get memoryId { - final i5.$$MemoryEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.memoryId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$MemoryEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('memory_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$MemoryAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$MemoryAssetEntityTable, - i1.MemoryAssetEntityData, - i1.$$MemoryAssetEntityTableFilterComposer, - i1.$$MemoryAssetEntityTableOrderingComposer, - i1.$$MemoryAssetEntityTableAnnotationComposer, - $$MemoryAssetEntityTableCreateCompanionBuilder, - $$MemoryAssetEntityTableUpdateCompanionBuilder, - (i1.MemoryAssetEntityData, i1.$$MemoryAssetEntityTableReferences), - i1.MemoryAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool memoryId}) - > { - $$MemoryAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$MemoryAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$MemoryAssetEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$MemoryAssetEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$MemoryAssetEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value memoryId = const i0.Value.absent(), - }) => i1.MemoryAssetEntityCompanion( - assetId: assetId, - memoryId: memoryId, - ), - createCompanionCallback: - ({required String assetId, required String memoryId}) => - i1.MemoryAssetEntityCompanion.insert( - assetId: assetId, - memoryId: memoryId, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$MemoryAssetEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false, memoryId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$MemoryAssetEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$MemoryAssetEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - if (memoryId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.memoryId, - referencedTable: i1 - .$$MemoryAssetEntityTableReferences - ._memoryIdTable(db), - referencedColumn: i1 - .$$MemoryAssetEntityTableReferences - ._memoryIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$MemoryAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$MemoryAssetEntityTable, - i1.MemoryAssetEntityData, - i1.$$MemoryAssetEntityTableFilterComposer, - i1.$$MemoryAssetEntityTableOrderingComposer, - i1.$$MemoryAssetEntityTableAnnotationComposer, - $$MemoryAssetEntityTableCreateCompanionBuilder, - $$MemoryAssetEntityTableUpdateCompanionBuilder, - (i1.MemoryAssetEntityData, i1.$$MemoryAssetEntityTableReferences), - i1.MemoryAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool memoryId}) - >; - -class $MemoryAssetEntityTable extends i2.MemoryAssetEntity - with i0.TableInfo<$MemoryAssetEntityTable, i1.MemoryAssetEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $MemoryAssetEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _memoryIdMeta = const i0.VerificationMeta( - 'memoryId', - ); - @override - late final i0.GeneratedColumn memoryId = i0.GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('memory_id')) { - context.handle( - _memoryIdMeta, - memoryId.isAcceptableOrUnknown(data['memory_id']!, _memoryIdMeta), - ); - } else if (isInserting) { - context.missing(_memoryIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {assetId, memoryId}; - @override - i1.MemoryAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - $MemoryAssetEntityTable createAlias(String alias) { - return $MemoryAssetEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends i0.DataClass - implements i0.Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = i0.Variable(assetId); - map['memory_id'] = i0.Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - i1.MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - i1.MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(i1.MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.memoryId = const i0.Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = i0.Value(assetId), - memoryId = i0.Value(memoryId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? memoryId, - }) { - return i0.RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - i1.MemoryAssetEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? memoryId, - }) { - return i1.MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = i0.Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/merged_asset.drift.dart b/mobile/lib/infrastructure/entities/merged_asset.drift.dart deleted file mode 100644 index 2d05ef6ceb..0000000000 --- a/mobile/lib/infrastructure/entities/merged_asset.drift.dart +++ /dev/null @@ -1,179 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:drift/internal/modular.dart' as i1; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart' - as i3; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i4; -import 'package:immich_mobile/infrastructure/entities/stack.entity.drift.dart' - as i5; -import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.drift.dart' - as i6; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart' - as i7; - -class MergedAssetDrift extends i1.ModularAccessor { - MergedAssetDrift(i0.GeneratedDatabase db) : super(db); - i0.Selectable mergedAsset({ - required List userIds, - required MergedAsset$limit limit, - }) { - var $arrayStartIndex = 1; - final expandeduserIds = $expandVar($arrayStartIndex, userIds.length); - $arrayStartIndex += userIds.length; - final generatedlimit = $write( - limit(alias(this.localAssetEntity, 'lae')), - startIndex: $arrayStartIndex, - ); - $arrayStartIndex += generatedlimit.amountOfVariables; - return customSelect( - 'SELECT rae.id AS remote_id, (SELECT lae.id FROM local_asset_entity AS lae WHERE lae.checksum = rae.checksum LIMIT 1) AS local_id, rae.name, rae.type, rae.created_at AS created_at, rae.updated_at, rae.width, rae.height, rae.duration_ms, rae.is_favorite, rae.thumb_hash, rae.checksum, rae.owner_id, rae.live_photo_video_id, 0 AS orientation, rae.stack_id, NULL AS i_cloud_id, NULL AS latitude, NULL AS longitude, NULL AS adjustmentTime, rae.is_edited, 0 AS playback_style, rae.uploaded_at FROM remote_asset_entity AS rae LEFT JOIN stack_entity AS se ON rae.stack_id = se.id WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandeduserIds) AND(rae.stack_id IS NULL OR rae.id = se.primary_asset_id)UNION ALL SELECT NULL AS remote_id, lae.id AS local_id, lae.name, lae.type, lae.created_at AS created_at, lae.updated_at, lae.width, lae.height, lae.duration_ms, lae.is_favorite, NULL AS thumb_hash, lae.checksum, NULL AS owner_id, NULL AS live_photo_video_id, lae.orientation, NULL AS stack_id, lae.i_cloud_id, lae.latitude, lae.longitude, lae.adjustment_time, 0 AS is_edited, lae.playback_style, NULL AS uploaded_at FROM local_asset_entity AS lae WHERE NOT EXISTS (SELECT 1 FROM remote_asset_entity AS rae WHERE rae.checksum = lae.checksum AND rae.owner_id IN ($expandeduserIds)) AND EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 0) AND NOT EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 2) ORDER BY created_at DESC ${generatedlimit.sql}', - variables: [ - for (var $ in userIds) i0.Variable($), - ...generatedlimit.introducedVariables, - ], - readsFrom: { - remoteAssetEntity, - localAssetEntity, - stackEntity, - localAlbumAssetEntity, - localAlbumEntity, - ...generatedlimit.watchedTables, - }, - ).map( - (i0.QueryRow row) => MergedAssetResult( - remoteId: row.readNullable('remote_id'), - localId: row.readNullable('local_id'), - name: row.read('name'), - type: i4.$RemoteAssetEntityTable.$convertertype.fromSql( - row.read('type'), - ), - createdAt: row.read('created_at'), - updatedAt: row.read('updated_at'), - width: row.readNullable('width'), - height: row.readNullable('height'), - durationMs: row.readNullable('duration_ms'), - isFavorite: row.read('is_favorite'), - thumbHash: row.readNullable('thumb_hash'), - checksum: row.readNullable('checksum'), - ownerId: row.readNullable('owner_id'), - livePhotoVideoId: row.readNullable('live_photo_video_id'), - orientation: row.read('orientation'), - stackId: row.readNullable('stack_id'), - iCloudId: row.readNullable('i_cloud_id'), - latitude: row.readNullable('latitude'), - longitude: row.readNullable('longitude'), - adjustmentTime: row.readNullable('adjustmentTime'), - isEdited: row.read('is_edited'), - playbackStyle: row.read('playback_style'), - uploadedAt: row.readNullable('uploaded_at'), - ), - ); - } - - i0.Selectable mergedBucket({ - required int groupBy, - required List userIds, - }) { - var $arrayStartIndex = 2; - final expandeduserIds = $expandVar($arrayStartIndex, userIds.length); - $arrayStartIndex += userIds.length; - return customSelect( - 'SELECT COUNT(*) AS asset_count, bucket_date FROM (SELECT CASE WHEN ?1 = 0 THEN COALESCE(STRFTIME(\'%Y-%m-%d\', rae.local_date_time), STRFTIME(\'%Y-%m-%d\', rae.created_at, \'localtime\')) WHEN ?1 = 1 THEN COALESCE(STRFTIME(\'%Y-%m\', rae.local_date_time), STRFTIME(\'%Y-%m\', rae.created_at, \'localtime\')) END AS bucket_date FROM remote_asset_entity AS rae LEFT JOIN stack_entity AS se ON rae.stack_id = se.id WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandeduserIds) AND(rae.stack_id IS NULL OR rae.id = se.primary_asset_id)UNION ALL SELECT CASE WHEN ?1 = 0 THEN STRFTIME(\'%Y-%m-%d\', lae.created_at, \'localtime\') WHEN ?1 = 1 THEN STRFTIME(\'%Y-%m\', lae.created_at, \'localtime\') END AS bucket_date FROM local_asset_entity AS lae WHERE NOT EXISTS (SELECT 1 FROM remote_asset_entity AS rae WHERE rae.checksum = lae.checksum AND rae.owner_id IN ($expandeduserIds)) AND EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 0) AND NOT EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 2)) GROUP BY bucket_date ORDER BY bucket_date DESC', - variables: [ - i0.Variable(groupBy), - for (var $ in userIds) i0.Variable($), - ], - readsFrom: { - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumAssetEntity, - localAlbumEntity, - }, - ).map( - (i0.QueryRow row) => MergedBucketResult( - assetCount: row.read('asset_count'), - bucketDate: row.read('bucket_date'), - ), - ); - } - - i4.$RemoteAssetEntityTable get remoteAssetEntity => i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('remote_asset_entity'); - i5.$StackEntityTable get stackEntity => i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('stack_entity'); - i3.$LocalAssetEntityTable get localAssetEntity => i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('local_asset_entity'); - i6.$LocalAlbumAssetEntityTable get localAlbumAssetEntity => - i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('local_album_asset_entity'); - i7.$LocalAlbumEntityTable get localAlbumEntity => i1.ReadDatabaseContainer( - attachedDatabase, - ).resultSet('local_album_entity'); -} - -class MergedAssetResult { - final String? remoteId; - final String? localId; - final String name; - final i2.AssetType type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationMs; - final bool isFavorite; - final String? thumbHash; - final String? checksum; - final String? ownerId; - final String? livePhotoVideoId; - final int orientation; - final String? stackId; - final String? iCloudId; - final double? latitude; - final double? longitude; - final DateTime? adjustmentTime; - final bool isEdited; - final int playbackStyle; - final DateTime? uploadedAt; - MergedAssetResult({ - this.remoteId, - this.localId, - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.isFavorite, - this.thumbHash, - this.checksum, - this.ownerId, - this.livePhotoVideoId, - required this.orientation, - this.stackId, - this.iCloudId, - this.latitude, - this.longitude, - this.adjustmentTime, - required this.isEdited, - required this.playbackStyle, - this.uploadedAt, - }); -} - -typedef MergedAsset$limit = i0.Limit Function(i3.$LocalAssetEntityTable lae); - -class MergedBucketResult { - final int assetCount; - final String bucketDate; - MergedBucketResult({required this.assetCount, required this.bucketDate}); -} diff --git a/mobile/lib/infrastructure/entities/partner.entity.drift.dart b/mobile/lib/infrastructure/entities/partner.entity.drift.dart deleted file mode 100644 index ef1735cb97..0000000000 --- a/mobile/lib/infrastructure/entities/partner.entity.drift.dart +++ /dev/null @@ -1,707 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/partner.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/partner.entity.dart' - as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; - -typedef $$PartnerEntityTableCreateCompanionBuilder = - i1.PartnerEntityCompanion Function({ - required String sharedById, - required String sharedWithId, - i0.Value inTimeline, - }); -typedef $$PartnerEntityTableUpdateCompanionBuilder = - i1.PartnerEntityCompanion Function({ - i0.Value sharedById, - i0.Value sharedWithId, - i0.Value inTimeline, - }); - -final class $$PartnerEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$PartnerEntityTable, - i1.PartnerEntityData - > { - $$PartnerEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i4.$UserEntityTable _sharedByIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias('partner_entity__shared_by_id__user_entity__id'); - - i4.$$UserEntityTableProcessedTableManager get sharedById { - final $_column = $_itemColumn('shared_by_id')!; - - final manager = i4 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_sharedByIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i4.$UserEntityTable _sharedWithIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias('partner_entity__shared_with_id__user_entity__id'); - - i4.$$UserEntityTableProcessedTableManager get sharedWithId { - final $_column = $_itemColumn('shared_with_id')!; - - final manager = i4 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_sharedWithIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$PartnerEntityTableFilterComposer - extends i0.Composer { - $$PartnerEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get inTimeline => $composableBuilder( - column: $table.inTimeline, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$UserEntityTableFilterComposer get sharedById { - final i4.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedById, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i4.$$UserEntityTableFilterComposer get sharedWithId { - final i4.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedWithId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PartnerEntityTableOrderingComposer - extends i0.Composer { - $$PartnerEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get inTimeline => $composableBuilder( - column: $table.inTimeline, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$UserEntityTableOrderingComposer get sharedById { - final i4.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedById, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i4.$$UserEntityTableOrderingComposer get sharedWithId { - final i4.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedWithId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PartnerEntityTableAnnotationComposer - extends i0.Composer { - $$PartnerEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get inTimeline => $composableBuilder( - column: $table.inTimeline, - builder: (column) => column, - ); - - i4.$$UserEntityTableAnnotationComposer get sharedById { - final i4.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedById, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i4.$$UserEntityTableAnnotationComposer get sharedWithId { - final i4.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.sharedWithId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PartnerEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$PartnerEntityTable, - i1.PartnerEntityData, - i1.$$PartnerEntityTableFilterComposer, - i1.$$PartnerEntityTableOrderingComposer, - i1.$$PartnerEntityTableAnnotationComposer, - $$PartnerEntityTableCreateCompanionBuilder, - $$PartnerEntityTableUpdateCompanionBuilder, - (i1.PartnerEntityData, i1.$$PartnerEntityTableReferences), - i1.PartnerEntityData, - i0.PrefetchHooks Function({bool sharedById, bool sharedWithId}) - > { - $$PartnerEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$PartnerEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$PartnerEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$PartnerEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$PartnerEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value sharedById = const i0.Value.absent(), - i0.Value sharedWithId = const i0.Value.absent(), - i0.Value inTimeline = const i0.Value.absent(), - }) => i1.PartnerEntityCompanion( - sharedById: sharedById, - sharedWithId: sharedWithId, - inTimeline: inTimeline, - ), - createCompanionCallback: - ({ - required String sharedById, - required String sharedWithId, - i0.Value inTimeline = const i0.Value.absent(), - }) => i1.PartnerEntityCompanion.insert( - sharedById: sharedById, - sharedWithId: sharedWithId, - inTimeline: inTimeline, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$PartnerEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({sharedById = false, sharedWithId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (sharedById) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.sharedById, - referencedTable: i1 - .$$PartnerEntityTableReferences - ._sharedByIdTable(db), - referencedColumn: i1 - .$$PartnerEntityTableReferences - ._sharedByIdTable(db) - .id, - ) - as T; - } - if (sharedWithId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.sharedWithId, - referencedTable: i1 - .$$PartnerEntityTableReferences - ._sharedWithIdTable(db), - referencedColumn: i1 - .$$PartnerEntityTableReferences - ._sharedWithIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$PartnerEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$PartnerEntityTable, - i1.PartnerEntityData, - i1.$$PartnerEntityTableFilterComposer, - i1.$$PartnerEntityTableOrderingComposer, - i1.$$PartnerEntityTableAnnotationComposer, - $$PartnerEntityTableCreateCompanionBuilder, - $$PartnerEntityTableUpdateCompanionBuilder, - (i1.PartnerEntityData, i1.$$PartnerEntityTableReferences), - i1.PartnerEntityData, - i0.PrefetchHooks Function({bool sharedById, bool sharedWithId}) - >; -i0.Index get idxPartnerSharedWithId => i0.Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', -); - -class $PartnerEntityTable extends i2.PartnerEntity - with i0.TableInfo<$PartnerEntityTable, i1.PartnerEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $PartnerEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _sharedByIdMeta = const i0.VerificationMeta( - 'sharedById', - ); - @override - late final i0.GeneratedColumn sharedById = i0.GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _sharedWithIdMeta = - const i0.VerificationMeta('sharedWithId'); - @override - late final i0.GeneratedColumn sharedWithId = - i0.GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _inTimelineMeta = const i0.VerificationMeta( - 'inTimeline', - ); - @override - late final i0.GeneratedColumn inTimeline = i0.GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const i3.Constant(false), - ); - @override - List get $columns => [ - sharedById, - sharedWithId, - inTimeline, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('shared_by_id')) { - context.handle( - _sharedByIdMeta, - sharedById.isAcceptableOrUnknown( - data['shared_by_id']!, - _sharedByIdMeta, - ), - ); - } else if (isInserting) { - context.missing(_sharedByIdMeta); - } - if (data.containsKey('shared_with_id')) { - context.handle( - _sharedWithIdMeta, - sharedWithId.isAcceptableOrUnknown( - data['shared_with_id']!, - _sharedWithIdMeta, - ), - ); - } else if (isInserting) { - context.missing(_sharedWithIdMeta); - } - if (data.containsKey('in_timeline')) { - context.handle( - _inTimelineMeta, - inTimeline.isAcceptableOrUnknown(data['in_timeline']!, _inTimelineMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - i1.PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - $PartnerEntityTable createAlias(String alias) { - return $PartnerEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends i0.DataClass - implements i0.Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = i0.Variable(sharedById); - map['shared_with_id'] = i0.Variable(sharedWithId); - map['in_timeline'] = i0.Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - i1.PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => i1.PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(i1.PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends i0.UpdateCompanion { - final i0.Value sharedById; - final i0.Value sharedWithId; - final i0.Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const i0.Value.absent(), - this.sharedWithId = const i0.Value.absent(), - this.inTimeline = const i0.Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const i0.Value.absent(), - }) : sharedById = i0.Value(sharedById), - sharedWithId = i0.Value(sharedWithId); - static i0.Insertable custom({ - i0.Expression? sharedById, - i0.Expression? sharedWithId, - i0.Expression? inTimeline, - }) { - return i0.RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - i1.PartnerEntityCompanion copyWith({ - i0.Value? sharedById, - i0.Value? sharedWithId, - i0.Value? inTimeline, - }) { - return i1.PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = i0.Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = i0.Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = i0.Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/person.entity.drift.dart b/mobile/lib/infrastructure/entities/person.entity.drift.dart deleted file mode 100644 index f042c4d322..0000000000 --- a/mobile/lib/infrastructure/entities/person.entity.drift.dart +++ /dev/null @@ -1,1053 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/person.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/person.entity.dart' as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; - -typedef $$PersonEntityTableCreateCompanionBuilder = - i1.PersonEntityCompanion Function({ - required String id, - i0.Value createdAt, - i0.Value updatedAt, - required String ownerId, - required String name, - i0.Value faceAssetId, - required bool isFavorite, - required bool isHidden, - i0.Value color, - i0.Value birthDate, - }); -typedef $$PersonEntityTableUpdateCompanionBuilder = - i1.PersonEntityCompanion Function({ - i0.Value id, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value ownerId, - i0.Value name, - i0.Value faceAssetId, - i0.Value isFavorite, - i0.Value isHidden, - i0.Value color, - i0.Value birthDate, - }); - -final class $$PersonEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$PersonEntityTable, - i1.PersonEntityData - > { - $$PersonEntityTableReferences(super.$_db, super.$_table, super.$_typedResult); - - static i4.$UserEntityTable _ownerIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias('person_entity__owner_id__user_entity__id'); - - i4.$$UserEntityTableProcessedTableManager get ownerId { - final $_column = $_itemColumn('owner_id')!; - - final manager = i4 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_ownerIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$PersonEntityTableFilterComposer - extends i0.Composer { - $$PersonEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get faceAssetId => $composableBuilder( - column: $table.faceAssetId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isHidden => $composableBuilder( - column: $table.isHidden, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get color => $composableBuilder( - column: $table.color, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get birthDate => $composableBuilder( - column: $table.birthDate, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$UserEntityTableFilterComposer get ownerId { - final i4.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PersonEntityTableOrderingComposer - extends i0.Composer { - $$PersonEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get faceAssetId => $composableBuilder( - column: $table.faceAssetId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isHidden => $composableBuilder( - column: $table.isHidden, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get color => $composableBuilder( - column: $table.color, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get birthDate => $composableBuilder( - column: $table.birthDate, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$UserEntityTableOrderingComposer get ownerId { - final i4.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PersonEntityTableAnnotationComposer - extends i0.Composer { - $$PersonEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); - - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get faceAssetId => $composableBuilder( - column: $table.faceAssetId, - builder: (column) => column, - ); - - i0.GeneratedColumn get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => column, - ); - - i0.GeneratedColumn get isHidden => - $composableBuilder(column: $table.isHidden, builder: (column) => column); - - i0.GeneratedColumn get color => - $composableBuilder(column: $table.color, builder: (column) => column); - - i0.GeneratedColumn get birthDate => - $composableBuilder(column: $table.birthDate, builder: (column) => column); - - i4.$$UserEntityTableAnnotationComposer get ownerId { - final i4.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$PersonEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$PersonEntityTable, - i1.PersonEntityData, - i1.$$PersonEntityTableFilterComposer, - i1.$$PersonEntityTableOrderingComposer, - i1.$$PersonEntityTableAnnotationComposer, - $$PersonEntityTableCreateCompanionBuilder, - $$PersonEntityTableUpdateCompanionBuilder, - (i1.PersonEntityData, i1.$$PersonEntityTableReferences), - i1.PersonEntityData, - i0.PrefetchHooks Function({bool ownerId}) - > { - $$PersonEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$PersonEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$PersonEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$PersonEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$PersonEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value ownerId = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value faceAssetId = const i0.Value.absent(), - i0.Value isFavorite = const i0.Value.absent(), - i0.Value isHidden = const i0.Value.absent(), - i0.Value color = const i0.Value.absent(), - i0.Value birthDate = const i0.Value.absent(), - }) => i1.PersonEntityCompanion( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - ownerId: ownerId, - name: name, - faceAssetId: faceAssetId, - isFavorite: isFavorite, - isHidden: isHidden, - color: color, - birthDate: birthDate, - ), - createCompanionCallback: - ({ - required String id, - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - required String ownerId, - required String name, - i0.Value faceAssetId = const i0.Value.absent(), - required bool isFavorite, - required bool isHidden, - i0.Value color = const i0.Value.absent(), - i0.Value birthDate = const i0.Value.absent(), - }) => i1.PersonEntityCompanion.insert( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - ownerId: ownerId, - name: name, - faceAssetId: faceAssetId, - isFavorite: isFavorite, - isHidden: isHidden, - color: color, - birthDate: birthDate, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$PersonEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({ownerId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (ownerId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.ownerId, - referencedTable: i1 - .$$PersonEntityTableReferences - ._ownerIdTable(db), - referencedColumn: i1 - .$$PersonEntityTableReferences - ._ownerIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$PersonEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$PersonEntityTable, - i1.PersonEntityData, - i1.$$PersonEntityTableFilterComposer, - i1.$$PersonEntityTableOrderingComposer, - i1.$$PersonEntityTableAnnotationComposer, - $$PersonEntityTableCreateCompanionBuilder, - $$PersonEntityTableUpdateCompanionBuilder, - (i1.PersonEntityData, i1.$$PersonEntityTableReferences), - i1.PersonEntityData, - i0.PrefetchHooks Function({bool ownerId}) - >; -i0.Index get idxPersonOwnerId => i0.Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', -); - -class $PersonEntityTable extends i2.PersonEntity - with i0.TableInfo<$PersonEntityTable, i1.PersonEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $PersonEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i3.currentDateAndTime, - ); - static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( - 'updatedAt', - ); - @override - late final i0.GeneratedColumn updatedAt = - i0.GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i3.currentDateAndTime, - ); - static const i0.VerificationMeta _ownerIdMeta = const i0.VerificationMeta( - 'ownerId', - ); - @override - late final i0.GeneratedColumn ownerId = i0.GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _faceAssetIdMeta = const i0.VerificationMeta( - 'faceAssetId', - ); - @override - late final i0.GeneratedColumn faceAssetId = - i0.GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _isFavoriteMeta = const i0.VerificationMeta( - 'isFavorite', - ); - @override - late final i0.GeneratedColumn isFavorite = i0.GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - static const i0.VerificationMeta _isHiddenMeta = const i0.VerificationMeta( - 'isHidden', - ); - @override - late final i0.GeneratedColumn isHidden = i0.GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - static const i0.VerificationMeta _colorMeta = const i0.VerificationMeta( - 'color', - ); - @override - late final i0.GeneratedColumn color = i0.GeneratedColumn( - 'color', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _birthDateMeta = const i0.VerificationMeta( - 'birthDate', - ); - @override - late final i0.GeneratedColumn birthDate = - i0.GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - if (data.containsKey('owner_id')) { - context.handle( - _ownerIdMeta, - ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta), - ); - } else if (isInserting) { - context.missing(_ownerIdMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('face_asset_id')) { - context.handle( - _faceAssetIdMeta, - faceAssetId.isAcceptableOrUnknown( - data['face_asset_id']!, - _faceAssetIdMeta, - ), - ); - } - if (data.containsKey('is_favorite')) { - context.handle( - _isFavoriteMeta, - isFavorite.isAcceptableOrUnknown(data['is_favorite']!, _isFavoriteMeta), - ); - } else if (isInserting) { - context.missing(_isFavoriteMeta); - } - if (data.containsKey('is_hidden')) { - context.handle( - _isHiddenMeta, - isHidden.isAcceptableOrUnknown(data['is_hidden']!, _isHiddenMeta), - ); - } else if (isInserting) { - context.missing(_isHiddenMeta); - } - if (data.containsKey('color')) { - context.handle( - _colorMeta, - color.isAcceptableOrUnknown(data['color']!, _colorMeta), - ); - } - if (data.containsKey('birth_date')) { - context.handle( - _birthDateMeta, - birthDate.isAcceptableOrUnknown(data['birth_date']!, _birthDateMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.PersonEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - $PersonEntityTable createAlias(String alias) { - return $PersonEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - map['owner_id'] = i0.Variable(ownerId); - map['name'] = i0.Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = i0.Variable(faceAssetId); - } - map['is_favorite'] = i0.Variable(isFavorite); - map['is_hidden'] = i0.Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = i0.Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = i0.Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - i1.PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - i0.Value faceAssetId = const i0.Value.absent(), - bool? isFavorite, - bool? isHidden, - i0.Value color = const i0.Value.absent(), - i0.Value birthDate = const i0.Value.absent(), - }) => i1.PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(i1.PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value ownerId; - final i0.Value name; - final i0.Value faceAssetId; - final i0.Value isFavorite; - final i0.Value isHidden; - final i0.Value color; - final i0.Value birthDate; - const PersonEntityCompanion({ - this.id = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.ownerId = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.faceAssetId = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.isHidden = const i0.Value.absent(), - this.color = const i0.Value.absent(), - this.birthDate = const i0.Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const i0.Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const i0.Value.absent(), - this.birthDate = const i0.Value.absent(), - }) : id = i0.Value(id), - ownerId = i0.Value(ownerId), - name = i0.Value(name), - isFavorite = i0.Value(isFavorite), - isHidden = i0.Value(isHidden); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? ownerId, - i0.Expression? name, - i0.Expression? faceAssetId, - i0.Expression? isFavorite, - i0.Expression? isHidden, - i0.Expression? color, - i0.Expression? birthDate, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - i1.PersonEntityCompanion copyWith({ - i0.Value? id, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? ownerId, - i0.Value? name, - i0.Value? faceAssetId, - i0.Value? isFavorite, - i0.Value? isHidden, - i0.Value? color, - i0.Value? birthDate, - }) { - return i1.PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = i0.Variable(ownerId.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = i0.Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = i0.Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = i0.Variable(isHidden.value); - } - if (color.present) { - map['color'] = i0.Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = i0.Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/remote_album.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_album.entity.drift.dart deleted file mode 100644 index c0fb442d15..0000000000 --- a/mobile/lib/infrastructure/entities/remote_album.entity.drift.dart +++ /dev/null @@ -1,949 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/album/album.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$RemoteAlbumEntityTableCreateCompanionBuilder = - i1.RemoteAlbumEntityCompanion Function({ - required String id, - required String name, - i0.Value description, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value thumbnailAssetId, - i0.Value isActivityEnabled, - required i2.AlbumAssetOrder order, - }); -typedef $$RemoteAlbumEntityTableUpdateCompanionBuilder = - i1.RemoteAlbumEntityCompanion Function({ - i0.Value id, - i0.Value name, - i0.Value description, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value thumbnailAssetId, - i0.Value isActivityEnabled, - i0.Value order, - }); - -final class $$RemoteAlbumEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAlbumEntityTable, - i1.RemoteAlbumEntityData - > { - $$RemoteAlbumEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$RemoteAssetEntityTable _thumbnailAssetIdTable( - i0.GeneratedDatabase db, - ) => i6.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - 'remote_album_entity__thumbnail_asset_id__remote_asset_entity__id', - ); - - i5.$$RemoteAssetEntityTableProcessedTableManager? get thumbnailAssetId { - final $_column = $_itemColumn('thumbnail_asset_id'); - if ($_column == null) return null; - final manager = i5 - .$$RemoteAssetEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_thumbnailAssetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAlbumEntityTableFilterComposer - extends i0.Composer { - $$RemoteAlbumEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get description => $composableBuilder( - column: $table.description, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isActivityEnabled => $composableBuilder( - column: $table.isActivityEnabled, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get order => $composableBuilder( - column: $table.order, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i5.$$RemoteAssetEntityTableFilterComposer get thumbnailAssetId { - final i5.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.thumbnailAssetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumEntityTableOrderingComposer - extends i0.Composer { - $$RemoteAlbumEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get description => $composableBuilder( - column: $table.description, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isActivityEnabled => $composableBuilder( - column: $table.isActivityEnabled, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get order => $composableBuilder( - column: $table.order, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$RemoteAssetEntityTableOrderingComposer get thumbnailAssetId { - final i5.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.thumbnailAssetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteAlbumEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get description => $composableBuilder( - column: $table.description, - builder: (column) => column, - ); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); - - i0.GeneratedColumn get isActivityEnabled => $composableBuilder( - column: $table.isActivityEnabled, - builder: (column) => column, - ); - - i0.GeneratedColumnWithTypeConverter get order => - $composableBuilder(column: $table.order, builder: (column) => column); - - i5.$$RemoteAssetEntityTableAnnotationComposer get thumbnailAssetId { - final i5.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.thumbnailAssetId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumEntityTable, - i1.RemoteAlbumEntityData, - i1.$$RemoteAlbumEntityTableFilterComposer, - i1.$$RemoteAlbumEntityTableOrderingComposer, - i1.$$RemoteAlbumEntityTableAnnotationComposer, - $$RemoteAlbumEntityTableCreateCompanionBuilder, - $$RemoteAlbumEntityTableUpdateCompanionBuilder, - (i1.RemoteAlbumEntityData, i1.$$RemoteAlbumEntityTableReferences), - i1.RemoteAlbumEntityData, - i0.PrefetchHooks Function({bool thumbnailAssetId}) - > { - $$RemoteAlbumEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAlbumEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAlbumEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$RemoteAlbumEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$RemoteAlbumEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value description = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value thumbnailAssetId = const i0.Value.absent(), - i0.Value isActivityEnabled = const i0.Value.absent(), - i0.Value order = const i0.Value.absent(), - }) => i1.RemoteAlbumEntityCompanion( - id: id, - name: name, - description: description, - createdAt: createdAt, - updatedAt: updatedAt, - thumbnailAssetId: thumbnailAssetId, - isActivityEnabled: isActivityEnabled, - order: order, - ), - createCompanionCallback: - ({ - required String id, - required String name, - i0.Value description = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value thumbnailAssetId = const i0.Value.absent(), - i0.Value isActivityEnabled = const i0.Value.absent(), - required i2.AlbumAssetOrder order, - }) => i1.RemoteAlbumEntityCompanion.insert( - id: id, - name: name, - description: description, - createdAt: createdAt, - updatedAt: updatedAt, - thumbnailAssetId: thumbnailAssetId, - isActivityEnabled: isActivityEnabled, - order: order, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAlbumEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({thumbnailAssetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (thumbnailAssetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.thumbnailAssetId, - referencedTable: i1 - .$$RemoteAlbumEntityTableReferences - ._thumbnailAssetIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumEntityTableReferences - ._thumbnailAssetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAlbumEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumEntityTable, - i1.RemoteAlbumEntityData, - i1.$$RemoteAlbumEntityTableFilterComposer, - i1.$$RemoteAlbumEntityTableOrderingComposer, - i1.$$RemoteAlbumEntityTableAnnotationComposer, - $$RemoteAlbumEntityTableCreateCompanionBuilder, - $$RemoteAlbumEntityTableUpdateCompanionBuilder, - (i1.RemoteAlbumEntityData, i1.$$RemoteAlbumEntityTableReferences), - i1.RemoteAlbumEntityData, - i0.PrefetchHooks Function({bool thumbnailAssetId}) - >; - -class $RemoteAlbumEntityTable extends i3.RemoteAlbumEntity - with i0.TableInfo<$RemoteAlbumEntityTable, i1.RemoteAlbumEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAlbumEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _descriptionMeta = const i0.VerificationMeta( - 'description', - ); - @override - late final i0.GeneratedColumn description = - i0.GeneratedColumn( - 'description', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const i4.Constant(''), - ); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( - 'updatedAt', - ); - @override - late final i0.GeneratedColumn updatedAt = - i0.GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _thumbnailAssetIdMeta = - const i0.VerificationMeta('thumbnailAssetId'); - @override - late final i0.GeneratedColumn thumbnailAssetId = - i0.GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - static const i0.VerificationMeta _isActivityEnabledMeta = - const i0.VerificationMeta('isActivityEnabled'); - @override - late final i0.GeneratedColumn isActivityEnabled = - i0.GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const i4.Constant(true), - ); - @override - late final i0.GeneratedColumnWithTypeConverter - order = - i0.GeneratedColumn( - 'order', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$RemoteAlbumEntityTable.$converterorder, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('description')) { - context.handle( - _descriptionMeta, - description.isAcceptableOrUnknown( - data['description']!, - _descriptionMeta, - ), - ); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - if (data.containsKey('thumbnail_asset_id')) { - context.handle( - _thumbnailAssetIdMeta, - thumbnailAssetId.isAcceptableOrUnknown( - data['thumbnail_asset_id']!, - _thumbnailAssetIdMeta, - ), - ); - } - if (data.containsKey('is_activity_enabled')) { - context.handle( - _isActivityEnabledMeta, - isActivityEnabled.isAcceptableOrUnknown( - data['is_activity_enabled']!, - _isActivityEnabledMeta, - ), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.RemoteAlbumEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: i1.$RemoteAlbumEntityTable.$converterorder.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ), - ); - } - - @override - $RemoteAlbumEntityTable createAlias(String alias) { - return $RemoteAlbumEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converterorder = - const i0.EnumIndexConverter( - i2.AlbumAssetOrder.values, - ); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final i2.AlbumAssetOrder order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['name'] = i0.Variable(name); - map['description'] = i0.Variable(description); - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = i0.Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = i0.Variable(isActivityEnabled); - { - map['order'] = i0.Variable( - i1.$RemoteAlbumEntityTable.$converterorder.toSql(order), - ); - } - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: i1.$RemoteAlbumEntityTable.$converterorder.fromJson( - serializer.fromJson(json['order']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson( - i1.$RemoteAlbumEntityTable.$converterorder.toJson(order), - ), - }; - } - - i1.RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - i0.Value thumbnailAssetId = const i0.Value.absent(), - bool? isActivityEnabled, - i2.AlbumAssetOrder? order, - }) => i1.RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(i1.RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value name; - final i0.Value description; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value thumbnailAssetId; - final i0.Value isActivityEnabled; - final i0.Value order; - const RemoteAlbumEntityCompanion({ - this.id = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.description = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.thumbnailAssetId = const i0.Value.absent(), - this.isActivityEnabled = const i0.Value.absent(), - this.order = const i0.Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.thumbnailAssetId = const i0.Value.absent(), - this.isActivityEnabled = const i0.Value.absent(), - required i2.AlbumAssetOrder order, - }) : id = i0.Value(id), - name = i0.Value(name), - order = i0.Value(order); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? name, - i0.Expression? description, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? thumbnailAssetId, - i0.Expression? isActivityEnabled, - i0.Expression? order, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - i1.RemoteAlbumEntityCompanion copyWith({ - i0.Value? id, - i0.Value? name, - i0.Value? description, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? thumbnailAssetId, - i0.Value? isActivityEnabled, - i0.Value? order, - }) { - return i1.RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (description.present) { - map['description'] = i0.Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = i0.Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = i0.Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = i0.Variable( - i1.$RemoteAlbumEntityTable.$converterorder.toSql(order.value), - ); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/remote_album_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_album_asset.entity.drift.dart deleted file mode 100644 index 4ce7195717..0000000000 --- a/mobile/lib/infrastructure/entities/remote_album_asset.entity.drift.dart +++ /dev/null @@ -1,654 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i5; - -typedef $$RemoteAlbumAssetEntityTableCreateCompanionBuilder = - i1.RemoteAlbumAssetEntityCompanion Function({ - required String assetId, - required String albumId, - }); -typedef $$RemoteAlbumAssetEntityTableUpdateCompanionBuilder = - i1.RemoteAlbumAssetEntityCompanion Function({ - i0.Value assetId, - i0.Value albumId, - }); - -final class $$RemoteAlbumAssetEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAlbumAssetEntityTable, - i1.RemoteAlbumAssetEntityData - > { - $$RemoteAlbumAssetEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - 'remote_album_asset_entity__asset_id__remote_asset_entity__id', - ); - - i3.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$RemoteAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i5.$RemoteAlbumEntityTable _albumIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_album_entity') - .createAlias( - 'remote_album_asset_entity__album_id__remote_album_entity__id', - ); - - i5.$$RemoteAlbumEntityTableProcessedTableManager get albumId { - final $_column = $_itemColumn('album_id')!; - - final manager = i5 - .$$RemoteAlbumEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_album_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_albumIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAlbumAssetEntityTableFilterComposer - extends i0.Composer { - $$RemoteAlbumAssetEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableFilterComposer get assetId { - final i3.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$RemoteAlbumEntityTableFilterComposer get albumId { - final i5.$$RemoteAlbumEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumAssetEntityTableOrderingComposer - extends i0.Composer { - $$RemoteAlbumAssetEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i3.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$RemoteAlbumEntityTableOrderingComposer get albumId { - final i5.$$RemoteAlbumEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumAssetEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteAlbumAssetEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i3.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i3.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i5.$$RemoteAlbumEntityTableAnnotationComposer get albumId { - final i5.$$RemoteAlbumEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$RemoteAlbumEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumAssetEntityTable, - i1.RemoteAlbumAssetEntityData, - i1.$$RemoteAlbumAssetEntityTableFilterComposer, - i1.$$RemoteAlbumAssetEntityTableOrderingComposer, - i1.$$RemoteAlbumAssetEntityTableAnnotationComposer, - $$RemoteAlbumAssetEntityTableCreateCompanionBuilder, - $$RemoteAlbumAssetEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAlbumAssetEntityData, - i1.$$RemoteAlbumAssetEntityTableReferences, - ), - i1.RemoteAlbumAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool albumId}) - > { - $$RemoteAlbumAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAlbumAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAlbumAssetEntityTableFilterComposer( - $db: db, - $table: table, - ), - createOrderingComposer: () => - i1.$$RemoteAlbumAssetEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$RemoteAlbumAssetEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value albumId = const i0.Value.absent(), - }) => i1.RemoteAlbumAssetEntityCompanion( - assetId: assetId, - albumId: albumId, - ), - createCompanionCallback: - ({required String assetId, required String albumId}) => - i1.RemoteAlbumAssetEntityCompanion.insert( - assetId: assetId, - albumId: albumId, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAlbumAssetEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false, albumId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$RemoteAlbumAssetEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumAssetEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - if (albumId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.albumId, - referencedTable: i1 - .$$RemoteAlbumAssetEntityTableReferences - ._albumIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumAssetEntityTableReferences - ._albumIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAlbumAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumAssetEntityTable, - i1.RemoteAlbumAssetEntityData, - i1.$$RemoteAlbumAssetEntityTableFilterComposer, - i1.$$RemoteAlbumAssetEntityTableOrderingComposer, - i1.$$RemoteAlbumAssetEntityTableAnnotationComposer, - $$RemoteAlbumAssetEntityTableCreateCompanionBuilder, - $$RemoteAlbumAssetEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAlbumAssetEntityData, - i1.$$RemoteAlbumAssetEntityTableReferences, - ), - i1.RemoteAlbumAssetEntityData, - i0.PrefetchHooks Function({bool assetId, bool albumId}) - >; -i0.Index get idxRemoteAlbumAssetAlbumAsset => i0.Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', -); - -class $RemoteAlbumAssetEntityTable extends i2.RemoteAlbumAssetEntity - with - i0.TableInfo< - $RemoteAlbumAssetEntityTable, - i1.RemoteAlbumAssetEntityData - > { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAlbumAssetEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _albumIdMeta = const i0.VerificationMeta( - 'albumId', - ); - @override - late final i0.GeneratedColumn albumId = i0.GeneratedColumn( - 'album_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('album_id')) { - context.handle( - _albumIdMeta, - albumId.isAcceptableOrUnknown(data['album_id']!, _albumIdMeta), - ); - } else if (isInserting) { - context.missing(_albumIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {assetId, albumId}; - @override - i1.RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - $RemoteAlbumAssetEntityTable createAlias(String alias) { - return $RemoteAlbumAssetEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends i0.DataClass - implements i0.Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = i0.Variable(assetId); - map['album_id'] = i0.Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - i1.RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - i1.RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - i1.RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.albumId = const i0.Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = i0.Value(assetId), - albumId = i0.Value(albumId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? albumId, - }) { - return i0.RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - i1.RemoteAlbumAssetEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? albumId, - }) { - return i1.RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = i0.Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/remote_album_user.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_album_user.entity.drift.dart deleted file mode 100644 index 8c6d24df15..0000000000 --- a/mobile/lib/infrastructure/entities/remote_album_user.entity.drift.dart +++ /dev/null @@ -1,719 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/album/album.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.dart' - as i3; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i6; - -typedef $$RemoteAlbumUserEntityTableCreateCompanionBuilder = - i1.RemoteAlbumUserEntityCompanion Function({ - required String albumId, - required String userId, - required i2.AlbumUserRole role, - }); -typedef $$RemoteAlbumUserEntityTableUpdateCompanionBuilder = - i1.RemoteAlbumUserEntityCompanion Function({ - i0.Value albumId, - i0.Value userId, - i0.Value role, - }); - -final class $$RemoteAlbumUserEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAlbumUserEntityTable, - i1.RemoteAlbumUserEntityData - > { - $$RemoteAlbumUserEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i4.$RemoteAlbumEntityTable _albumIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('remote_album_entity') - .createAlias( - 'remote_album_user_entity__album_id__remote_album_entity__id', - ); - - i4.$$RemoteAlbumEntityTableProcessedTableManager get albumId { - final $_column = $_itemColumn('album_id')!; - - final manager = i4 - .$$RemoteAlbumEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('remote_album_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_albumIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } - - static i6.$UserEntityTable _userIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias('remote_album_user_entity__user_id__user_entity__id'); - - i6.$$UserEntityTableProcessedTableManager get userId { - final $_column = $_itemColumn('user_id')!; - - final manager = i6 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_userIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAlbumUserEntityTableFilterComposer - extends i0.Composer { - $$RemoteAlbumUserEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnWithTypeConverterFilters - get role => $composableBuilder( - column: $table.role, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i4.$$RemoteAlbumEntityTableFilterComposer get albumId { - final i4.$$RemoteAlbumEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAlbumEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$UserEntityTableFilterComposer get userId { - final i6.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumUserEntityTableOrderingComposer - extends i0.Composer { - $$RemoteAlbumUserEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get role => $composableBuilder( - column: $table.role, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$RemoteAlbumEntityTableOrderingComposer get albumId { - final i4.$$RemoteAlbumEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAlbumEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$UserEntityTableOrderingComposer get userId { - final i6.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumUserEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteAlbumUserEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumnWithTypeConverter get role => - $composableBuilder(column: $table.role, builder: (column) => column); - - i4.$$RemoteAlbumEntityTableAnnotationComposer get albumId { - final i4.$$RemoteAlbumEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.albumId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$RemoteAlbumEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('remote_album_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } - - i6.$$UserEntityTableAnnotationComposer get userId { - final i6.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i6.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAlbumUserEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumUserEntityTable, - i1.RemoteAlbumUserEntityData, - i1.$$RemoteAlbumUserEntityTableFilterComposer, - i1.$$RemoteAlbumUserEntityTableOrderingComposer, - i1.$$RemoteAlbumUserEntityTableAnnotationComposer, - $$RemoteAlbumUserEntityTableCreateCompanionBuilder, - $$RemoteAlbumUserEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAlbumUserEntityData, - i1.$$RemoteAlbumUserEntityTableReferences, - ), - i1.RemoteAlbumUserEntityData, - i0.PrefetchHooks Function({bool albumId, bool userId}) - > { - $$RemoteAlbumUserEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAlbumUserEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAlbumUserEntityTableFilterComposer( - $db: db, - $table: table, - ), - createOrderingComposer: () => - i1.$$RemoteAlbumUserEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$RemoteAlbumUserEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value albumId = const i0.Value.absent(), - i0.Value userId = const i0.Value.absent(), - i0.Value role = const i0.Value.absent(), - }) => i1.RemoteAlbumUserEntityCompanion( - albumId: albumId, - userId: userId, - role: role, - ), - createCompanionCallback: - ({ - required String albumId, - required String userId, - required i2.AlbumUserRole role, - }) => i1.RemoteAlbumUserEntityCompanion.insert( - albumId: albumId, - userId: userId, - role: role, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAlbumUserEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({albumId = false, userId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (albumId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.albumId, - referencedTable: i1 - .$$RemoteAlbumUserEntityTableReferences - ._albumIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumUserEntityTableReferences - ._albumIdTable(db) - .id, - ) - as T; - } - if (userId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.userId, - referencedTable: i1 - .$$RemoteAlbumUserEntityTableReferences - ._userIdTable(db), - referencedColumn: i1 - .$$RemoteAlbumUserEntityTableReferences - ._userIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAlbumUserEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAlbumUserEntityTable, - i1.RemoteAlbumUserEntityData, - i1.$$RemoteAlbumUserEntityTableFilterComposer, - i1.$$RemoteAlbumUserEntityTableOrderingComposer, - i1.$$RemoteAlbumUserEntityTableAnnotationComposer, - $$RemoteAlbumUserEntityTableCreateCompanionBuilder, - $$RemoteAlbumUserEntityTableUpdateCompanionBuilder, - (i1.RemoteAlbumUserEntityData, i1.$$RemoteAlbumUserEntityTableReferences), - i1.RemoteAlbumUserEntityData, - i0.PrefetchHooks Function({bool albumId, bool userId}) - >; - -class $RemoteAlbumUserEntityTable extends i3.RemoteAlbumUserEntity - with - i0.TableInfo< - $RemoteAlbumUserEntityTable, - i1.RemoteAlbumUserEntityData - > { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAlbumUserEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _albumIdMeta = const i0.VerificationMeta( - 'albumId', - ); - @override - late final i0.GeneratedColumn albumId = i0.GeneratedColumn( - 'album_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _userIdMeta = const i0.VerificationMeta( - 'userId', - ); - @override - late final i0.GeneratedColumn userId = i0.GeneratedColumn( - 'user_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - @override - late final i0.GeneratedColumnWithTypeConverter role = - i0.GeneratedColumn( - 'role', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$RemoteAlbumUserEntityTable.$converterrole, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('album_id')) { - context.handle( - _albumIdMeta, - albumId.isAcceptableOrUnknown(data['album_id']!, _albumIdMeta), - ); - } else if (isInserting) { - context.missing(_albumIdMeta); - } - if (data.containsKey('user_id')) { - context.handle( - _userIdMeta, - userId.isAcceptableOrUnknown(data['user_id']!, _userIdMeta), - ); - } else if (isInserting) { - context.missing(_userIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {albumId, userId}; - @override - i1.RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: i1.$RemoteAlbumUserEntityTable.$converterrole.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ), - ); - } - - @override - $RemoteAlbumUserEntityTable createAlias(String alias) { - return $RemoteAlbumUserEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converterrole = - const i0.EnumIndexConverter(i2.AlbumUserRole.values); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends i0.DataClass - implements i0.Insertable { - final String albumId; - final String userId; - final i2.AlbumUserRole role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = i0.Variable(albumId); - map['user_id'] = i0.Variable(userId); - { - map['role'] = i0.Variable( - i1.$RemoteAlbumUserEntityTable.$converterrole.toSql(role), - ); - } - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: i1.$RemoteAlbumUserEntityTable.$converterrole.fromJson( - serializer.fromJson(json['role']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson( - i1.$RemoteAlbumUserEntityTable.$converterrole.toJson(role), - ), - }; - } - - i1.RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - i2.AlbumUserRole? role, - }) => i1.RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - i1.RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends i0.UpdateCompanion { - final i0.Value albumId; - final i0.Value userId; - final i0.Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const i0.Value.absent(), - this.userId = const i0.Value.absent(), - this.role = const i0.Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required i2.AlbumUserRole role, - }) : albumId = i0.Value(albumId), - userId = i0.Value(userId), - role = i0.Value(role); - static i0.Insertable custom({ - i0.Expression? albumId, - i0.Expression? userId, - i0.Expression? role, - }) { - return i0.RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - i1.RemoteAlbumUserEntityCompanion copyWith({ - i0.Value? albumId, - i0.Value? userId, - i0.Value? role, - }) { - return i1.RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = i0.Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = i0.Variable(userId.value); - } - if (role.present) { - map['role'] = i0.Variable( - i1.$RemoteAlbumUserEntityTable.$converterrole.toSql(role.value), - ); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart deleted file mode 100644 index 314e93a9a0..0000000000 --- a/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart +++ /dev/null @@ -1,1776 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$RemoteAssetEntityTableCreateCompanionBuilder = - i1.RemoteAssetEntityCompanion Function({ - required String name, - required i2.AssetType type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - required String id, - required String checksum, - i0.Value isFavorite, - required String ownerId, - i0.Value localDateTime, - i0.Value thumbHash, - i0.Value deletedAt, - i0.Value uploadedAt, - i0.Value livePhotoVideoId, - required i2.AssetVisibility visibility, - i0.Value stackId, - i0.Value libraryId, - i0.Value isEdited, - }); -typedef $$RemoteAssetEntityTableUpdateCompanionBuilder = - i1.RemoteAssetEntityCompanion Function({ - i0.Value name, - i0.Value type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - i0.Value id, - i0.Value checksum, - i0.Value isFavorite, - i0.Value ownerId, - i0.Value localDateTime, - i0.Value thumbHash, - i0.Value deletedAt, - i0.Value uploadedAt, - i0.Value livePhotoVideoId, - i0.Value visibility, - i0.Value stackId, - i0.Value libraryId, - i0.Value isEdited, - }); - -final class $$RemoteAssetEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAssetEntityTable, - i1.RemoteAssetEntityData - > { - $$RemoteAssetEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$UserEntityTable _ownerIdTable(i0.GeneratedDatabase db) => - i6.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias('remote_asset_entity__owner_id__user_entity__id'); - - i5.$$UserEntityTableProcessedTableManager get ownerId { - final $_column = $_itemColumn('owner_id')!; - - final manager = i5 - .$$UserEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_ownerIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAssetEntityTableFilterComposer - extends i0.Composer { - $$RemoteAssetEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters get type => - $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get checksum => $composableBuilder( - column: $table.checksum, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get localDateTime => $composableBuilder( - column: $table.localDateTime, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get thumbHash => $composableBuilder( - column: $table.thumbHash, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get uploadedAt => $composableBuilder( - column: $table.uploadedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get livePhotoVideoId => $composableBuilder( - column: $table.livePhotoVideoId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get visibility => $composableBuilder( - column: $table.visibility, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get stackId => $composableBuilder( - column: $table.stackId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get libraryId => $composableBuilder( - column: $table.libraryId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isEdited => $composableBuilder( - column: $table.isEdited, - builder: (column) => i0.ColumnFilters(column), - ); - - i5.$$UserEntityTableFilterComposer get ownerId { - final i5.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetEntityTableOrderingComposer - extends i0.Composer { - $$RemoteAssetEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get type => $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get checksum => $composableBuilder( - column: $table.checksum, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get localDateTime => $composableBuilder( - column: $table.localDateTime, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get thumbHash => $composableBuilder( - column: $table.thumbHash, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get deletedAt => $composableBuilder( - column: $table.deletedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get uploadedAt => $composableBuilder( - column: $table.uploadedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get livePhotoVideoId => $composableBuilder( - column: $table.livePhotoVideoId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get visibility => $composableBuilder( - column: $table.visibility, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get stackId => $composableBuilder( - column: $table.stackId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get libraryId => $composableBuilder( - column: $table.libraryId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isEdited => $composableBuilder( - column: $table.isEdited, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$UserEntityTableOrderingComposer get ownerId { - final i5.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetEntityTableAnnotationComposer - extends i0.Composer { - $$RemoteAssetEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter get type => - $composableBuilder(column: $table.type, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); - - i0.GeneratedColumn get width => - $composableBuilder(column: $table.width, builder: (column) => column); - - i0.GeneratedColumn get height => - $composableBuilder(column: $table.height, builder: (column) => column); - - i0.GeneratedColumn get durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => column, - ); - - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get checksum => - $composableBuilder(column: $table.checksum, builder: (column) => column); - - i0.GeneratedColumn get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => column, - ); - - i0.GeneratedColumn get localDateTime => $composableBuilder( - column: $table.localDateTime, - builder: (column) => column, - ); - - i0.GeneratedColumn get thumbHash => - $composableBuilder(column: $table.thumbHash, builder: (column) => column); - - i0.GeneratedColumn get deletedAt => - $composableBuilder(column: $table.deletedAt, builder: (column) => column); - - i0.GeneratedColumn get uploadedAt => $composableBuilder( - column: $table.uploadedAt, - builder: (column) => column, - ); - - i0.GeneratedColumn get livePhotoVideoId => $composableBuilder( - column: $table.livePhotoVideoId, - builder: (column) => column, - ); - - i0.GeneratedColumnWithTypeConverter get visibility => - $composableBuilder( - column: $table.visibility, - builder: (column) => column, - ); - - i0.GeneratedColumn get stackId => - $composableBuilder(column: $table.stackId, builder: (column) => column); - - i0.GeneratedColumn get libraryId => - $composableBuilder(column: $table.libraryId, builder: (column) => column); - - i0.GeneratedColumn get isEdited => - $composableBuilder(column: $table.isEdited, builder: (column) => column); - - i5.$$UserEntityTableAnnotationComposer get ownerId { - final i5.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAssetEntityTable, - i1.RemoteAssetEntityData, - i1.$$RemoteAssetEntityTableFilterComposer, - i1.$$RemoteAssetEntityTableOrderingComposer, - i1.$$RemoteAssetEntityTableAnnotationComposer, - $$RemoteAssetEntityTableCreateCompanionBuilder, - $$RemoteAssetEntityTableUpdateCompanionBuilder, - (i1.RemoteAssetEntityData, i1.$$RemoteAssetEntityTableReferences), - i1.RemoteAssetEntityData, - i0.PrefetchHooks Function({bool ownerId}) - > { - $$RemoteAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAssetEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => i1 - .$$RemoteAssetEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$RemoteAssetEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value name = const i0.Value.absent(), - i0.Value type = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value durationMs = const i0.Value.absent(), - i0.Value id = const i0.Value.absent(), - i0.Value checksum = const i0.Value.absent(), - i0.Value isFavorite = const i0.Value.absent(), - i0.Value ownerId = const i0.Value.absent(), - i0.Value localDateTime = const i0.Value.absent(), - i0.Value thumbHash = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - i0.Value uploadedAt = const i0.Value.absent(), - i0.Value livePhotoVideoId = const i0.Value.absent(), - i0.Value visibility = - const i0.Value.absent(), - i0.Value stackId = const i0.Value.absent(), - i0.Value libraryId = const i0.Value.absent(), - i0.Value isEdited = const i0.Value.absent(), - }) => i1.RemoteAssetEntityCompanion( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - checksum: checksum, - isFavorite: isFavorite, - ownerId: ownerId, - localDateTime: localDateTime, - thumbHash: thumbHash, - deletedAt: deletedAt, - uploadedAt: uploadedAt, - livePhotoVideoId: livePhotoVideoId, - visibility: visibility, - stackId: stackId, - libraryId: libraryId, - isEdited: isEdited, - ), - createCompanionCallback: - ({ - required String name, - required i2.AssetType type, - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value durationMs = const i0.Value.absent(), - required String id, - required String checksum, - i0.Value isFavorite = const i0.Value.absent(), - required String ownerId, - i0.Value localDateTime = const i0.Value.absent(), - i0.Value thumbHash = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - i0.Value uploadedAt = const i0.Value.absent(), - i0.Value livePhotoVideoId = const i0.Value.absent(), - required i2.AssetVisibility visibility, - i0.Value stackId = const i0.Value.absent(), - i0.Value libraryId = const i0.Value.absent(), - i0.Value isEdited = const i0.Value.absent(), - }) => i1.RemoteAssetEntityCompanion.insert( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - checksum: checksum, - isFavorite: isFavorite, - ownerId: ownerId, - localDateTime: localDateTime, - thumbHash: thumbHash, - deletedAt: deletedAt, - uploadedAt: uploadedAt, - livePhotoVideoId: livePhotoVideoId, - visibility: visibility, - stackId: stackId, - libraryId: libraryId, - isEdited: isEdited, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAssetEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({ownerId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (ownerId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.ownerId, - referencedTable: i1 - .$$RemoteAssetEntityTableReferences - ._ownerIdTable(db), - referencedColumn: i1 - .$$RemoteAssetEntityTableReferences - ._ownerIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAssetEntityTable, - i1.RemoteAssetEntityData, - i1.$$RemoteAssetEntityTableFilterComposer, - i1.$$RemoteAssetEntityTableOrderingComposer, - i1.$$RemoteAssetEntityTableAnnotationComposer, - $$RemoteAssetEntityTableCreateCompanionBuilder, - $$RemoteAssetEntityTableUpdateCompanionBuilder, - (i1.RemoteAssetEntityData, i1.$$RemoteAssetEntityTableReferences), - i1.RemoteAssetEntityData, - i0.PrefetchHooks Function({bool ownerId}) - >; -i0.Index get uQRemoteAssetsOwnerChecksum => i0.Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', -); - -class $RemoteAssetEntityTable extends i3.RemoteAssetEntity - with i0.TableInfo<$RemoteAssetEntityTable, i1.RemoteAssetEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAssetEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - late final i0.GeneratedColumnWithTypeConverter type = - i0.GeneratedColumn( - 'type', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter(i1.$RemoteAssetEntityTable.$convertertype); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( - 'updatedAt', - ); - @override - late final i0.GeneratedColumn updatedAt = - i0.GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _widthMeta = const i0.VerificationMeta( - 'width', - ); - @override - late final i0.GeneratedColumn width = i0.GeneratedColumn( - 'width', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _heightMeta = const i0.VerificationMeta( - 'height', - ); - @override - late final i0.GeneratedColumn height = i0.GeneratedColumn( - 'height', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _durationMsMeta = const i0.VerificationMeta( - 'durationMs', - ); - @override - late final i0.GeneratedColumn durationMs = i0.GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _checksumMeta = const i0.VerificationMeta( - 'checksum', - ); - @override - late final i0.GeneratedColumn checksum = i0.GeneratedColumn( - 'checksum', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _isFavoriteMeta = const i0.VerificationMeta( - 'isFavorite', - ); - @override - late final i0.GeneratedColumn isFavorite = i0.GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _ownerIdMeta = const i0.VerificationMeta( - 'ownerId', - ); - @override - late final i0.GeneratedColumn ownerId = i0.GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _localDateTimeMeta = - const i0.VerificationMeta('localDateTime'); - @override - late final i0.GeneratedColumn localDateTime = - i0.GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _thumbHashMeta = const i0.VerificationMeta( - 'thumbHash', - ); - @override - late final i0.GeneratedColumn thumbHash = i0.GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _deletedAtMeta = const i0.VerificationMeta( - 'deletedAt', - ); - @override - late final i0.GeneratedColumn deletedAt = - i0.GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _uploadedAtMeta = const i0.VerificationMeta( - 'uploadedAt', - ); - @override - late final i0.GeneratedColumn uploadedAt = - i0.GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _livePhotoVideoIdMeta = - const i0.VerificationMeta('livePhotoVideoId'); - @override - late final i0.GeneratedColumn livePhotoVideoId = - i0.GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - visibility = - i0.GeneratedColumn( - 'visibility', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$RemoteAssetEntityTable.$convertervisibility, - ); - static const i0.VerificationMeta _stackIdMeta = const i0.VerificationMeta( - 'stackId', - ); - @override - late final i0.GeneratedColumn stackId = i0.GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _libraryIdMeta = const i0.VerificationMeta( - 'libraryId', - ); - @override - late final i0.GeneratedColumn libraryId = i0.GeneratedColumn( - 'library_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _isEditedMeta = const i0.VerificationMeta( - 'isEdited', - ); - @override - late final i0.GeneratedColumn isEdited = i0.GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - if (data.containsKey('width')) { - context.handle( - _widthMeta, - width.isAcceptableOrUnknown(data['width']!, _widthMeta), - ); - } - if (data.containsKey('height')) { - context.handle( - _heightMeta, - height.isAcceptableOrUnknown(data['height']!, _heightMeta), - ); - } - if (data.containsKey('duration_ms')) { - context.handle( - _durationMsMeta, - durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta), - ); - } - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('checksum')) { - context.handle( - _checksumMeta, - checksum.isAcceptableOrUnknown(data['checksum']!, _checksumMeta), - ); - } else if (isInserting) { - context.missing(_checksumMeta); - } - if (data.containsKey('is_favorite')) { - context.handle( - _isFavoriteMeta, - isFavorite.isAcceptableOrUnknown(data['is_favorite']!, _isFavoriteMeta), - ); - } - if (data.containsKey('owner_id')) { - context.handle( - _ownerIdMeta, - ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta), - ); - } else if (isInserting) { - context.missing(_ownerIdMeta); - } - if (data.containsKey('local_date_time')) { - context.handle( - _localDateTimeMeta, - localDateTime.isAcceptableOrUnknown( - data['local_date_time']!, - _localDateTimeMeta, - ), - ); - } - if (data.containsKey('thumb_hash')) { - context.handle( - _thumbHashMeta, - thumbHash.isAcceptableOrUnknown(data['thumb_hash']!, _thumbHashMeta), - ); - } - if (data.containsKey('deleted_at')) { - context.handle( - _deletedAtMeta, - deletedAt.isAcceptableOrUnknown(data['deleted_at']!, _deletedAtMeta), - ); - } - if (data.containsKey('uploaded_at')) { - context.handle( - _uploadedAtMeta, - uploadedAt.isAcceptableOrUnknown(data['uploaded_at']!, _uploadedAtMeta), - ); - } - if (data.containsKey('live_photo_video_id')) { - context.handle( - _livePhotoVideoIdMeta, - livePhotoVideoId.isAcceptableOrUnknown( - data['live_photo_video_id']!, - _livePhotoVideoIdMeta, - ), - ); - } - if (data.containsKey('stack_id')) { - context.handle( - _stackIdMeta, - stackId.isAcceptableOrUnknown(data['stack_id']!, _stackIdMeta), - ); - } - if (data.containsKey('library_id')) { - context.handle( - _libraryIdMeta, - libraryId.isAcceptableOrUnknown(data['library_id']!, _libraryIdMeta), - ); - } - if (data.containsKey('is_edited')) { - context.handle( - _isEditedMeta, - isEdited.isAcceptableOrUnknown(data['is_edited']!, _isEditedMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.RemoteAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: i1.$RemoteAssetEntityTable.$convertertype.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - ), - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}uploaded_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: i1.$RemoteAssetEntityTable.$convertervisibility.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - ), - stackId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - $RemoteAssetEntityTable createAlias(String alias) { - return $RemoteAssetEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $convertertype = - const i0.EnumIndexConverter(i2.AssetType.values); - static i0.JsonTypeConverter2 - $convertervisibility = const i0.EnumIndexConverter( - i2.AssetVisibility.values, - ); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends i0.DataClass - implements i0.Insertable { - final String name; - final i2.AssetType type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final DateTime? uploadedAt; - final String? livePhotoVideoId; - final i2.AssetVisibility visibility; - final String? stackId; - final String? libraryId; - final bool isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = i0.Variable(name); - { - map['type'] = i0.Variable( - i1.$RemoteAssetEntityTable.$convertertype.toSql(type), - ); - } - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = i0.Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = i0.Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = i0.Variable(durationMs); - } - map['id'] = i0.Variable(id); - map['checksum'] = i0.Variable(checksum); - map['is_favorite'] = i0.Variable(isFavorite); - map['owner_id'] = i0.Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = i0.Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = i0.Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = i0.Variable(deletedAt); - } - if (!nullToAbsent || uploadedAt != null) { - map['uploaded_at'] = i0.Variable(uploadedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = i0.Variable(livePhotoVideoId); - } - { - map['visibility'] = i0.Variable( - i1.$RemoteAssetEntityTable.$convertervisibility.toSql(visibility), - ); - } - if (!nullToAbsent || stackId != null) { - map['stack_id'] = i0.Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = i0.Variable(libraryId); - } - map['is_edited'] = i0.Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: i1.$RemoteAssetEntityTable.$convertertype.fromJson( - serializer.fromJson(json['type']), - ), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: i1.$RemoteAssetEntityTable.$convertervisibility.fromJson( - serializer.fromJson(json['visibility']), - ), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson( - i1.$RemoteAssetEntityTable.$convertertype.toJson(type), - ), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson( - i1.$RemoteAssetEntityTable.$convertervisibility.toJson(visibility), - ), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - i1.RemoteAssetEntityData copyWith({ - String? name, - i2.AssetType? type, - DateTime? createdAt, - DateTime? updatedAt, - i0.Value width = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value durationMs = const i0.Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - i0.Value localDateTime = const i0.Value.absent(), - i0.Value thumbHash = const i0.Value.absent(), - i0.Value deletedAt = const i0.Value.absent(), - i0.Value uploadedAt = const i0.Value.absent(), - i0.Value livePhotoVideoId = const i0.Value.absent(), - i2.AssetVisibility? visibility, - i0.Value stackId = const i0.Value.absent(), - i0.Value libraryId = const i0.Value.absent(), - bool? isEdited, - }) => i1.RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(i1.RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends i0.UpdateCompanion { - final i0.Value name; - final i0.Value type; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value width; - final i0.Value height; - final i0.Value durationMs; - final i0.Value id; - final i0.Value checksum; - final i0.Value isFavorite; - final i0.Value ownerId; - final i0.Value localDateTime; - final i0.Value thumbHash; - final i0.Value deletedAt; - final i0.Value uploadedAt; - final i0.Value livePhotoVideoId; - final i0.Value visibility; - final i0.Value stackId; - final i0.Value libraryId; - final i0.Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const i0.Value.absent(), - this.type = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.durationMs = const i0.Value.absent(), - this.id = const i0.Value.absent(), - this.checksum = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.ownerId = const i0.Value.absent(), - this.localDateTime = const i0.Value.absent(), - this.thumbHash = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - this.uploadedAt = const i0.Value.absent(), - this.livePhotoVideoId = const i0.Value.absent(), - this.visibility = const i0.Value.absent(), - this.stackId = const i0.Value.absent(), - this.libraryId = const i0.Value.absent(), - this.isEdited = const i0.Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required i2.AssetType type, - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.durationMs = const i0.Value.absent(), - required String id, - required String checksum, - this.isFavorite = const i0.Value.absent(), - required String ownerId, - this.localDateTime = const i0.Value.absent(), - this.thumbHash = const i0.Value.absent(), - this.deletedAt = const i0.Value.absent(), - this.uploadedAt = const i0.Value.absent(), - this.livePhotoVideoId = const i0.Value.absent(), - required i2.AssetVisibility visibility, - this.stackId = const i0.Value.absent(), - this.libraryId = const i0.Value.absent(), - this.isEdited = const i0.Value.absent(), - }) : name = i0.Value(name), - type = i0.Value(type), - id = i0.Value(id), - checksum = i0.Value(checksum), - ownerId = i0.Value(ownerId), - visibility = i0.Value(visibility); - static i0.Insertable custom({ - i0.Expression? name, - i0.Expression? type, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? width, - i0.Expression? height, - i0.Expression? durationMs, - i0.Expression? id, - i0.Expression? checksum, - i0.Expression? isFavorite, - i0.Expression? ownerId, - i0.Expression? localDateTime, - i0.Expression? thumbHash, - i0.Expression? deletedAt, - i0.Expression? uploadedAt, - i0.Expression? livePhotoVideoId, - i0.Expression? visibility, - i0.Expression? stackId, - i0.Expression? libraryId, - i0.Expression? isEdited, - }) { - return i0.RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (uploadedAt != null) 'uploaded_at': uploadedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - i1.RemoteAssetEntityCompanion copyWith({ - i0.Value? name, - i0.Value? type, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? width, - i0.Value? height, - i0.Value? durationMs, - i0.Value? id, - i0.Value? checksum, - i0.Value? isFavorite, - i0.Value? ownerId, - i0.Value? localDateTime, - i0.Value? thumbHash, - i0.Value? deletedAt, - i0.Value? uploadedAt, - i0.Value? livePhotoVideoId, - i0.Value? visibility, - i0.Value? stackId, - i0.Value? libraryId, - i0.Value? isEdited, - }) { - return i1.RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (type.present) { - map['type'] = i0.Variable( - i1.$RemoteAssetEntityTable.$convertertype.toSql(type.value), - ); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (width.present) { - map['width'] = i0.Variable(width.value); - } - if (height.present) { - map['height'] = i0.Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = i0.Variable(durationMs.value); - } - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (checksum.present) { - map['checksum'] = i0.Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = i0.Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = i0.Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = i0.Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = i0.Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = i0.Variable(deletedAt.value); - } - if (uploadedAt.present) { - map['uploaded_at'] = i0.Variable(uploadedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = i0.Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = i0.Variable( - i1.$RemoteAssetEntityTable.$convertervisibility.toSql(visibility.value), - ); - } - if (stackId.present) { - map['stack_id'] = i0.Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = i0.Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = i0.Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -i0.Index get uQRemoteAssetsOwnerLibraryChecksum => i0.Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', -); -i0.Index get idxRemoteAssetChecksum => i0.Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', -); -i0.Index get idxRemoteAssetStackId => i0.Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', -); -i0.Index get idxRemoteAssetOwnerVisibilityDeletedCreated => i0.Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', -); -i0.Index get idxRemoteAssetUploaded => i0.Index( - 'idx_remote_asset_uploaded', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_uploaded ON remote_asset_entity (uploaded_at)', -); diff --git a/mobile/lib/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart deleted file mode 100644 index 6a7a8d176c..0000000000 --- a/mobile/lib/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart +++ /dev/null @@ -1,821 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.entity.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i3; -import 'package:drift/internal/modular.dart' as i4; - -typedef $$RemoteAssetCloudIdEntityTableCreateCompanionBuilder = - i1.RemoteAssetCloudIdEntityCompanion Function({ - required String assetId, - i0.Value cloudId, - i0.Value createdAt, - i0.Value adjustmentTime, - i0.Value latitude, - i0.Value longitude, - }); -typedef $$RemoteAssetCloudIdEntityTableUpdateCompanionBuilder = - i1.RemoteAssetCloudIdEntityCompanion Function({ - i0.Value assetId, - i0.Value cloudId, - i0.Value createdAt, - i0.Value adjustmentTime, - i0.Value latitude, - i0.Value longitude, - }); - -final class $$RemoteAssetCloudIdEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$RemoteAssetCloudIdEntityTable, - i1.RemoteAssetCloudIdEntityData - > { - $$RemoteAssetCloudIdEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i3.$RemoteAssetEntityTable _assetIdTable(i0.GeneratedDatabase db) => - i4.ReadDatabaseContainer(db) - .resultSet('remote_asset_entity') - .createAlias( - 'remote_asset_cloud_id_entity__asset_id__remote_asset_entity__id', - ); - - i3.$$RemoteAssetEntityTableProcessedTableManager get assetId { - final $_column = $_itemColumn('asset_id')!; - - final manager = i3 - .$$RemoteAssetEntityTableTableManager( - $_db, - i4.ReadDatabaseContainer( - $_db, - ).resultSet('remote_asset_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_assetIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$RemoteAssetCloudIdEntityTableFilterComposer - extends - i0.Composer { - $$RemoteAssetCloudIdEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get cloudId => $composableBuilder( - column: $table.cloudId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnFilters(column), - ); - - i3.$$RemoteAssetEntityTableFilterComposer get assetId { - final i3.$$RemoteAssetEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableFilterComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetCloudIdEntityTableOrderingComposer - extends - i0.Composer { - $$RemoteAssetCloudIdEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get cloudId => $composableBuilder( - column: $table.cloudId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get latitude => $composableBuilder( - column: $table.latitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get longitude => $composableBuilder( - column: $table.longitude, - builder: (column) => i0.ColumnOrderings(column), - ); - - i3.$$RemoteAssetEntityTableOrderingComposer get assetId { - final i3.$$RemoteAssetEntityTableOrderingComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableOrderingComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetCloudIdEntityTableAnnotationComposer - extends - i0.Composer { - $$RemoteAssetCloudIdEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get cloudId => - $composableBuilder(column: $table.cloudId, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get adjustmentTime => $composableBuilder( - column: $table.adjustmentTime, - builder: (column) => column, - ); - - i0.GeneratedColumn get latitude => - $composableBuilder(column: $table.latitude, builder: (column) => column); - - i0.GeneratedColumn get longitude => - $composableBuilder(column: $table.longitude, builder: (column) => column); - - i3.$$RemoteAssetEntityTableAnnotationComposer get assetId { - final i3.$$RemoteAssetEntityTableAnnotationComposer composer = - $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.assetId, - referencedTable: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i3.$$RemoteAssetEntityTableAnnotationComposer( - $db: $db, - $table: i4.ReadDatabaseContainer( - $db, - ).resultSet('remote_asset_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$RemoteAssetCloudIdEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$RemoteAssetCloudIdEntityTable, - i1.RemoteAssetCloudIdEntityData, - i1.$$RemoteAssetCloudIdEntityTableFilterComposer, - i1.$$RemoteAssetCloudIdEntityTableOrderingComposer, - i1.$$RemoteAssetCloudIdEntityTableAnnotationComposer, - $$RemoteAssetCloudIdEntityTableCreateCompanionBuilder, - $$RemoteAssetCloudIdEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAssetCloudIdEntityData, - i1.$$RemoteAssetCloudIdEntityTableReferences, - ), - i1.RemoteAssetCloudIdEntityData, - i0.PrefetchHooks Function({bool assetId}) - > { - $$RemoteAssetCloudIdEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$RemoteAssetCloudIdEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$RemoteAssetCloudIdEntityTableFilterComposer( - $db: db, - $table: table, - ), - createOrderingComposer: () => - i1.$$RemoteAssetCloudIdEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$RemoteAssetCloudIdEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value assetId = const i0.Value.absent(), - i0.Value cloudId = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - }) => i1.RemoteAssetCloudIdEntityCompanion( - assetId: assetId, - cloudId: cloudId, - createdAt: createdAt, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - ), - createCompanionCallback: - ({ - required String assetId, - i0.Value cloudId = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - }) => i1.RemoteAssetCloudIdEntityCompanion.insert( - assetId: assetId, - cloudId: cloudId, - createdAt: createdAt, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$RemoteAssetCloudIdEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({assetId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (assetId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.assetId, - referencedTable: i1 - .$$RemoteAssetCloudIdEntityTableReferences - ._assetIdTable(db), - referencedColumn: i1 - .$$RemoteAssetCloudIdEntityTableReferences - ._assetIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$RemoteAssetCloudIdEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$RemoteAssetCloudIdEntityTable, - i1.RemoteAssetCloudIdEntityData, - i1.$$RemoteAssetCloudIdEntityTableFilterComposer, - i1.$$RemoteAssetCloudIdEntityTableOrderingComposer, - i1.$$RemoteAssetCloudIdEntityTableAnnotationComposer, - $$RemoteAssetCloudIdEntityTableCreateCompanionBuilder, - $$RemoteAssetCloudIdEntityTableUpdateCompanionBuilder, - ( - i1.RemoteAssetCloudIdEntityData, - i1.$$RemoteAssetCloudIdEntityTableReferences, - ), - i1.RemoteAssetCloudIdEntityData, - i0.PrefetchHooks Function({bool assetId}) - >; -i0.Index get idxRemoteAssetCloudId => i0.Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', -); - -class $RemoteAssetCloudIdEntityTable extends i2.RemoteAssetCloudIdEntity - with - i0.TableInfo< - $RemoteAssetCloudIdEntityTable, - i1.RemoteAssetCloudIdEntityData - > { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $RemoteAssetCloudIdEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _assetIdMeta = const i0.VerificationMeta( - 'assetId', - ); - @override - late final i0.GeneratedColumn assetId = i0.GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _cloudIdMeta = const i0.VerificationMeta( - 'cloudId', - ); - @override - late final i0.GeneratedColumn cloudId = i0.GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _adjustmentTimeMeta = - const i0.VerificationMeta('adjustmentTime'); - @override - late final i0.GeneratedColumn adjustmentTime = - i0.GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _latitudeMeta = const i0.VerificationMeta( - 'latitude', - ); - @override - late final i0.GeneratedColumn latitude = i0.GeneratedColumn( - 'latitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _longitudeMeta = const i0.VerificationMeta( - 'longitude', - ); - @override - late final i0.GeneratedColumn longitude = i0.GeneratedColumn( - 'longitude', - aliasedName, - true, - type: i0.DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('asset_id')) { - context.handle( - _assetIdMeta, - assetId.isAcceptableOrUnknown(data['asset_id']!, _assetIdMeta), - ); - } else if (isInserting) { - context.missing(_assetIdMeta); - } - if (data.containsKey('cloud_id')) { - context.handle( - _cloudIdMeta, - cloudId.isAcceptableOrUnknown(data['cloud_id']!, _cloudIdMeta), - ); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } - if (data.containsKey('adjustment_time')) { - context.handle( - _adjustmentTimeMeta, - adjustmentTime.isAcceptableOrUnknown( - data['adjustment_time']!, - _adjustmentTimeMeta, - ), - ); - } - if (data.containsKey('latitude')) { - context.handle( - _latitudeMeta, - latitude.isAcceptableOrUnknown(data['latitude']!, _latitudeMeta), - ); - } - if (data.containsKey('longitude')) { - context.handle( - _longitudeMeta, - longitude.isAcceptableOrUnknown(data['longitude']!, _longitudeMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {assetId}; - @override - i1.RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - i0.DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - $RemoteAssetCloudIdEntityTable createAlias(String alias) { - return $RemoteAssetCloudIdEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends i0.DataClass - implements i0.Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = i0.Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = i0.Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = i0.Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = i0.Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = i0.Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = i0.Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - i1.RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - i0.Value cloudId = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value adjustmentTime = const i0.Value.absent(), - i0.Value latitude = const i0.Value.absent(), - i0.Value longitude = const i0.Value.absent(), - }) => i1.RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - i1.RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends i0.UpdateCompanion { - final i0.Value assetId; - final i0.Value cloudId; - final i0.Value createdAt; - final i0.Value adjustmentTime; - final i0.Value latitude; - final i0.Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const i0.Value.absent(), - this.cloudId = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.adjustmentTime = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.adjustmentTime = const i0.Value.absent(), - this.latitude = const i0.Value.absent(), - this.longitude = const i0.Value.absent(), - }) : assetId = i0.Value(assetId); - static i0.Insertable custom({ - i0.Expression? assetId, - i0.Expression? cloudId, - i0.Expression? createdAt, - i0.Expression? adjustmentTime, - i0.Expression? latitude, - i0.Expression? longitude, - }) { - return i0.RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - i1.RemoteAssetCloudIdEntityCompanion copyWith({ - i0.Value? assetId, - i0.Value? cloudId, - i0.Value? createdAt, - i0.Value? adjustmentTime, - i0.Value? latitude, - i0.Value? longitude, - }) { - return i1.RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = i0.Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = i0.Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = i0.Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = i0.Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = i0.Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/settings.entity.drift.dart b/mobile/lib/infrastructure/entities/settings.entity.drift.dart deleted file mode 100644 index 7b0fc00ea6..0000000000 --- a/mobile/lib/infrastructure/entities/settings.entity.drift.dart +++ /dev/null @@ -1,428 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/settings.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/settings.entity.dart' - as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; - -typedef $$SettingsEntityTableCreateCompanionBuilder = - i1.SettingsEntityCompanion Function({ - required String key, - i0.Value value, - i0.Value updatedAt, - }); -typedef $$SettingsEntityTableUpdateCompanionBuilder = - i1.SettingsEntityCompanion Function({ - i0.Value key, - i0.Value value, - i0.Value updatedAt, - }); - -class $$SettingsEntityTableFilterComposer - extends i0.Composer { - $$SettingsEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get key => $composableBuilder( - column: $table.key, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get value => $composableBuilder( - column: $table.value, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); -} - -class $$SettingsEntityTableOrderingComposer - extends i0.Composer { - $$SettingsEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get key => $composableBuilder( - column: $table.key, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get value => $composableBuilder( - column: $table.value, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$SettingsEntityTableAnnotationComposer - extends i0.Composer { - $$SettingsEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get key => - $composableBuilder(column: $table.key, builder: (column) => column); - - i0.GeneratedColumn get value => - $composableBuilder(column: $table.value, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); -} - -class $$SettingsEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$SettingsEntityTable, - i1.SettingsEntityData, - i1.$$SettingsEntityTableFilterComposer, - i1.$$SettingsEntityTableOrderingComposer, - i1.$$SettingsEntityTableAnnotationComposer, - $$SettingsEntityTableCreateCompanionBuilder, - $$SettingsEntityTableUpdateCompanionBuilder, - ( - i1.SettingsEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$SettingsEntityTable, - i1.SettingsEntityData - >, - ), - i1.SettingsEntityData, - i0.PrefetchHooks Function() - > { - $$SettingsEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$SettingsEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$SettingsEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$SettingsEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => i1 - .$$SettingsEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value key = const i0.Value.absent(), - i0.Value value = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - }) => i1.SettingsEntityCompanion( - key: key, - value: value, - updatedAt: updatedAt, - ), - createCompanionCallback: - ({ - required String key, - i0.Value value = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - }) => i1.SettingsEntityCompanion.insert( - key: key, - value: value, - updatedAt: updatedAt, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$SettingsEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$SettingsEntityTable, - i1.SettingsEntityData, - i1.$$SettingsEntityTableFilterComposer, - i1.$$SettingsEntityTableOrderingComposer, - i1.$$SettingsEntityTableAnnotationComposer, - $$SettingsEntityTableCreateCompanionBuilder, - $$SettingsEntityTableUpdateCompanionBuilder, - ( - i1.SettingsEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$SettingsEntityTable, - i1.SettingsEntityData - >, - ), - i1.SettingsEntityData, - i0.PrefetchHooks Function() - >; - -class $SettingsEntityTable extends i2.SettingsEntity - with i0.TableInfo<$SettingsEntityTable, i1.SettingsEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $SettingsEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _keyMeta = const i0.VerificationMeta('key'); - @override - late final i0.GeneratedColumn key = i0.GeneratedColumn( - 'key', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _valueMeta = const i0.VerificationMeta( - 'value', - ); - @override - late final i0.GeneratedColumn value = i0.GeneratedColumn( - 'value', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( - 'updatedAt', - ); - @override - late final i0.GeneratedColumn updatedAt = - i0.GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i3.currentDateAndTime, - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('key')) { - context.handle( - _keyMeta, - key.isAcceptableOrUnknown(data['key']!, _keyMeta), - ); - } else if (isInserting) { - context.missing(_keyMeta); - } - if (data.containsKey('value')) { - context.handle( - _valueMeta, - value.isAcceptableOrUnknown(data['value']!, _valueMeta), - ); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {key}; - @override - i1.SettingsEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.SettingsEntityData( - key: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}value'], - ), - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - $SettingsEntityTable createAlias(String alias) { - return $SettingsEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class SettingsEntityData extends i0.DataClass - implements i0.Insertable { - final String key; - final String? value; - final DateTime updatedAt; - const SettingsEntityData({ - required this.key, - this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = i0.Variable(key); - if (!nullToAbsent || value != null) { - map['value'] = i0.Variable(value); - } - map['updated_at'] = i0.Variable(updatedAt); - return map; - } - - factory SettingsEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return SettingsEntityData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - i1.SettingsEntityData copyWith({ - String? key, - i0.Value value = const i0.Value.absent(), - DateTime? updatedAt, - }) => i1.SettingsEntityData( - key: key ?? this.key, - value: value.present ? value.value : this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsEntityData copyWithCompanion(i1.SettingsEntityCompanion data) { - return SettingsEntityData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsEntityData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.SettingsEntityData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsEntityCompanion - extends i0.UpdateCompanion { - final i0.Value key; - final i0.Value value; - final i0.Value updatedAt; - const SettingsEntityCompanion({ - this.key = const i0.Value.absent(), - this.value = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - }); - SettingsEntityCompanion.insert({ - required String key, - this.value = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - }) : key = i0.Value(key); - static i0.Insertable custom({ - i0.Expression? key, - i0.Expression? value, - i0.Expression? updatedAt, - }) { - return i0.RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - i1.SettingsEntityCompanion copyWith({ - i0.Value? key, - i0.Value? value, - i0.Value? updatedAt, - }) { - return i1.SettingsEntityCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = i0.Variable(key.value); - } - if (value.present) { - map['value'] = i0.Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsEntityCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/stack.entity.drift.dart b/mobile/lib/infrastructure/entities/stack.entity.drift.dart deleted file mode 100644 index 7846ca9374..0000000000 --- a/mobile/lib/infrastructure/entities/stack.entity.drift.dart +++ /dev/null @@ -1,708 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/stack.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/stack.entity.dart' as i2; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i3; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i4; -import 'package:drift/internal/modular.dart' as i5; - -typedef $$StackEntityTableCreateCompanionBuilder = - i1.StackEntityCompanion Function({ - required String id, - i0.Value createdAt, - i0.Value updatedAt, - required String ownerId, - required String primaryAssetId, - }); -typedef $$StackEntityTableUpdateCompanionBuilder = - i1.StackEntityCompanion Function({ - i0.Value id, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value ownerId, - i0.Value primaryAssetId, - }); - -final class $$StackEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$StackEntityTable, - i1.StackEntityData - > { - $$StackEntityTableReferences(super.$_db, super.$_table, super.$_typedResult); - - static i4.$UserEntityTable _ownerIdTable(i0.GeneratedDatabase db) => - i5.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias('stack_entity__owner_id__user_entity__id'); - - i4.$$UserEntityTableProcessedTableManager get ownerId { - final $_column = $_itemColumn('owner_id')!; - - final manager = i4 - .$$UserEntityTableTableManager( - $_db, - i5.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_ownerIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$StackEntityTableFilterComposer - extends i0.Composer { - $$StackEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get primaryAssetId => $composableBuilder( - column: $table.primaryAssetId, - builder: (column) => i0.ColumnFilters(column), - ); - - i4.$$UserEntityTableFilterComposer get ownerId { - final i4.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableFilterComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$StackEntityTableOrderingComposer - extends i0.Composer { - $$StackEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get primaryAssetId => $composableBuilder( - column: $table.primaryAssetId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i4.$$UserEntityTableOrderingComposer get ownerId { - final i4.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$StackEntityTableAnnotationComposer - extends i0.Composer { - $$StackEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); - - i0.GeneratedColumn get primaryAssetId => $composableBuilder( - column: $table.primaryAssetId, - builder: (column) => column, - ); - - i4.$$UserEntityTableAnnotationComposer get ownerId { - final i4.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.ownerId, - referencedTable: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i4.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i5.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$StackEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$StackEntityTable, - i1.StackEntityData, - i1.$$StackEntityTableFilterComposer, - i1.$$StackEntityTableOrderingComposer, - i1.$$StackEntityTableAnnotationComposer, - $$StackEntityTableCreateCompanionBuilder, - $$StackEntityTableUpdateCompanionBuilder, - (i1.StackEntityData, i1.$$StackEntityTableReferences), - i1.StackEntityData, - i0.PrefetchHooks Function({bool ownerId}) - > { - $$StackEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$StackEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$StackEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$StackEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$StackEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value ownerId = const i0.Value.absent(), - i0.Value primaryAssetId = const i0.Value.absent(), - }) => i1.StackEntityCompanion( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - ownerId: ownerId, - primaryAssetId: primaryAssetId, - ), - createCompanionCallback: - ({ - required String id, - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - required String ownerId, - required String primaryAssetId, - }) => i1.StackEntityCompanion.insert( - id: id, - createdAt: createdAt, - updatedAt: updatedAt, - ownerId: ownerId, - primaryAssetId: primaryAssetId, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$StackEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({ownerId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (ownerId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.ownerId, - referencedTable: i1.$$StackEntityTableReferences - ._ownerIdTable(db), - referencedColumn: i1 - .$$StackEntityTableReferences - ._ownerIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$StackEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$StackEntityTable, - i1.StackEntityData, - i1.$$StackEntityTableFilterComposer, - i1.$$StackEntityTableOrderingComposer, - i1.$$StackEntityTableAnnotationComposer, - $$StackEntityTableCreateCompanionBuilder, - $$StackEntityTableUpdateCompanionBuilder, - (i1.StackEntityData, i1.$$StackEntityTableReferences), - i1.StackEntityData, - i0.PrefetchHooks Function({bool ownerId}) - >; -i0.Index get idxStackPrimaryAssetId => i0.Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', -); - -class $StackEntityTable extends i2.StackEntity - with i0.TableInfo<$StackEntityTable, i1.StackEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $StackEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i3.currentDateAndTime, - ); - static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( - 'updatedAt', - ); - @override - late final i0.GeneratedColumn updatedAt = - i0.GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i3.currentDateAndTime, - ); - static const i0.VerificationMeta _ownerIdMeta = const i0.VerificationMeta( - 'ownerId', - ); - @override - late final i0.GeneratedColumn ownerId = i0.GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - static const i0.VerificationMeta _primaryAssetIdMeta = - const i0.VerificationMeta('primaryAssetId'); - @override - late final i0.GeneratedColumn primaryAssetId = - i0.GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - if (data.containsKey('owner_id')) { - context.handle( - _ownerIdMeta, - ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta), - ); - } else if (isInserting) { - context.missing(_ownerIdMeta); - } - if (data.containsKey('primary_asset_id')) { - context.handle( - _primaryAssetIdMeta, - primaryAssetId.isAcceptableOrUnknown( - data['primary_asset_id']!, - _primaryAssetIdMeta, - ), - ); - } else if (isInserting) { - context.missing(_primaryAssetIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.StackEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - $StackEntityTable createAlias(String alias) { - return $StackEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - map['owner_id'] = i0.Variable(ownerId); - map['primary_asset_id'] = i0.Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - i1.StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => i1.StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(i1.StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value ownerId; - final i0.Value primaryAssetId; - const StackEntityCompanion({ - this.id = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.ownerId = const i0.Value.absent(), - this.primaryAssetId = const i0.Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = i0.Value(id), - ownerId = i0.Value(ownerId), - primaryAssetId = i0.Value(primaryAssetId); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? ownerId, - i0.Expression? primaryAssetId, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - i1.StackEntityCompanion copyWith({ - i0.Value? id, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? ownerId, - i0.Value? primaryAssetId, - }) { - return i1.StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = i0.Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = i0.Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/store.entity.drift.dart b/mobile/lib/infrastructure/entities/store.entity.drift.dart deleted file mode 100644 index 327b0e95d9..0000000000 --- a/mobile/lib/infrastructure/entities/store.entity.drift.dart +++ /dev/null @@ -1,426 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/store.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/store.entity.dart' as i2; - -typedef $$StoreEntityTableCreateCompanionBuilder = - i1.StoreEntityCompanion Function({ - required int id, - i0.Value stringValue, - i0.Value intValue, - }); -typedef $$StoreEntityTableUpdateCompanionBuilder = - i1.StoreEntityCompanion Function({ - i0.Value id, - i0.Value stringValue, - i0.Value intValue, - }); - -class $$StoreEntityTableFilterComposer - extends i0.Composer { - $$StoreEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get stringValue => $composableBuilder( - column: $table.stringValue, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get intValue => $composableBuilder( - column: $table.intValue, - builder: (column) => i0.ColumnFilters(column), - ); -} - -class $$StoreEntityTableOrderingComposer - extends i0.Composer { - $$StoreEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get stringValue => $composableBuilder( - column: $table.stringValue, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get intValue => $composableBuilder( - column: $table.intValue, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$StoreEntityTableAnnotationComposer - extends i0.Composer { - $$StoreEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get stringValue => $composableBuilder( - column: $table.stringValue, - builder: (column) => column, - ); - - i0.GeneratedColumn get intValue => - $composableBuilder(column: $table.intValue, builder: (column) => column); -} - -class $$StoreEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$StoreEntityTable, - i1.StoreEntityData, - i1.$$StoreEntityTableFilterComposer, - i1.$$StoreEntityTableOrderingComposer, - i1.$$StoreEntityTableAnnotationComposer, - $$StoreEntityTableCreateCompanionBuilder, - $$StoreEntityTableUpdateCompanionBuilder, - ( - i1.StoreEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$StoreEntityTable, - i1.StoreEntityData - >, - ), - i1.StoreEntityData, - i0.PrefetchHooks Function() - > { - $$StoreEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$StoreEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$StoreEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$StoreEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$StoreEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value stringValue = const i0.Value.absent(), - i0.Value intValue = const i0.Value.absent(), - }) => i1.StoreEntityCompanion( - id: id, - stringValue: stringValue, - intValue: intValue, - ), - createCompanionCallback: - ({ - required int id, - i0.Value stringValue = const i0.Value.absent(), - i0.Value intValue = const i0.Value.absent(), - }) => i1.StoreEntityCompanion.insert( - id: id, - stringValue: stringValue, - intValue: intValue, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$StoreEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$StoreEntityTable, - i1.StoreEntityData, - i1.$$StoreEntityTableFilterComposer, - i1.$$StoreEntityTableOrderingComposer, - i1.$$StoreEntityTableAnnotationComposer, - $$StoreEntityTableCreateCompanionBuilder, - $$StoreEntityTableUpdateCompanionBuilder, - ( - i1.StoreEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$StoreEntityTable, - i1.StoreEntityData - >, - ), - i1.StoreEntityData, - i0.PrefetchHooks Function() - >; - -class $StoreEntityTable extends i2.StoreEntity - with i0.TableInfo<$StoreEntityTable, i1.StoreEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $StoreEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _stringValueMeta = const i0.VerificationMeta( - 'stringValue', - ); - @override - late final i0.GeneratedColumn stringValue = - i0.GeneratedColumn( - 'string_value', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _intValueMeta = const i0.VerificationMeta( - 'intValue', - ); - @override - late final i0.GeneratedColumn intValue = i0.GeneratedColumn( - 'int_value', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('string_value')) { - context.handle( - _stringValueMeta, - stringValue.isAcceptableOrUnknown( - data['string_value']!, - _stringValueMeta, - ), - ); - } - if (data.containsKey('int_value')) { - context.handle( - _intValueMeta, - intValue.isAcceptableOrUnknown(data['int_value']!, _intValueMeta), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.StoreEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - $StoreEntityTable createAlias(String alias) { - return $StoreEntityTable(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends i0.DataClass - implements i0.Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = i0.Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = i0.Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - i1.StoreEntityData copyWith({ - int? id, - i0.Value stringValue = const i0.Value.absent(), - i0.Value intValue = const i0.Value.absent(), - }) => i1.StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(i1.StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value stringValue; - final i0.Value intValue; - const StoreEntityCompanion({ - this.id = const i0.Value.absent(), - this.stringValue = const i0.Value.absent(), - this.intValue = const i0.Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const i0.Value.absent(), - this.intValue = const i0.Value.absent(), - }) : id = i0.Value(id); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? stringValue, - i0.Expression? intValue, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - i1.StoreEntityCompanion copyWith({ - i0.Value? id, - i0.Value? stringValue, - i0.Value? intValue, - }) { - return i1.StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = i0.Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = i0.Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart deleted file mode 100644 index 068d008e92..0000000000 --- a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart +++ /dev/null @@ -1,1241 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.dart' - as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; - -typedef $$TrashedLocalAssetEntityTableCreateCompanionBuilder = - i1.TrashedLocalAssetEntityCompanion Function({ - required String name, - required i2.AssetType type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - required String id, - required String albumId, - i0.Value checksum, - i0.Value isFavorite, - i0.Value orientation, - required i3.TrashOrigin source, - i0.Value playbackStyle, - }); -typedef $$TrashedLocalAssetEntityTableUpdateCompanionBuilder = - i1.TrashedLocalAssetEntityCompanion Function({ - i0.Value name, - i0.Value type, - i0.Value createdAt, - i0.Value updatedAt, - i0.Value width, - i0.Value height, - i0.Value durationMs, - i0.Value id, - i0.Value albumId, - i0.Value checksum, - i0.Value isFavorite, - i0.Value orientation, - i0.Value source, - i0.Value playbackStyle, - }); - -class $$TrashedLocalAssetEntityTableFilterComposer - extends - i0.Composer { - $$TrashedLocalAssetEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters get type => - $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnFilters get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get albumId => $composableBuilder( - column: $table.albumId, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get checksum => $composableBuilder( - column: $table.checksum, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get source => $composableBuilder( - column: $table.source, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnWithTypeConverterFilters< - i2.AssetPlaybackStyle, - i2.AssetPlaybackStyle, - int - > - get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); -} - -class $$TrashedLocalAssetEntityTableOrderingComposer - extends - i0.Composer { - $$TrashedLocalAssetEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get type => $composableBuilder( - column: $table.type, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get createdAt => $composableBuilder( - column: $table.createdAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get updatedAt => $composableBuilder( - column: $table.updatedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get width => $composableBuilder( - column: $table.width, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get height => $composableBuilder( - column: $table.height, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get albumId => $composableBuilder( - column: $table.albumId, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get checksum => $composableBuilder( - column: $table.checksum, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get source => $composableBuilder( - column: $table.source, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$TrashedLocalAssetEntityTableAnnotationComposer - extends - i0.Composer { - $$TrashedLocalAssetEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter get type => - $composableBuilder(column: $table.type, builder: (column) => column); - - i0.GeneratedColumn get createdAt => - $composableBuilder(column: $table.createdAt, builder: (column) => column); - - i0.GeneratedColumn get updatedAt => - $composableBuilder(column: $table.updatedAt, builder: (column) => column); - - i0.GeneratedColumn get width => - $composableBuilder(column: $table.width, builder: (column) => column); - - i0.GeneratedColumn get height => - $composableBuilder(column: $table.height, builder: (column) => column); - - i0.GeneratedColumn get durationMs => $composableBuilder( - column: $table.durationMs, - builder: (column) => column, - ); - - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get albumId => - $composableBuilder(column: $table.albumId, builder: (column) => column); - - i0.GeneratedColumn get checksum => - $composableBuilder(column: $table.checksum, builder: (column) => column); - - i0.GeneratedColumn get isFavorite => $composableBuilder( - column: $table.isFavorite, - builder: (column) => column, - ); - - i0.GeneratedColumn get orientation => $composableBuilder( - column: $table.orientation, - builder: (column) => column, - ); - - i0.GeneratedColumnWithTypeConverter get source => - $composableBuilder(column: $table.source, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter - get playbackStyle => $composableBuilder( - column: $table.playbackStyle, - builder: (column) => column, - ); -} - -class $$TrashedLocalAssetEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$TrashedLocalAssetEntityTable, - i1.TrashedLocalAssetEntityData, - i1.$$TrashedLocalAssetEntityTableFilterComposer, - i1.$$TrashedLocalAssetEntityTableOrderingComposer, - i1.$$TrashedLocalAssetEntityTableAnnotationComposer, - $$TrashedLocalAssetEntityTableCreateCompanionBuilder, - $$TrashedLocalAssetEntityTableUpdateCompanionBuilder, - ( - i1.TrashedLocalAssetEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$TrashedLocalAssetEntityTable, - i1.TrashedLocalAssetEntityData - >, - ), - i1.TrashedLocalAssetEntityData, - i0.PrefetchHooks Function() - > { - $$TrashedLocalAssetEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$TrashedLocalAssetEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$TrashedLocalAssetEntityTableFilterComposer( - $db: db, - $table: table, - ), - createOrderingComposer: () => - i1.$$TrashedLocalAssetEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$TrashedLocalAssetEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value name = const i0.Value.absent(), - i0.Value type = const i0.Value.absent(), - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value durationMs = const i0.Value.absent(), - i0.Value id = const i0.Value.absent(), - i0.Value albumId = const i0.Value.absent(), - i0.Value checksum = const i0.Value.absent(), - i0.Value isFavorite = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - i0.Value source = const i0.Value.absent(), - i0.Value playbackStyle = - const i0.Value.absent(), - }) => i1.TrashedLocalAssetEntityCompanion( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - albumId: albumId, - checksum: checksum, - isFavorite: isFavorite, - orientation: orientation, - source: source, - playbackStyle: playbackStyle, - ), - createCompanionCallback: - ({ - required String name, - required i2.AssetType type, - i0.Value createdAt = const i0.Value.absent(), - i0.Value updatedAt = const i0.Value.absent(), - i0.Value width = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value durationMs = const i0.Value.absent(), - required String id, - required String albumId, - i0.Value checksum = const i0.Value.absent(), - i0.Value isFavorite = const i0.Value.absent(), - i0.Value orientation = const i0.Value.absent(), - required i3.TrashOrigin source, - i0.Value playbackStyle = - const i0.Value.absent(), - }) => i1.TrashedLocalAssetEntityCompanion.insert( - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - id: id, - albumId: albumId, - checksum: checksum, - isFavorite: isFavorite, - orientation: orientation, - source: source, - playbackStyle: playbackStyle, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$TrashedLocalAssetEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$TrashedLocalAssetEntityTable, - i1.TrashedLocalAssetEntityData, - i1.$$TrashedLocalAssetEntityTableFilterComposer, - i1.$$TrashedLocalAssetEntityTableOrderingComposer, - i1.$$TrashedLocalAssetEntityTableAnnotationComposer, - $$TrashedLocalAssetEntityTableCreateCompanionBuilder, - $$TrashedLocalAssetEntityTableUpdateCompanionBuilder, - ( - i1.TrashedLocalAssetEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$TrashedLocalAssetEntityTable, - i1.TrashedLocalAssetEntityData - >, - ), - i1.TrashedLocalAssetEntityData, - i0.PrefetchHooks Function() - >; -i0.Index get idxTrashedLocalAssetChecksum => i0.Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', -); - -class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity - with - i0.TableInfo< - $TrashedLocalAssetEntityTable, - i1.TrashedLocalAssetEntityData - > { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $TrashedLocalAssetEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - late final i0.GeneratedColumnWithTypeConverter type = - i0.GeneratedColumn( - 'type', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$TrashedLocalAssetEntityTable.$convertertype, - ); - static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( - 'createdAt', - ); - @override - late final i0.GeneratedColumn createdAt = - i0.GeneratedColumn( - 'created_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( - 'updatedAt', - ); - @override - late final i0.GeneratedColumn updatedAt = - i0.GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - static const i0.VerificationMeta _widthMeta = const i0.VerificationMeta( - 'width', - ); - @override - late final i0.GeneratedColumn width = i0.GeneratedColumn( - 'width', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _heightMeta = const i0.VerificationMeta( - 'height', - ); - @override - late final i0.GeneratedColumn height = i0.GeneratedColumn( - 'height', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _durationMsMeta = const i0.VerificationMeta( - 'durationMs', - ); - @override - late final i0.GeneratedColumn durationMs = i0.GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _albumIdMeta = const i0.VerificationMeta( - 'albumId', - ); - @override - late final i0.GeneratedColumn albumId = i0.GeneratedColumn( - 'album_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _checksumMeta = const i0.VerificationMeta( - 'checksum', - ); - @override - late final i0.GeneratedColumn checksum = i0.GeneratedColumn( - 'checksum', - aliasedName, - true, - type: i0.DriftSqlType.string, - requiredDuringInsert: false, - ); - static const i0.VerificationMeta _isFavoriteMeta = const i0.VerificationMeta( - 'isFavorite', - ); - @override - late final i0.GeneratedColumn isFavorite = i0.GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _orientationMeta = const i0.VerificationMeta( - 'orientation', - ); - @override - late final i0.GeneratedColumn orientation = i0.GeneratedColumn( - 'orientation', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ); - @override - late final i0.GeneratedColumnWithTypeConverter source = - i0.GeneratedColumn( - 'source', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$TrashedLocalAssetEntityTable.$convertersource, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - playbackStyle = - i0.GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ).withConverter( - i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('created_at')) { - context.handle( - _createdAtMeta, - createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), - ); - } - if (data.containsKey('updated_at')) { - context.handle( - _updatedAtMeta, - updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), - ); - } - if (data.containsKey('width')) { - context.handle( - _widthMeta, - width.isAcceptableOrUnknown(data['width']!, _widthMeta), - ); - } - if (data.containsKey('height')) { - context.handle( - _heightMeta, - height.isAcceptableOrUnknown(data['height']!, _heightMeta), - ); - } - if (data.containsKey('duration_ms')) { - context.handle( - _durationMsMeta, - durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta), - ); - } - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('album_id')) { - context.handle( - _albumIdMeta, - albumId.isAcceptableOrUnknown(data['album_id']!, _albumIdMeta), - ); - } else if (isInserting) { - context.missing(_albumIdMeta); - } - if (data.containsKey('checksum')) { - context.handle( - _checksumMeta, - checksum.isAcceptableOrUnknown(data['checksum']!, _checksumMeta), - ); - } - if (data.containsKey('is_favorite')) { - context.handle( - _isFavoriteMeta, - isFavorite.isAcceptableOrUnknown(data['is_favorite']!, _isFavoriteMeta), - ); - } - if (data.containsKey('orientation')) { - context.handle( - _orientationMeta, - orientation.isAcceptableOrUnknown( - data['orientation']!, - _orientationMeta, - ), - ); - } - return context; - } - - @override - Set get $primaryKey => {id, albumId}; - @override - i1.TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: i1.$TrashedLocalAssetEntityTable.$convertertype.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - ), - createdAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: i1.$TrashedLocalAssetEntityTable.$convertersource.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ), - playbackStyle: i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle - .fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ), - ); - } - - @override - $TrashedLocalAssetEntityTable createAlias(String alias) { - return $TrashedLocalAssetEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $convertertype = - const i0.EnumIndexConverter(i2.AssetType.values); - static i0.JsonTypeConverter2 $convertersource = - const i0.EnumIndexConverter(i3.TrashOrigin.values); - static i0.JsonTypeConverter2 - $converterplaybackStyle = const i0.EnumIndexConverter( - i2.AssetPlaybackStyle.values, - ); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends i0.DataClass - implements i0.Insertable { - final String name; - final i2.AssetType type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final i3.TrashOrigin source; - final i2.AssetPlaybackStyle playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = i0.Variable(name); - { - map['type'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$convertertype.toSql(type), - ); - } - map['created_at'] = i0.Variable(createdAt); - map['updated_at'] = i0.Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = i0.Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = i0.Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = i0.Variable(durationMs); - } - map['id'] = i0.Variable(id); - map['album_id'] = i0.Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = i0.Variable(checksum); - } - map['is_favorite'] = i0.Variable(isFavorite); - map['orientation'] = i0.Variable(orientation); - { - map['source'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$convertersource.toSql(source), - ); - } - { - map['playback_style'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle.toSql( - playbackStyle, - ), - ); - } - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: i1.$TrashedLocalAssetEntityTable.$convertertype.fromJson( - serializer.fromJson(json['type']), - ), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: i1.$TrashedLocalAssetEntityTable.$convertersource.fromJson( - serializer.fromJson(json['source']), - ), - playbackStyle: i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle - .fromJson(serializer.fromJson(json['playbackStyle'])), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson( - i1.$TrashedLocalAssetEntityTable.$convertertype.toJson(type), - ), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson( - i1.$TrashedLocalAssetEntityTable.$convertersource.toJson(source), - ), - 'playbackStyle': serializer.toJson( - i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle.toJson( - playbackStyle, - ), - ), - }; - } - - i1.TrashedLocalAssetEntityData copyWith({ - String? name, - i2.AssetType? type, - DateTime? createdAt, - DateTime? updatedAt, - i0.Value width = const i0.Value.absent(), - i0.Value height = const i0.Value.absent(), - i0.Value durationMs = const i0.Value.absent(), - String? id, - String? albumId, - i0.Value checksum = const i0.Value.absent(), - bool? isFavorite, - int? orientation, - i3.TrashOrigin? source, - i2.AssetPlaybackStyle? playbackStyle, - }) => i1.TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - i1.TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends i0.UpdateCompanion { - final i0.Value name; - final i0.Value type; - final i0.Value createdAt; - final i0.Value updatedAt; - final i0.Value width; - final i0.Value height; - final i0.Value durationMs; - final i0.Value id; - final i0.Value albumId; - final i0.Value checksum; - final i0.Value isFavorite; - final i0.Value orientation; - final i0.Value source; - final i0.Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const i0.Value.absent(), - this.type = const i0.Value.absent(), - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.durationMs = const i0.Value.absent(), - this.id = const i0.Value.absent(), - this.albumId = const i0.Value.absent(), - this.checksum = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - this.source = const i0.Value.absent(), - this.playbackStyle = const i0.Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required i2.AssetType type, - this.createdAt = const i0.Value.absent(), - this.updatedAt = const i0.Value.absent(), - this.width = const i0.Value.absent(), - this.height = const i0.Value.absent(), - this.durationMs = const i0.Value.absent(), - required String id, - required String albumId, - this.checksum = const i0.Value.absent(), - this.isFavorite = const i0.Value.absent(), - this.orientation = const i0.Value.absent(), - required i3.TrashOrigin source, - this.playbackStyle = const i0.Value.absent(), - }) : name = i0.Value(name), - type = i0.Value(type), - id = i0.Value(id), - albumId = i0.Value(albumId), - source = i0.Value(source); - static i0.Insertable custom({ - i0.Expression? name, - i0.Expression? type, - i0.Expression? createdAt, - i0.Expression? updatedAt, - i0.Expression? width, - i0.Expression? height, - i0.Expression? durationMs, - i0.Expression? id, - i0.Expression? albumId, - i0.Expression? checksum, - i0.Expression? isFavorite, - i0.Expression? orientation, - i0.Expression? source, - i0.Expression? playbackStyle, - }) { - return i0.RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - i1.TrashedLocalAssetEntityCompanion copyWith({ - i0.Value? name, - i0.Value? type, - i0.Value? createdAt, - i0.Value? updatedAt, - i0.Value? width, - i0.Value? height, - i0.Value? durationMs, - i0.Value? id, - i0.Value? albumId, - i0.Value? checksum, - i0.Value? isFavorite, - i0.Value? orientation, - i0.Value? source, - i0.Value? playbackStyle, - }) { - return i1.TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (type.present) { - map['type'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$convertertype.toSql(type.value), - ); - } - if (createdAt.present) { - map['created_at'] = i0.Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = i0.Variable(updatedAt.value); - } - if (width.present) { - map['width'] = i0.Variable(width.value); - } - if (height.present) { - map['height'] = i0.Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = i0.Variable(durationMs.value); - } - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (albumId.present) { - map['album_id'] = i0.Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = i0.Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = i0.Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = i0.Variable(orientation.value); - } - if (source.present) { - map['source'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$convertersource.toSql(source.value), - ); - } - if (playbackStyle.present) { - map['playback_style'] = i0.Variable( - i1.$TrashedLocalAssetEntityTable.$converterplaybackStyle.toSql( - playbackStyle.value, - ), - ); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -i0.Index get idxTrashedLocalAssetAlbum => i0.Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', -); diff --git a/mobile/lib/infrastructure/entities/user.entity.drift.dart b/mobile/lib/infrastructure/entities/user.entity.drift.dart deleted file mode 100644 index 083c14a095..0000000000 --- a/mobile/lib/infrastructure/entities/user.entity.drift.dart +++ /dev/null @@ -1,655 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/user.model.dart' as i2; -import 'package:immich_mobile/infrastructure/entities/user.entity.dart' as i3; -import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; - -typedef $$UserEntityTableCreateCompanionBuilder = - i1.UserEntityCompanion Function({ - required String id, - required String name, - required String email, - i0.Value hasProfileImage, - i0.Value profileChangedAt, - i0.Value avatarColor, - }); -typedef $$UserEntityTableUpdateCompanionBuilder = - i1.UserEntityCompanion Function({ - i0.Value id, - i0.Value name, - i0.Value email, - i0.Value hasProfileImage, - i0.Value profileChangedAt, - i0.Value avatarColor, - }); - -class $$UserEntityTableFilterComposer - extends i0.Composer { - $$UserEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnFilters get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get email => $composableBuilder( - column: $table.email, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnFilters get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => i0.ColumnFilters(column), - ); - - i0.ColumnWithTypeConverterFilters - get avatarColor => $composableBuilder( - column: $table.avatarColor, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); -} - -class $$UserEntityTableOrderingComposer - extends i0.Composer { - $$UserEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get id => $composableBuilder( - column: $table.id, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get name => $composableBuilder( - column: $table.name, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get email => $composableBuilder( - column: $table.email, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get avatarColor => $composableBuilder( - column: $table.avatarColor, - builder: (column) => i0.ColumnOrderings(column), - ); -} - -class $$UserEntityTableAnnotationComposer - extends i0.Composer { - $$UserEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumn get id => - $composableBuilder(column: $table.id, builder: (column) => column); - - i0.GeneratedColumn get name => - $composableBuilder(column: $table.name, builder: (column) => column); - - i0.GeneratedColumn get email => - $composableBuilder(column: $table.email, builder: (column) => column); - - i0.GeneratedColumn get hasProfileImage => $composableBuilder( - column: $table.hasProfileImage, - builder: (column) => column, - ); - - i0.GeneratedColumn get profileChangedAt => $composableBuilder( - column: $table.profileChangedAt, - builder: (column) => column, - ); - - i0.GeneratedColumnWithTypeConverter get avatarColor => - $composableBuilder( - column: $table.avatarColor, - builder: (column) => column, - ); -} - -class $$UserEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$UserEntityTable, - i1.UserEntityData, - i1.$$UserEntityTableFilterComposer, - i1.$$UserEntityTableOrderingComposer, - i1.$$UserEntityTableAnnotationComposer, - $$UserEntityTableCreateCompanionBuilder, - $$UserEntityTableUpdateCompanionBuilder, - ( - i1.UserEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$UserEntityTable, - i1.UserEntityData - >, - ), - i1.UserEntityData, - i0.PrefetchHooks Function() - > { - $$UserEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$UserEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => - i1.$$UserEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$UserEntityTableOrderingComposer($db: db, $table: table), - createComputedFieldComposer: () => - i1.$$UserEntityTableAnnotationComposer($db: db, $table: table), - updateCompanionCallback: - ({ - i0.Value id = const i0.Value.absent(), - i0.Value name = const i0.Value.absent(), - i0.Value email = const i0.Value.absent(), - i0.Value hasProfileImage = const i0.Value.absent(), - i0.Value profileChangedAt = const i0.Value.absent(), - i0.Value avatarColor = const i0.Value.absent(), - }) => i1.UserEntityCompanion( - id: id, - name: name, - email: email, - hasProfileImage: hasProfileImage, - profileChangedAt: profileChangedAt, - avatarColor: avatarColor, - ), - createCompanionCallback: - ({ - required String id, - required String name, - required String email, - i0.Value hasProfileImage = const i0.Value.absent(), - i0.Value profileChangedAt = const i0.Value.absent(), - i0.Value avatarColor = const i0.Value.absent(), - }) => i1.UserEntityCompanion.insert( - id: id, - name: name, - email: email, - hasProfileImage: hasProfileImage, - profileChangedAt: profileChangedAt, - avatarColor: avatarColor, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - ), - ); -} - -typedef $$UserEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$UserEntityTable, - i1.UserEntityData, - i1.$$UserEntityTableFilterComposer, - i1.$$UserEntityTableOrderingComposer, - i1.$$UserEntityTableAnnotationComposer, - $$UserEntityTableCreateCompanionBuilder, - $$UserEntityTableUpdateCompanionBuilder, - ( - i1.UserEntityData, - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$UserEntityTable, - i1.UserEntityData - >, - ), - i1.UserEntityData, - i0.PrefetchHooks Function() - >; - -class $UserEntityTable extends i3.UserEntity - with i0.TableInfo<$UserEntityTable, i1.UserEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $UserEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); - @override - late final i0.GeneratedColumn id = i0.GeneratedColumn( - 'id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta( - 'name', - ); - @override - late final i0.GeneratedColumn name = i0.GeneratedColumn( - 'name', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _emailMeta = const i0.VerificationMeta( - 'email', - ); - @override - late final i0.GeneratedColumn email = i0.GeneratedColumn( - 'email', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - ); - static const i0.VerificationMeta _hasProfileImageMeta = - const i0.VerificationMeta('hasProfileImage'); - @override - late final i0.GeneratedColumn hasProfileImage = - i0.GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: i0.DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const i4.Constant(false), - ); - static const i0.VerificationMeta _profileChangedAtMeta = - const i0.VerificationMeta('profileChangedAt'); - @override - late final i0.GeneratedColumn profileChangedAt = - i0.GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: i0.DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: i4.currentDateAndTime, - ); - @override - late final i0.GeneratedColumnWithTypeConverter - avatarColor = i0.GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const i4.Constant(0), - ).withConverter(i1.$UserEntityTable.$converteravatarColor); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('id')) { - context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); - } else if (isInserting) { - context.missing(_idMeta); - } - if (data.containsKey('name')) { - context.handle( - _nameMeta, - name.isAcceptableOrUnknown(data['name']!, _nameMeta), - ); - } else if (isInserting) { - context.missing(_nameMeta); - } - if (data.containsKey('email')) { - context.handle( - _emailMeta, - email.isAcceptableOrUnknown(data['email']!, _emailMeta), - ); - } else if (isInserting) { - context.missing(_emailMeta); - } - if (data.containsKey('has_profile_image')) { - context.handle( - _hasProfileImageMeta, - hasProfileImage.isAcceptableOrUnknown( - data['has_profile_image']!, - _hasProfileImageMeta, - ), - ); - } - if (data.containsKey('profile_changed_at')) { - context.handle( - _profileChangedAtMeta, - profileChangedAt.isAcceptableOrUnknown( - data['profile_changed_at']!, - _profileChangedAtMeta, - ), - ); - } - return context; - } - - @override - Set get $primaryKey => {id}; - @override - i1.UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.UserEntityData( - id: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - i0.DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - i0.DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: i1.$UserEntityTable.$converteravatarColor.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ), - ); - } - - @override - $UserEntityTable createAlias(String alias) { - return $UserEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converteravatarColor = - const i0.EnumIndexConverter(i2.AvatarColor.values); - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends i0.DataClass - implements i0.Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final i2.AvatarColor avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = i0.Variable(id); - map['name'] = i0.Variable(name); - map['email'] = i0.Variable(email); - map['has_profile_image'] = i0.Variable(hasProfileImage); - map['profile_changed_at'] = i0.Variable(profileChangedAt); - { - map['avatar_color'] = i0.Variable( - i1.$UserEntityTable.$converteravatarColor.toSql(avatarColor), - ); - } - return map; - } - - factory UserEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: i1.$UserEntityTable.$converteravatarColor.fromJson( - serializer.fromJson(json['avatarColor']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson( - i1.$UserEntityTable.$converteravatarColor.toJson(avatarColor), - ), - }; - } - - i1.UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - i2.AvatarColor? avatarColor, - }) => i1.UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(i1.UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends i0.UpdateCompanion { - final i0.Value id; - final i0.Value name; - final i0.Value email; - final i0.Value hasProfileImage; - final i0.Value profileChangedAt; - final i0.Value avatarColor; - const UserEntityCompanion({ - this.id = const i0.Value.absent(), - this.name = const i0.Value.absent(), - this.email = const i0.Value.absent(), - this.hasProfileImage = const i0.Value.absent(), - this.profileChangedAt = const i0.Value.absent(), - this.avatarColor = const i0.Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const i0.Value.absent(), - this.profileChangedAt = const i0.Value.absent(), - this.avatarColor = const i0.Value.absent(), - }) : id = i0.Value(id), - name = i0.Value(name), - email = i0.Value(email); - static i0.Insertable custom({ - i0.Expression? id, - i0.Expression? name, - i0.Expression? email, - i0.Expression? hasProfileImage, - i0.Expression? profileChangedAt, - i0.Expression? avatarColor, - }) { - return i0.RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - i1.UserEntityCompanion copyWith({ - i0.Value? id, - i0.Value? name, - i0.Value? email, - i0.Value? hasProfileImage, - i0.Value? profileChangedAt, - i0.Value? avatarColor, - }) { - return i1.UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = i0.Variable(id.value); - } - if (name.present) { - map['name'] = i0.Variable(name.value); - } - if (email.present) { - map['email'] = i0.Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = i0.Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = i0.Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = i0.Variable( - i1.$UserEntityTable.$converteravatarColor.toSql(avatarColor.value), - ); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/entities/user_metadata.entity.drift.dart b/mobile/lib/infrastructure/entities/user_metadata.entity.drift.dart deleted file mode 100644 index 6ea08d09d2..0000000000 --- a/mobile/lib/infrastructure/entities/user_metadata.entity.drift.dart +++ /dev/null @@ -1,613 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.drift.dart' - as i1; -import 'package:immich_mobile/domain/models/user_metadata.model.dart' as i2; -import 'dart:typed_data' as i3; -import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.dart' - as i4; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i5; -import 'package:drift/internal/modular.dart' as i6; - -typedef $$UserMetadataEntityTableCreateCompanionBuilder = - i1.UserMetadataEntityCompanion Function({ - required String userId, - required i2.UserMetadataKey key, - required Map value, - }); -typedef $$UserMetadataEntityTableUpdateCompanionBuilder = - i1.UserMetadataEntityCompanion Function({ - i0.Value userId, - i0.Value key, - i0.Value> value, - }); - -final class $$UserMetadataEntityTableReferences - extends - i0.BaseReferences< - i0.GeneratedDatabase, - i1.$UserMetadataEntityTable, - i1.UserMetadataEntityData - > { - $$UserMetadataEntityTableReferences( - super.$_db, - super.$_table, - super.$_typedResult, - ); - - static i5.$UserEntityTable _userIdTable(i0.GeneratedDatabase db) => - i6.ReadDatabaseContainer(db) - .resultSet('user_entity') - .createAlias('user_metadata_entity__user_id__user_entity__id'); - - i5.$$UserEntityTableProcessedTableManager get userId { - final $_column = $_itemColumn('user_id')!; - - final manager = i5 - .$$UserEntityTableTableManager( - $_db, - i6.ReadDatabaseContainer( - $_db, - ).resultSet('user_entity'), - ) - .filter((f) => f.id.sqlEquals($_column)); - final item = $_typedResult.readTableOrNull(_userIdTable($_db)); - if (item == null) return manager; - return i0.ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item]), - ); - } -} - -class $$UserMetadataEntityTableFilterComposer - extends i0.Composer { - $$UserMetadataEntityTableFilterComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnWithTypeConverterFilters - get key => $composableBuilder( - column: $table.key, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i0.ColumnWithTypeConverterFilters< - Map, - Map, - i3.Uint8List - > - get value => $composableBuilder( - column: $table.value, - builder: (column) => i0.ColumnWithTypeConverterFilters(column), - ); - - i5.$$UserEntityTableFilterComposer get userId { - final i5.$$UserEntityTableFilterComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableFilterComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$UserMetadataEntityTableOrderingComposer - extends i0.Composer { - $$UserMetadataEntityTableOrderingComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.ColumnOrderings get key => $composableBuilder( - column: $table.key, - builder: (column) => i0.ColumnOrderings(column), - ); - - i0.ColumnOrderings get value => $composableBuilder( - column: $table.value, - builder: (column) => i0.ColumnOrderings(column), - ); - - i5.$$UserEntityTableOrderingComposer get userId { - final i5.$$UserEntityTableOrderingComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableOrderingComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$UserMetadataEntityTableAnnotationComposer - extends i0.Composer { - $$UserMetadataEntityTableAnnotationComposer({ - required super.$db, - required super.$table, - super.joinBuilder, - super.$addJoinBuilderToRootComposer, - super.$removeJoinBuilderFromRootComposer, - }); - i0.GeneratedColumnWithTypeConverter get key => - $composableBuilder(column: $table.key, builder: (column) => column); - - i0.GeneratedColumnWithTypeConverter, i3.Uint8List> - get value => - $composableBuilder(column: $table.value, builder: (column) => column); - - i5.$$UserEntityTableAnnotationComposer get userId { - final i5.$$UserEntityTableAnnotationComposer composer = $composerBuilder( - composer: this, - getCurrentColumn: (t) => t.userId, - referencedTable: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - getReferencedColumn: (t) => t.id, - builder: - ( - joinBuilder, { - $addJoinBuilderToRootComposer, - $removeJoinBuilderFromRootComposer, - }) => i5.$$UserEntityTableAnnotationComposer( - $db: $db, - $table: i6.ReadDatabaseContainer( - $db, - ).resultSet('user_entity'), - $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, - joinBuilder: joinBuilder, - $removeJoinBuilderFromRootComposer: - $removeJoinBuilderFromRootComposer, - ), - ); - return composer; - } -} - -class $$UserMetadataEntityTableTableManager - extends - i0.RootTableManager< - i0.GeneratedDatabase, - i1.$UserMetadataEntityTable, - i1.UserMetadataEntityData, - i1.$$UserMetadataEntityTableFilterComposer, - i1.$$UserMetadataEntityTableOrderingComposer, - i1.$$UserMetadataEntityTableAnnotationComposer, - $$UserMetadataEntityTableCreateCompanionBuilder, - $$UserMetadataEntityTableUpdateCompanionBuilder, - (i1.UserMetadataEntityData, i1.$$UserMetadataEntityTableReferences), - i1.UserMetadataEntityData, - i0.PrefetchHooks Function({bool userId}) - > { - $$UserMetadataEntityTableTableManager( - i0.GeneratedDatabase db, - i1.$UserMetadataEntityTable table, - ) : super( - i0.TableManagerState( - db: db, - table: table, - createFilteringComposer: () => i1 - .$$UserMetadataEntityTableFilterComposer($db: db, $table: table), - createOrderingComposer: () => - i1.$$UserMetadataEntityTableOrderingComposer( - $db: db, - $table: table, - ), - createComputedFieldComposer: () => - i1.$$UserMetadataEntityTableAnnotationComposer( - $db: db, - $table: table, - ), - updateCompanionCallback: - ({ - i0.Value userId = const i0.Value.absent(), - i0.Value key = const i0.Value.absent(), - i0.Value> value = const i0.Value.absent(), - }) => i1.UserMetadataEntityCompanion( - userId: userId, - key: key, - value: value, - ), - createCompanionCallback: - ({ - required String userId, - required i2.UserMetadataKey key, - required Map value, - }) => i1.UserMetadataEntityCompanion.insert( - userId: userId, - key: key, - value: value, - ), - withReferenceMapper: (p0) => p0 - .map( - (e) => ( - e.readTable(table), - i1.$$UserMetadataEntityTableReferences(db, table, e), - ), - ) - .toList(), - prefetchHooksCallback: ({userId = false}) { - return i0.PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: - < - T extends i0.TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic - > - >(state) { - if (userId) { - state = - state.withJoin( - currentTable: table, - currentColumn: table.userId, - referencedTable: i1 - .$$UserMetadataEntityTableReferences - ._userIdTable(db), - referencedColumn: i1 - .$$UserMetadataEntityTableReferences - ._userIdTable(db) - .id, - ) - as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - ), - ); -} - -typedef $$UserMetadataEntityTableProcessedTableManager = - i0.ProcessedTableManager< - i0.GeneratedDatabase, - i1.$UserMetadataEntityTable, - i1.UserMetadataEntityData, - i1.$$UserMetadataEntityTableFilterComposer, - i1.$$UserMetadataEntityTableOrderingComposer, - i1.$$UserMetadataEntityTableAnnotationComposer, - $$UserMetadataEntityTableCreateCompanionBuilder, - $$UserMetadataEntityTableUpdateCompanionBuilder, - (i1.UserMetadataEntityData, i1.$$UserMetadataEntityTableReferences), - i1.UserMetadataEntityData, - i0.PrefetchHooks Function({bool userId}) - >; - -class $UserMetadataEntityTable extends i4.UserMetadataEntity - with i0.TableInfo<$UserMetadataEntityTable, i1.UserMetadataEntityData> { - @override - final i0.GeneratedDatabase attachedDatabase; - final String? _alias; - $UserMetadataEntityTable(this.attachedDatabase, [this._alias]); - static const i0.VerificationMeta _userIdMeta = const i0.VerificationMeta( - 'userId', - ); - @override - late final i0.GeneratedColumn userId = i0.GeneratedColumn( - 'user_id', - aliasedName, - false, - type: i0.DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: i0.GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - @override - late final i0.GeneratedColumnWithTypeConverter key = - i0.GeneratedColumn( - 'key', - aliasedName, - false, - type: i0.DriftSqlType.int, - requiredDuringInsert: true, - ).withConverter( - i1.$UserMetadataEntityTable.$converterkey, - ); - @override - late final i0.GeneratedColumnWithTypeConverter< - Map, - i3.Uint8List - > - value = - i0.GeneratedColumn( - 'value', - aliasedName, - false, - type: i0.DriftSqlType.blob, - requiredDuringInsert: true, - ).withConverter>( - i1.$UserMetadataEntityTable.$convertervalue, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - i0.VerificationContext validateIntegrity( - i0.Insertable instance, { - bool isInserting = false, - }) { - final context = i0.VerificationContext(); - final data = instance.toColumns(true); - if (data.containsKey('user_id')) { - context.handle( - _userIdMeta, - userId.isAcceptableOrUnknown(data['user_id']!, _userIdMeta), - ); - } else if (isInserting) { - context.missing(_userIdMeta); - } - return context; - } - - @override - Set get $primaryKey => {userId, key}; - @override - i1.UserMetadataEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return i1.UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - i0.DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: i1.$UserMetadataEntityTable.$converterkey.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - ), - value: i1.$UserMetadataEntityTable.$convertervalue.fromSql( - attachedDatabase.typeMapping.read( - i0.DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ), - ); - } - - @override - $UserMetadataEntityTable createAlias(String alias) { - return $UserMetadataEntityTable(attachedDatabase, alias); - } - - static i0.JsonTypeConverter2 $converterkey = - const i0.EnumIndexConverter( - i2.UserMetadataKey.values, - ); - static i0.JsonTypeConverter2, i3.Uint8List, Object?> - $convertervalue = i4.userMetadataConverter; - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends i0.DataClass - implements i0.Insertable { - final String userId; - final i2.UserMetadataKey key; - final Map value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = i0.Variable(userId); - { - map['key'] = i0.Variable( - i1.$UserMetadataEntityTable.$converterkey.toSql(key), - ); - } - { - map['value'] = i0.Variable( - i1.$UserMetadataEntityTable.$convertervalue.toSql(value), - ); - } - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - i0.ValueSerializer? serializer, - }) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: i1.$UserMetadataEntityTable.$converterkey.fromJson( - serializer.fromJson(json['key']), - ), - value: i1.$UserMetadataEntityTable.$convertervalue.fromJson( - serializer.fromJson(json['value']), - ), - ); - } - @override - Map toJson({i0.ValueSerializer? serializer}) { - serializer ??= i0.driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson( - i1.$UserMetadataEntityTable.$converterkey.toJson(key), - ), - 'value': serializer.toJson( - i1.$UserMetadataEntityTable.$convertervalue.toJson(value), - ), - }; - } - - i1.UserMetadataEntityData copyWith({ - String? userId, - i2.UserMetadataKey? key, - Map? value, - }) => i1.UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion( - i1.UserMetadataEntityCompanion data, - ) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, value); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is i1.UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - other.value == this.value); -} - -class UserMetadataEntityCompanion - extends i0.UpdateCompanion { - final i0.Value userId; - final i0.Value key; - final i0.Value> value; - const UserMetadataEntityCompanion({ - this.userId = const i0.Value.absent(), - this.key = const i0.Value.absent(), - this.value = const i0.Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required i2.UserMetadataKey key, - required Map value, - }) : userId = i0.Value(userId), - key = i0.Value(key), - value = i0.Value(value); - static i0.Insertable custom({ - i0.Expression? userId, - i0.Expression? key, - i0.Expression? value, - }) { - return i0.RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - i1.UserMetadataEntityCompanion copyWith({ - i0.Value? userId, - i0.Value? key, - i0.Value>? value, - }) { - return i1.UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = i0.Variable(userId.value); - } - if (key.present) { - map['key'] = i0.Variable( - i1.$UserMetadataEntityTable.$converterkey.toSql(key.value), - ); - } - if (value.present) { - map['value'] = i0.Variable( - i1.$UserMetadataEntityTable.$convertervalue.toSql(value.value), - ); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} diff --git a/mobile/lib/infrastructure/repositories/db.repository.drift.dart b/mobile/lib/infrastructure/repositories/db.repository.drift.dart deleted file mode 100644 index a5996716ed..0000000000 --- a/mobile/lib/infrastructure/repositories/db.repository.drift.dart +++ /dev/null @@ -1,418 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart' - as i1; -import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart' - as i2; -import 'package:immich_mobile/infrastructure/entities/stack.entity.drift.dart' - as i3; -import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart' - as i4; -import 'package:immich_mobile/infrastructure/entities/remote_album.entity.drift.dart' - as i5; -import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart' - as i6; -import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.drift.dart' - as i7; -import 'package:immich_mobile/infrastructure/entities/auth_user.entity.drift.dart' - as i8; -import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.drift.dart' - as i9; -import 'package:immich_mobile/infrastructure/entities/partner.entity.drift.dart' - as i10; -import 'package:immich_mobile/infrastructure/entities/exif.entity.drift.dart' - as i11; -import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity.drift.dart' - as i12; -import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.drift.dart' - as i13; -import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart' - as i14; -import 'package:immich_mobile/infrastructure/entities/memory.entity.drift.dart' - as i15; -import 'package:immich_mobile/infrastructure/entities/memory_asset.entity.drift.dart' - as i16; -import 'package:immich_mobile/infrastructure/entities/person.entity.drift.dart' - as i17; -import 'package:immich_mobile/infrastructure/entities/asset_face.entity.drift.dart' - as i18; -import 'package:immich_mobile/infrastructure/entities/store.entity.drift.dart' - as i19; -import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart' - as i20; -import 'package:immich_mobile/infrastructure/entities/asset_edit.entity.drift.dart' - as i21; -import 'package:immich_mobile/infrastructure/entities/settings.entity.drift.dart' - as i22; -import 'package:immich_mobile/infrastructure/entities/asset_ocr.entity.drift.dart' - as i23; -import 'package:immich_mobile/infrastructure/entities/merged_asset.drift.dart' - as i24; -import 'package:drift/internal/modular.dart' as i25; - -abstract class $Drift extends i0.GeneratedDatabase { - $Drift(i0.QueryExecutor e) : super(e); - $DriftManager get managers => $DriftManager(this); - late final i1.$UserEntityTable userEntity = i1.$UserEntityTable(this); - late final i2.$RemoteAssetEntityTable remoteAssetEntity = i2 - .$RemoteAssetEntityTable(this); - late final i3.$StackEntityTable stackEntity = i3.$StackEntityTable(this); - late final i4.$LocalAssetEntityTable localAssetEntity = i4 - .$LocalAssetEntityTable(this); - late final i5.$RemoteAlbumEntityTable remoteAlbumEntity = i5 - .$RemoteAlbumEntityTable(this); - late final i6.$LocalAlbumEntityTable localAlbumEntity = i6 - .$LocalAlbumEntityTable(this); - late final i7.$LocalAlbumAssetEntityTable localAlbumAssetEntity = i7 - .$LocalAlbumAssetEntityTable(this); - late final i8.$AuthUserEntityTable authUserEntity = i8.$AuthUserEntityTable( - this, - ); - late final i9.$UserMetadataEntityTable userMetadataEntity = i9 - .$UserMetadataEntityTable(this); - late final i10.$PartnerEntityTable partnerEntity = i10.$PartnerEntityTable( - this, - ); - late final i11.$RemoteExifEntityTable remoteExifEntity = i11 - .$RemoteExifEntityTable(this); - late final i12.$RemoteAlbumAssetEntityTable remoteAlbumAssetEntity = i12 - .$RemoteAlbumAssetEntityTable(this); - late final i13.$RemoteAlbumUserEntityTable remoteAlbumUserEntity = i13 - .$RemoteAlbumUserEntityTable(this); - late final i14.$RemoteAssetCloudIdEntityTable remoteAssetCloudIdEntity = i14 - .$RemoteAssetCloudIdEntityTable(this); - late final i15.$MemoryEntityTable memoryEntity = i15.$MemoryEntityTable(this); - late final i16.$MemoryAssetEntityTable memoryAssetEntity = i16 - .$MemoryAssetEntityTable(this); - late final i17.$PersonEntityTable personEntity = i17.$PersonEntityTable(this); - late final i18.$AssetFaceEntityTable assetFaceEntity = i18 - .$AssetFaceEntityTable(this); - late final i19.$StoreEntityTable storeEntity = i19.$StoreEntityTable(this); - late final i20.$TrashedLocalAssetEntityTable trashedLocalAssetEntity = i20 - .$TrashedLocalAssetEntityTable(this); - late final i21.$AssetEditEntityTable assetEditEntity = i21 - .$AssetEditEntityTable(this); - late final i22.$SettingsEntityTable settingsEntity = i22.$SettingsEntityTable( - this, - ); - late final i23.$AssetOcrEntityTable assetOcrEntity = i23.$AssetOcrEntityTable( - this, - ); - i24.MergedAssetDrift get mergedAssetDrift => i25.ReadDatabaseContainer( - this, - ).accessor(i24.MergedAssetDrift.new); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - i7.idxLocalAlbumAssetAlbumAsset, - i4.idxLocalAssetChecksum, - i4.idxLocalAssetCloudId, - i4.idxLocalAssetCreatedAt, - i3.idxStackPrimaryAssetId, - i2.uQRemoteAssetsOwnerChecksum, - i2.uQRemoteAssetsOwnerLibraryChecksum, - i2.idxRemoteAssetChecksum, - i2.idxRemoteAssetStackId, - i2.idxRemoteAssetOwnerVisibilityDeletedCreated, - i2.idxRemoteAssetUploaded, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settingsEntity, - assetOcrEntity, - i10.idxPartnerSharedWithId, - i11.idxLatLng, - i11.idxRemoteExifCity, - i12.idxRemoteAlbumAssetAlbumAsset, - i14.idxRemoteAssetCloudId, - i17.idxPersonOwnerId, - i18.idxAssetFacePersonId, - i18.idxAssetFaceAssetId, - i18.idxAssetFaceVisiblePerson, - i20.idxTrashedLocalAssetChecksum, - i20.idxTrashedLocalAssetAlbum, - i21.idxAssetEditAssetId, - i23.idxAssetOcrAssetId, - ]; - @override - i0.StreamQueryUpdateRules - get streamUpdateRules => const i0.StreamQueryUpdateRules([ - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('stack_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_entity', kind: i0.UpdateKind.update), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('local_album_entity', kind: i0.UpdateKind.update), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('local_album_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('local_album_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('user_metadata_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('partner_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('partner_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_exif_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_user_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('remote_album_user_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate( - 'remote_asset_cloud_id_entity', - kind: i0.UpdateKind.delete, - ), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('memory_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('memory_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [ - i0.TableUpdate('memory_asset_entity', kind: i0.UpdateKind.delete), - ], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('person_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('asset_face_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('asset_face_entity', kind: i0.UpdateKind.update)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('asset_edit_entity', kind: i0.UpdateKind.delete)], - ), - i0.WritePropagation( - on: i0.TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: i0.UpdateKind.delete, - ), - result: [i0.TableUpdate('asset_ocr_entity', kind: i0.UpdateKind.delete)], - ), - ]); - @override - i0.DriftDatabaseOptions get options => - const i0.DriftDatabaseOptions(storeDateTimeAsText: true); -} - -class $DriftManager { - final $Drift _db; - $DriftManager(this._db); - i1.$$UserEntityTableTableManager get userEntity => - i1.$$UserEntityTableTableManager(_db, _db.userEntity); - i2.$$RemoteAssetEntityTableTableManager get remoteAssetEntity => - i2.$$RemoteAssetEntityTableTableManager(_db, _db.remoteAssetEntity); - i3.$$StackEntityTableTableManager get stackEntity => - i3.$$StackEntityTableTableManager(_db, _db.stackEntity); - i4.$$LocalAssetEntityTableTableManager get localAssetEntity => - i4.$$LocalAssetEntityTableTableManager(_db, _db.localAssetEntity); - i5.$$RemoteAlbumEntityTableTableManager get remoteAlbumEntity => - i5.$$RemoteAlbumEntityTableTableManager(_db, _db.remoteAlbumEntity); - i6.$$LocalAlbumEntityTableTableManager get localAlbumEntity => - i6.$$LocalAlbumEntityTableTableManager(_db, _db.localAlbumEntity); - i7.$$LocalAlbumAssetEntityTableTableManager get localAlbumAssetEntity => i7 - .$$LocalAlbumAssetEntityTableTableManager(_db, _db.localAlbumAssetEntity); - i8.$$AuthUserEntityTableTableManager get authUserEntity => - i8.$$AuthUserEntityTableTableManager(_db, _db.authUserEntity); - i9.$$UserMetadataEntityTableTableManager get userMetadataEntity => - i9.$$UserMetadataEntityTableTableManager(_db, _db.userMetadataEntity); - i10.$$PartnerEntityTableTableManager get partnerEntity => - i10.$$PartnerEntityTableTableManager(_db, _db.partnerEntity); - i11.$$RemoteExifEntityTableTableManager get remoteExifEntity => - i11.$$RemoteExifEntityTableTableManager(_db, _db.remoteExifEntity); - i12.$$RemoteAlbumAssetEntityTableTableManager get remoteAlbumAssetEntity => - i12.$$RemoteAlbumAssetEntityTableTableManager( - _db, - _db.remoteAlbumAssetEntity, - ); - i13.$$RemoteAlbumUserEntityTableTableManager get remoteAlbumUserEntity => i13 - .$$RemoteAlbumUserEntityTableTableManager(_db, _db.remoteAlbumUserEntity); - i14.$$RemoteAssetCloudIdEntityTableTableManager - get remoteAssetCloudIdEntity => - i14.$$RemoteAssetCloudIdEntityTableTableManager( - _db, - _db.remoteAssetCloudIdEntity, - ); - i15.$$MemoryEntityTableTableManager get memoryEntity => - i15.$$MemoryEntityTableTableManager(_db, _db.memoryEntity); - i16.$$MemoryAssetEntityTableTableManager get memoryAssetEntity => - i16.$$MemoryAssetEntityTableTableManager(_db, _db.memoryAssetEntity); - i17.$$PersonEntityTableTableManager get personEntity => - i17.$$PersonEntityTableTableManager(_db, _db.personEntity); - i18.$$AssetFaceEntityTableTableManager get assetFaceEntity => - i18.$$AssetFaceEntityTableTableManager(_db, _db.assetFaceEntity); - i19.$$StoreEntityTableTableManager get storeEntity => - i19.$$StoreEntityTableTableManager(_db, _db.storeEntity); - i20.$$TrashedLocalAssetEntityTableTableManager get trashedLocalAssetEntity => - i20.$$TrashedLocalAssetEntityTableTableManager( - _db, - _db.trashedLocalAssetEntity, - ); - i21.$$AssetEditEntityTableTableManager get assetEditEntity => - i21.$$AssetEditEntityTableTableManager(_db, _db.assetEditEntity); - i22.$$SettingsEntityTableTableManager get settingsEntity => - i22.$$SettingsEntityTableTableManager(_db, _db.settingsEntity); - i23.$$AssetOcrEntityTableTableManager get assetOcrEntity => - i23.$$AssetOcrEntityTableTableManager(_db, _db.assetOcrEntity); -} diff --git a/mobile/lib/infrastructure/repositories/logger_db.repository.drift.dart b/mobile/lib/infrastructure/repositories/logger_db.repository.drift.dart deleted file mode 100644 index 8389d3a827..0000000000 --- a/mobile/lib/infrastructure/repositories/logger_db.repository.drift.dart +++ /dev/null @@ -1,27 +0,0 @@ -// dart format width=80 -// ignore_for_file: type=lint -import 'package:drift/drift.dart' as i0; -import 'package:immich_mobile/infrastructure/entities/log.entity.drift.dart' - as i1; - -abstract class $DriftLogger extends i0.GeneratedDatabase { - $DriftLogger(i0.QueryExecutor e) : super(e); - $DriftLoggerManager get managers => $DriftLoggerManager(this); - late final i1.$LogMessageEntityTable logMessageEntity = i1 - .$LogMessageEntityTable(this); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [logMessageEntity]; - @override - i0.DriftDatabaseOptions get options => - const i0.DriftDatabaseOptions(storeDateTimeAsText: true); -} - -class $DriftLoggerManager { - final $DriftLogger _db; - $DriftLoggerManager(this._db); - i1.$$LogMessageEntityTableTableManager get logMessageEntity => - i1.$$LogMessageEntityTableTableManager(_db, _db.logMessageEntity); -} diff --git a/mobile/mise.toml b/mobile/mise.toml index 869a52a048..ce7c626e18 100644 --- a/mobile/mise.toml +++ b/mobile/mise.toml @@ -14,8 +14,12 @@ macos-x64 = { asset_pattern = "dcm-macos-x64-release.zip" } macos-arm64 = { asset_pattern = "dcm-macos-arm-release.zip" } windows-x64 = { asset_pattern = "dcm-windows-release.zip" } -[tasks."codegen:dart"] +[tasks.codegen] alias = "codegen" +description = "Generate all codegen artifacts" +depends = ["codegen:dart", "codegen:drift:schema", "codegen:pigeon", "codegen:translation"] + +[tasks."codegen:dart"] description = "Execute build_runner to auto-generate dart code" sources = [ "pubspec.yaml", @@ -29,6 +33,12 @@ run = [ "dart format lib/routing/router.gr.dart", ] +[tasks."codegen:drift:schema"] +description = "Generate Drift migration schema test code" +sources = ["drift_schemas/main/*.json"] +outputs = { auto = true } +run = "dart run drift_dev schema generate --data-classes --companions drift_schemas/main/ test/drift/main/generated/" + [tasks."codegen:watch"] alias = "watch" description = "Watch and auto-generate dart code" diff --git a/mobile/test/drift/main/generated/schema.dart b/mobile/test/drift/main/generated/schema.dart deleted file mode 100644 index ee5900c1d1..0000000000 --- a/mobile/test/drift/main/generated/schema.dart +++ /dev/null @@ -1,143 +0,0 @@ -// dart format width=80 -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; -import 'package:drift/internal/migrations.dart'; -import 'schema_v1.dart' as v1; -import 'schema_v2.dart' as v2; -import 'schema_v3.dart' as v3; -import 'schema_v4.dart' as v4; -import 'schema_v5.dart' as v5; -import 'schema_v6.dart' as v6; -import 'schema_v7.dart' as v7; -import 'schema_v8.dart' as v8; -import 'schema_v9.dart' as v9; -import 'schema_v10.dart' as v10; -import 'schema_v11.dart' as v11; -import 'schema_v12.dart' as v12; -import 'schema_v13.dart' as v13; -import 'schema_v14.dart' as v14; -import 'schema_v15.dart' as v15; -import 'schema_v16.dart' as v16; -import 'schema_v17.dart' as v17; -import 'schema_v18.dart' as v18; -import 'schema_v19.dart' as v19; -import 'schema_v20.dart' as v20; -import 'schema_v21.dart' as v21; -import 'schema_v22.dart' as v22; -import 'schema_v23.dart' as v23; -import 'schema_v24.dart' as v24; -import 'schema_v25.dart' as v25; -import 'schema_v26.dart' as v26; -import 'schema_v27.dart' as v27; -import 'schema_v28.dart' as v28; -import 'schema_v29.dart' as v29; -import 'schema_v30.dart' as v30; -import 'schema_v31.dart' as v31; - -class GeneratedHelper implements SchemaInstantiationHelper { - @override - GeneratedDatabase databaseForVersion(QueryExecutor db, int version) { - switch (version) { - case 1: - return v1.DatabaseAtV1(db); - case 2: - return v2.DatabaseAtV2(db); - case 3: - return v3.DatabaseAtV3(db); - case 4: - return v4.DatabaseAtV4(db); - case 5: - return v5.DatabaseAtV5(db); - case 6: - return v6.DatabaseAtV6(db); - case 7: - return v7.DatabaseAtV7(db); - case 8: - return v8.DatabaseAtV8(db); - case 9: - return v9.DatabaseAtV9(db); - case 10: - return v10.DatabaseAtV10(db); - case 11: - return v11.DatabaseAtV11(db); - case 12: - return v12.DatabaseAtV12(db); - case 13: - return v13.DatabaseAtV13(db); - case 14: - return v14.DatabaseAtV14(db); - case 15: - return v15.DatabaseAtV15(db); - case 16: - return v16.DatabaseAtV16(db); - case 17: - return v17.DatabaseAtV17(db); - case 18: - return v18.DatabaseAtV18(db); - case 19: - return v19.DatabaseAtV19(db); - case 20: - return v20.DatabaseAtV20(db); - case 21: - return v21.DatabaseAtV21(db); - case 22: - return v22.DatabaseAtV22(db); - case 23: - return v23.DatabaseAtV23(db); - case 24: - return v24.DatabaseAtV24(db); - case 25: - return v25.DatabaseAtV25(db); - case 26: - return v26.DatabaseAtV26(db); - case 27: - return v27.DatabaseAtV27(db); - case 28: - return v28.DatabaseAtV28(db); - case 29: - return v29.DatabaseAtV29(db); - case 30: - return v30.DatabaseAtV30(db); - case 31: - return v31.DatabaseAtV31(db); - default: - throw MissingSchemaException(version, versions); - } - } - - static const versions = const [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - ]; -} diff --git a/mobile/test/drift/main/generated/schema_v1.dart b/mobile/test/drift/main/generated/schema_v1.dart deleted file mode 100644 index 3755a2bd5c..0000000000 --- a/mobile/test/drift/main/generated/schema_v1.dart +++ /dev/null @@ -1,5998 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn profileImagePath = GeneratedColumn( - 'profile_image_path', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - profileImagePath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_image_path'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - ), - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final bool isAdmin; - final String email; - final String? profileImagePath; - final DateTime updatedAt; - final int? quotaSizeInBytes; - final int quotaUsageInBytes; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - this.profileImagePath, - required this.updatedAt, - this.quotaSizeInBytes, - required this.quotaUsageInBytes, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - if (!nullToAbsent || profileImagePath != null) { - map['profile_image_path'] = Variable(profileImagePath); - } - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || quotaSizeInBytes != null) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - } - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - profileImagePath: serializer.fromJson(json['profileImagePath']), - updatedAt: serializer.fromJson(json['updatedAt']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'profileImagePath': serializer.toJson(profileImagePath), - 'updatedAt': serializer.toJson(updatedAt), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - Value profileImagePath = const Value.absent(), - DateTime? updatedAt, - Value quotaSizeInBytes = const Value.absent(), - int? quotaUsageInBytes, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath.present - ? profileImagePath.value - : this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes.present - ? quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - profileImagePath: data.profileImagePath.present - ? data.profileImagePath.value - : this.profileImagePath, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.profileImagePath == this.profileImagePath && - other.updatedAt == this.updatedAt && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value profileImagePath; - final Value updatedAt; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? profileImagePath, - Expression? updatedAt, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (profileImagePath != null) 'profile_image_path': profileImagePath, - if (updatedAt != null) 'updated_at': updatedAt, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? profileImagePath, - Value? updatedAt, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath ?? this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (profileImagePath.present) { - map['profile_image_path'] = Variable(profileImagePath.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id)', - ), - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbnailPath = GeneratedColumn( - 'thumbnail_path', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - thumbnailPath, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - thumbnailPath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_path'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final String thumbnailPath; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.thumbnailPath, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['thumbnail_path'] = Variable(thumbnailPath); - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - thumbnailPath: serializer.fromJson(json['thumbnailPath']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'thumbnailPath': serializer.toJson(thumbnailPath), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - String? thumbnailPath, - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - thumbnailPath: data.thumbnailPath.present - ? data.thumbnailPath.value - : this.thumbnailPath, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('thumbnailPath: $thumbnailPath, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - thumbnailPath, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.thumbnailPath == this.thumbnailPath && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value thumbnailPath; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.thumbnailPath = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required String thumbnailPath, - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - thumbnailPath = Value(thumbnailPath), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? thumbnailPath, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (thumbnailPath != null) 'thumbnail_path': thumbnailPath, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? thumbnailPath, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (thumbnailPath.present) { - map['thumbnail_path'] = Variable(thumbnailPath.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('thumbnailPath: $thumbnailPath, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV1 extends GeneratedDatabase { - DatabaseAtV1(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - localAssetEntity, - stackEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - localAlbumEntity, - localAlbumAssetEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - ]; - @override - int get schemaVersion => 1; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v10.dart b/mobile/test/drift/main/generated/schema_v10.dart deleted file mode 100644 index c8d97eea37..0000000000 --- a/mobile/test/drift/main/generated/schema_v10.dart +++ /dev/null @@ -1,7162 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV10 extends GeneratedDatabase { - DatabaseAtV10(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - idxLatLng, - ]; - @override - int get schemaVersion => 10; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v11.dart b/mobile/test/drift/main/generated/schema_v11.dart deleted file mode 100644 index ce6508b2f7..0000000000 --- a/mobile/test/drift/main/generated/schema_v11.dart +++ /dev/null @@ -1,7201 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV11 extends GeneratedDatabase { - DatabaseAtV11(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - idxLatLng, - ]; - @override - int get schemaVersion => 11; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v12.dart b/mobile/test/drift/main/generated/schema_v12.dart deleted file mode 100644 index 75ca519048..0000000000 --- a/mobile/test/drift/main/generated/schema_v12.dart +++ /dev/null @@ -1,7201 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV12 extends GeneratedDatabase { - DatabaseAtV12(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - idxLatLng, - ]; - @override - int get schemaVersion => 12; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v13.dart b/mobile/test/drift/main/generated/schema_v13.dart deleted file mode 100644 index 2afc279f74..0000000000 --- a/mobile/test/drift/main/generated/schema_v13.dart +++ /dev/null @@ -1,7768 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV13 extends GeneratedDatabase { - DatabaseAtV13(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxLatLng, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 13; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v14.dart b/mobile/test/drift/main/generated/schema_v14.dart deleted file mode 100644 index 69aac3360f..0000000000 --- a/mobile/test/drift/main/generated/schema_v14.dart +++ /dev/null @@ -1,7881 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV14 extends GeneratedDatabase { - DatabaseAtV14(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxLatLng, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 14; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v15.dart b/mobile/test/drift/main/generated/schema_v15.dart deleted file mode 100644 index 01ac59162b..0000000000 --- a/mobile/test/drift/main/generated/schema_v15.dart +++ /dev/null @@ -1,7916 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final int source; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - int? source, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV15 extends GeneratedDatabase { - DatabaseAtV15(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxLatLng, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 15; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v16.dart b/mobile/test/drift/main/generated/schema_v16.dart deleted file mode 100644 index be336a8dac..0000000000 --- a/mobile/test/drift/main/generated/schema_v16.dart +++ /dev/null @@ -1,8302 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final int source; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - int? source, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV16 extends GeneratedDatabase { - DatabaseAtV16(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxLatLng, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 16; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v17.dart b/mobile/test/drift/main/generated/schema_v17.dart deleted file mode 100644 index 2314eeac7c..0000000000 --- a/mobile/test/drift/main/generated/schema_v17.dart +++ /dev/null @@ -1,8340 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final bool isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - bool? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final int source; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - int? source, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV17 extends GeneratedDatabase { - DatabaseAtV17(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxLatLng, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 17; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v18.dart b/mobile/test/drift/main/generated/schema_v18.dart deleted file mode 100644 index 9265566c47..0000000000 --- a/mobile/test/drift/main/generated/schema_v18.dart +++ /dev/null @@ -1,8345 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final bool isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - bool? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final int source; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - int? source, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV18 extends GeneratedDatabase { - DatabaseAtV18(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxLatLng, - idxRemoteAssetCloudId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 18; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v19.dart b/mobile/test/drift/main/generated/schema_v19.dart deleted file mode 100644 index 1e80670893..0000000000 --- a/mobile/test/drift/main/generated/schema_v19.dart +++ /dev/null @@ -1,8400 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final bool isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - bool? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final int source; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - int? source, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV19 extends GeneratedDatabase { - DatabaseAtV19(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 19; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v2.dart b/mobile/test/drift/main/generated/schema_v2.dart deleted file mode 100644 index 18fcc75002..0000000000 --- a/mobile/test/drift/main/generated/schema_v2.dart +++ /dev/null @@ -1,5998 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn profileImagePath = GeneratedColumn( - 'profile_image_path', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - profileImagePath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_image_path'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - ), - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final bool isAdmin; - final String email; - final String? profileImagePath; - final DateTime updatedAt; - final int? quotaSizeInBytes; - final int quotaUsageInBytes; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - this.profileImagePath, - required this.updatedAt, - this.quotaSizeInBytes, - required this.quotaUsageInBytes, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - if (!nullToAbsent || profileImagePath != null) { - map['profile_image_path'] = Variable(profileImagePath); - } - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || quotaSizeInBytes != null) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - } - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - profileImagePath: serializer.fromJson(json['profileImagePath']), - updatedAt: serializer.fromJson(json['updatedAt']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'profileImagePath': serializer.toJson(profileImagePath), - 'updatedAt': serializer.toJson(updatedAt), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - Value profileImagePath = const Value.absent(), - DateTime? updatedAt, - Value quotaSizeInBytes = const Value.absent(), - int? quotaUsageInBytes, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath.present - ? profileImagePath.value - : this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes.present - ? quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - profileImagePath: data.profileImagePath.present - ? data.profileImagePath.value - : this.profileImagePath, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.profileImagePath == this.profileImagePath && - other.updatedAt == this.updatedAt && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value profileImagePath; - final Value updatedAt; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? profileImagePath, - Expression? updatedAt, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (profileImagePath != null) 'profile_image_path': profileImagePath, - if (updatedAt != null) 'updated_at': updatedAt, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? profileImagePath, - Value? updatedAt, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath ?? this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (profileImagePath.present) { - map['profile_image_path'] = Variable(profileImagePath.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id)', - ), - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbnailPath = GeneratedColumn( - 'thumbnail_path', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - thumbnailPath, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - thumbnailPath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_path'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final String thumbnailPath; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.thumbnailPath, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['thumbnail_path'] = Variable(thumbnailPath); - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - thumbnailPath: serializer.fromJson(json['thumbnailPath']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'thumbnailPath': serializer.toJson(thumbnailPath), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - String? thumbnailPath, - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - thumbnailPath: data.thumbnailPath.present - ? data.thumbnailPath.value - : this.thumbnailPath, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('thumbnailPath: $thumbnailPath, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - thumbnailPath, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.thumbnailPath == this.thumbnailPath && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value thumbnailPath; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.thumbnailPath = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required String thumbnailPath, - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - thumbnailPath = Value(thumbnailPath), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? thumbnailPath, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (thumbnailPath != null) 'thumbnail_path': thumbnailPath, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? thumbnailPath, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (thumbnailPath.present) { - map['thumbnail_path'] = Variable(thumbnailPath.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('thumbnailPath: $thumbnailPath, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV2 extends GeneratedDatabase { - DatabaseAtV2(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - localAssetEntity, - stackEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - localAlbumEntity, - localAlbumAssetEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - ]; - @override - int get schemaVersion => 2; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v20.dart b/mobile/test/drift/main/generated/schema_v20.dart deleted file mode 100644 index 0cb8a46cac..0000000000 --- a/mobile/test/drift/main/generated/schema_v20.dart +++ /dev/null @@ -1,8474 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final bool isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - bool? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final bool isVisible; - final DateTime? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - bool? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final int source; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - int? source, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV20 extends GeneratedDatabase { - DatabaseAtV20(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 20; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v21.dart b/mobile/test/drift/main/generated/schema_v21.dart deleted file mode 100644 index 5777b5f850..0000000000 --- a/mobile/test/drift/main/generated/schema_v21.dart +++ /dev/null @@ -1,8548 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final bool isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - bool? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final bool isVisible; - final DateTime? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - bool? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV21 extends GeneratedDatabase { - DatabaseAtV21(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - ]; - @override - int get schemaVersion => 21; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v22.dart b/mobile/test/drift/main/generated/schema_v22.dart deleted file mode 100644 index c1abad0d24..0000000000 --- a/mobile/test/drift/main/generated/schema_v22.dart +++ /dev/null @@ -1,8849 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_edited" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final bool isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - bool? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - final String? iCloudId; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [assetId, albumId, marker_]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final bool? marker_; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker_ = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker_); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker_ == this.marker_); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker_; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker_ = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker_, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final bool isAdmin; - final bool hasProfileImage; - final DateTime profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - bool? isAdmin, - bool? hasProfileImage, - DateTime? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn adjustmentTime = - GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final DateTime? createdAt; - final DateTime? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_visible" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final bool isVisible; - final DateTime? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - bool? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String albumId; - final String? checksum; - final bool isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV22 extends GeneratedDatabase { - DatabaseAtV22(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - int get schemaVersion => 22; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v23.dart b/mobile/test/drift/main/generated/schema_v23.dart deleted file mode 100644 index 35402af876..0000000000 --- a/mobile/test/drift/main/generated/schema_v23.dart +++ /dev/null @@ -1,9179 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? marker; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - String? updatedAt, - int? backupSelection, - int? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker == this.marker); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [assetId, albumId, marker]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? marker; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker == this.marker); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - int? isAdmin, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - int? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required String memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required int isFavorite, - required int isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final int isVisible; - final String? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV23 extends GeneratedDatabase { - DatabaseAtV23(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAlbumOwnerId = Index( - 'idx_remote_album_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxRemoteAlbumOwnerId, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 23; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v24.dart b/mobile/test/drift/main/generated/schema_v24.dart deleted file mode 100644 index 872731c31f..0000000000 --- a/mobile/test/drift/main/generated/schema_v24.dart +++ /dev/null @@ -1,9131 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? marker; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - String? updatedAt, - int? backupSelection, - int? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker == this.marker); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [assetId, albumId, marker]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? marker; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker == this.marker); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - int? isAdmin, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - int? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required String memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required int isFavorite, - required int isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final int isVisible; - final String? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV24 extends GeneratedDatabase { - DatabaseAtV24(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetLocalDateTimeDay = Index( - 'idx_remote_asset_local_date_time_day', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))', - ); - late final Index idxRemoteAssetLocalDateTimeMonth = Index( - 'idx_remote_asset_local_date_time_month', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetLocalDateTimeDay, - idxRemoteAssetLocalDateTimeMonth, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 24; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v25.dart b/mobile/test/drift/main/generated/schema_v25.dart deleted file mode 100644 index aad45f0bd3..0000000000 --- a/mobile/test/drift/main/generated/schema_v25.dart +++ /dev/null @@ -1,9345 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? marker; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - String? updatedAt, - int? backupSelection, - int? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker == this.marker); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [assetId, albumId, marker]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? marker; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker == this.marker); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - int? isAdmin, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - int? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required String memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required int isFavorite, - required int isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final int isVisible; - final String? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Metadata extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Metadata(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'metadata'; - @override - Set get $primaryKey => {key}; - @override - MetadataData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MetadataData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Metadata createAlias(String alias) { - return Metadata(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class MetadataData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const MetadataData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory MetadataData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MetadataData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - MetadataData copyWith({String? key, String? value, String? updatedAt}) => - MetadataData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - MetadataData copyWithCompanion(MetadataCompanion data) { - return MetadataData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('MetadataData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MetadataData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class MetadataCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const MetadataCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - MetadataCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - MetadataCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return MetadataCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MetadataCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV25 extends GeneratedDatabase { - DatabaseAtV25(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Metadata metadata = Metadata(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - metadata, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 25; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v26.dart b/mobile/test/drift/main/generated/schema_v26.dart deleted file mode 100644 index b91afd1b8a..0000000000 --- a/mobile/test/drift/main/generated/schema_v26.dart +++ /dev/null @@ -1,9384 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (uploadedAt != null) 'uploaded_at': uploadedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? marker; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - String? updatedAt, - int? backupSelection, - int? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker == this.marker); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [assetId, albumId, marker]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? marker; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker == this.marker); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - int? isAdmin, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - int? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required String memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required int isFavorite, - required int isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final int isVisible; - final String? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Metadata extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Metadata(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'metadata'; - @override - Set get $primaryKey => {key}; - @override - MetadataData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MetadataData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Metadata createAlias(String alias) { - return Metadata(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class MetadataData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const MetadataData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory MetadataData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MetadataData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - MetadataData copyWith({String? key, String? value, String? updatedAt}) => - MetadataData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - MetadataData copyWithCompanion(MetadataCompanion data) { - return MetadataData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('MetadataData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MetadataData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class MetadataCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const MetadataCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - MetadataCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - MetadataCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return MetadataCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MetadataCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV26 extends GeneratedDatabase { - DatabaseAtV26(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Metadata metadata = Metadata(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - metadata, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 26; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v27.dart b/mobile/test/drift/main/generated/schema_v27.dart deleted file mode 100644 index 2b02946175..0000000000 --- a/mobile/test/drift/main/generated/schema_v27.dart +++ /dev/null @@ -1,9384 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (uploadedAt != null) 'uploaded_at': uploadedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? marker; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - String? updatedAt, - int? backupSelection, - int? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker == this.marker); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [assetId, albumId, marker]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? marker; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker == this.marker); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - int? isAdmin, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - int? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required String memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required int isFavorite, - required int isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final int isVisible; - final String? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Settings extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Settings(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - Set get $primaryKey => {key}; - @override - SettingsData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SettingsData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Settings createAlias(String alias) { - return Settings(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class SettingsData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const SettingsData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory SettingsData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SettingsData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - SettingsData copyWith({String? key, String? value, String? updatedAt}) => - SettingsData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsData copyWithCompanion(SettingsCompanion data) { - return SettingsData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SettingsData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const SettingsCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - SettingsCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - SettingsCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return SettingsCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV27 extends GeneratedDatabase { - DatabaseAtV27(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Settings settings = Settings(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settings, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 27; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v28.dart b/mobile/test/drift/main/generated/schema_v28.dart deleted file mode 100644 index a18199ed4f..0000000000 --- a/mobile/test/drift/main/generated/schema_v28.dart +++ /dev/null @@ -1,9389 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (uploadedAt != null) 'uploaded_at': uploadedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? marker; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - String? updatedAt, - int? backupSelection, - int? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker == this.marker); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [assetId, albumId, marker]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? marker; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker == this.marker); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - int? isAdmin, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - int? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required String memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required int isFavorite, - required int isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final int isVisible; - final String? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Settings extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Settings(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - Set get $primaryKey => {key}; - @override - SettingsData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SettingsData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Settings createAlias(String alias) { - return Settings(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class SettingsData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const SettingsData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory SettingsData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SettingsData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - SettingsData copyWith({String? key, String? value, String? updatedAt}) => - SettingsData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsData copyWithCompanion(SettingsCompanion data) { - return SettingsData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SettingsData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const SettingsCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - SettingsCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - SettingsCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return SettingsCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV28 extends GeneratedDatabase { - DatabaseAtV28(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxLocalAssetCreatedAt = Index( - 'idx_local_asset_created_at', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Settings settings = Settings(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxLocalAssetCreatedAt, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settings, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 28; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v29.dart b/mobile/test/drift/main/generated/schema_v29.dart deleted file mode 100644 index ed721e3fe8..0000000000 --- a/mobile/test/drift/main/generated/schema_v29.dart +++ /dev/null @@ -1,10027 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (uploadedAt != null) 'uploaded_at': uploadedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? marker; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - String? updatedAt, - int? backupSelection, - int? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker == this.marker); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [assetId, albumId, marker]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? marker; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker == this.marker); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - int? isAdmin, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - int? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required String memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required int isFavorite, - required int isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final int isVisible; - final String? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Settings extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Settings(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - Set get $primaryKey => {key}; - @override - SettingsData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SettingsData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Settings createAlias(String alias) { - return Settings(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class SettingsData extends DataClass implements Insertable { - final String key; - final String value; - final String updatedAt; - const SettingsData({ - required this.key, - required this.value, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - map['value'] = Variable(value); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory SettingsData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SettingsData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - SettingsData copyWith({String? key, String? value, String? updatedAt}) => - SettingsData( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsData copyWithCompanion(SettingsCompanion data) { - return SettingsData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SettingsData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const SettingsCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - SettingsCompanion.insert({ - required String key, - required String value, - this.updatedAt = const Value.absent(), - }) : key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - SettingsCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return SettingsCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class AssetOcrEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetOcrEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn x1 = GeneratedColumn( - 'x1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y1 = GeneratedColumn( - 'y1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x2 = GeneratedColumn( - 'x2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y2 = GeneratedColumn( - 'y2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x3 = GeneratedColumn( - 'x3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y3 = GeneratedColumn( - 'y3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x4 = GeneratedColumn( - 'x4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y4 = GeneratedColumn( - 'y4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boxScore = GeneratedColumn( - 'box_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn textScore = GeneratedColumn( - 'text_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn recognizedText = GeneratedColumn( - 'recognized_text', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - @override - List get $columns => [ - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_ocr_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetOcrEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetOcrEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - x1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x1'], - )!, - y1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y1'], - )!, - x2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x2'], - )!, - y2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y2'], - )!, - x3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x3'], - )!, - y3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y3'], - )!, - x4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x4'], - )!, - y4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y4'], - )!, - boxScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}box_score'], - )!, - textScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}text_score'], - )!, - recognizedText: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}recognized_text'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - ); - } - - @override - AssetOcrEntity createAlias(String alias) { - return AssetOcrEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetOcrEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final double x1; - final double y1; - final double x2; - final double y2; - final double x3; - final double y3; - final double x4; - final double y4; - final double boxScore; - final double textScore; - final String recognizedText; - final int isVisible; - const AssetOcrEntityData({ - required this.id, - required this.assetId, - required this.x1, - required this.y1, - required this.x2, - required this.y2, - required this.x3, - required this.y3, - required this.x4, - required this.y4, - required this.boxScore, - required this.textScore, - required this.recognizedText, - required this.isVisible, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['x1'] = Variable(x1); - map['y1'] = Variable(y1); - map['x2'] = Variable(x2); - map['y2'] = Variable(y2); - map['x3'] = Variable(x3); - map['y3'] = Variable(y3); - map['x4'] = Variable(x4); - map['y4'] = Variable(y4); - map['box_score'] = Variable(boxScore); - map['text_score'] = Variable(textScore); - map['recognized_text'] = Variable(recognizedText); - map['is_visible'] = Variable(isVisible); - return map; - } - - factory AssetOcrEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetOcrEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - x1: serializer.fromJson(json['x1']), - y1: serializer.fromJson(json['y1']), - x2: serializer.fromJson(json['x2']), - y2: serializer.fromJson(json['y2']), - x3: serializer.fromJson(json['x3']), - y3: serializer.fromJson(json['y3']), - x4: serializer.fromJson(json['x4']), - y4: serializer.fromJson(json['y4']), - boxScore: serializer.fromJson(json['boxScore']), - textScore: serializer.fromJson(json['textScore']), - recognizedText: serializer.fromJson(json['recognizedText']), - isVisible: serializer.fromJson(json['isVisible']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'x1': serializer.toJson(x1), - 'y1': serializer.toJson(y1), - 'x2': serializer.toJson(x2), - 'y2': serializer.toJson(y2), - 'x3': serializer.toJson(x3), - 'y3': serializer.toJson(y3), - 'x4': serializer.toJson(x4), - 'y4': serializer.toJson(y4), - 'boxScore': serializer.toJson(boxScore), - 'textScore': serializer.toJson(textScore), - 'recognizedText': serializer.toJson(recognizedText), - 'isVisible': serializer.toJson(isVisible), - }; - } - - AssetOcrEntityData copyWith({ - String? id, - String? assetId, - double? x1, - double? y1, - double? x2, - double? y2, - double? x3, - double? y3, - double? x4, - double? y4, - double? boxScore, - double? textScore, - String? recognizedText, - int? isVisible, - }) => AssetOcrEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - AssetOcrEntityData copyWithCompanion(AssetOcrEntityCompanion data) { - return AssetOcrEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - x1: data.x1.present ? data.x1.value : this.x1, - y1: data.y1.present ? data.y1.value : this.y1, - x2: data.x2.present ? data.x2.value : this.x2, - y2: data.y2.present ? data.y2.value : this.y2, - x3: data.x3.present ? data.x3.value : this.x3, - y3: data.y3.present ? data.y3.value : this.y3, - x4: data.x4.present ? data.x4.value : this.x4, - y4: data.y4.present ? data.y4.value : this.y4, - boxScore: data.boxScore.present ? data.boxScore.value : this.boxScore, - textScore: data.textScore.present ? data.textScore.value : this.textScore, - recognizedText: data.recognizedText.present - ? data.recognizedText.value - : this.recognizedText, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - ); - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetOcrEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.x1 == this.x1 && - other.y1 == this.y1 && - other.x2 == this.x2 && - other.y2 == this.y2 && - other.x3 == this.x3 && - other.y3 == this.y3 && - other.x4 == this.x4 && - other.y4 == this.y4 && - other.boxScore == this.boxScore && - other.textScore == this.textScore && - other.recognizedText == this.recognizedText && - other.isVisible == this.isVisible); -} - -class AssetOcrEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value x1; - final Value y1; - final Value x2; - final Value y2; - final Value x3; - final Value y3; - final Value x4; - final Value y4; - final Value boxScore; - final Value textScore; - final Value recognizedText; - final Value isVisible; - const AssetOcrEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.x1 = const Value.absent(), - this.y1 = const Value.absent(), - this.x2 = const Value.absent(), - this.y2 = const Value.absent(), - this.x3 = const Value.absent(), - this.y3 = const Value.absent(), - this.x4 = const Value.absent(), - this.y4 = const Value.absent(), - this.boxScore = const Value.absent(), - this.textScore = const Value.absent(), - this.recognizedText = const Value.absent(), - this.isVisible = const Value.absent(), - }); - AssetOcrEntityCompanion.insert({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - this.isVisible = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - x1 = Value(x1), - y1 = Value(y1), - x2 = Value(x2), - y2 = Value(y2), - x3 = Value(x3), - y3 = Value(y3), - x4 = Value(x4), - y4 = Value(y4), - boxScore = Value(boxScore), - textScore = Value(textScore), - recognizedText = Value(recognizedText); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? x1, - Expression? y1, - Expression? x2, - Expression? y2, - Expression? x3, - Expression? y3, - Expression? x4, - Expression? y4, - Expression? boxScore, - Expression? textScore, - Expression? recognizedText, - Expression? isVisible, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (x1 != null) 'x1': x1, - if (y1 != null) 'y1': y1, - if (x2 != null) 'x2': x2, - if (y2 != null) 'y2': y2, - if (x3 != null) 'x3': x3, - if (y3 != null) 'y3': y3, - if (x4 != null) 'x4': x4, - if (y4 != null) 'y4': y4, - if (boxScore != null) 'box_score': boxScore, - if (textScore != null) 'text_score': textScore, - if (recognizedText != null) 'recognized_text': recognizedText, - if (isVisible != null) 'is_visible': isVisible, - }); - } - - AssetOcrEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? x1, - Value? y1, - Value? x2, - Value? y2, - Value? x3, - Value? y3, - Value? x4, - Value? y4, - Value? boxScore, - Value? textScore, - Value? recognizedText, - Value? isVisible, - }) { - return AssetOcrEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (x1.present) { - map['x1'] = Variable(x1.value); - } - if (y1.present) { - map['y1'] = Variable(y1.value); - } - if (x2.present) { - map['x2'] = Variable(x2.value); - } - if (y2.present) { - map['y2'] = Variable(y2.value); - } - if (x3.present) { - map['x3'] = Variable(x3.value); - } - if (y3.present) { - map['y3'] = Variable(y3.value); - } - if (x4.present) { - map['x4'] = Variable(x4.value); - } - if (y4.present) { - map['y4'] = Variable(y4.value); - } - if (boxScore.present) { - map['box_score'] = Variable(boxScore.value); - } - if (textScore.present) { - map['text_score'] = Variable(textScore.value); - } - if (recognizedText.present) { - map['recognized_text'] = Variable(recognizedText.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV29 extends GeneratedDatabase { - DatabaseAtV29(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxLocalAssetCreatedAt = Index( - 'idx_local_asset_created_at', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Settings settings = Settings(this); - late final AssetOcrEntity assetOcrEntity = AssetOcrEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - late final Index idxAssetOcrAssetId = Index( - 'idx_asset_ocr_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxLocalAssetCreatedAt, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settings, - assetOcrEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - idxAssetOcrAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_ocr_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 29; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v3.dart b/mobile/test/drift/main/generated/schema_v3.dart deleted file mode 100644 index ecfe09dfd7..0000000000 --- a/mobile/test/drift/main/generated/schema_v3.dart +++ /dev/null @@ -1,5995 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn profileImagePath = GeneratedColumn( - 'profile_image_path', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - profileImagePath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_image_path'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - ), - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final bool isAdmin; - final String email; - final String? profileImagePath; - final DateTime updatedAt; - final int? quotaSizeInBytes; - final int quotaUsageInBytes; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - this.profileImagePath, - required this.updatedAt, - this.quotaSizeInBytes, - required this.quotaUsageInBytes, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - if (!nullToAbsent || profileImagePath != null) { - map['profile_image_path'] = Variable(profileImagePath); - } - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || quotaSizeInBytes != null) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - } - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - profileImagePath: serializer.fromJson(json['profileImagePath']), - updatedAt: serializer.fromJson(json['updatedAt']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'profileImagePath': serializer.toJson(profileImagePath), - 'updatedAt': serializer.toJson(updatedAt), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - Value profileImagePath = const Value.absent(), - DateTime? updatedAt, - Value quotaSizeInBytes = const Value.absent(), - int? quotaUsageInBytes, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath.present - ? profileImagePath.value - : this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes.present - ? quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - profileImagePath: data.profileImagePath.present - ? data.profileImagePath.value - : this.profileImagePath, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.profileImagePath == this.profileImagePath && - other.updatedAt == this.updatedAt && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value profileImagePath; - final Value updatedAt; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? profileImagePath, - Expression? updatedAt, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (profileImagePath != null) 'profile_image_path': profileImagePath, - if (updatedAt != null) 'updated_at': updatedAt, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? profileImagePath, - Value? updatedAt, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath ?? this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (profileImagePath.present) { - map['profile_image_path'] = Variable(profileImagePath.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbnailPath = GeneratedColumn( - 'thumbnail_path', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - thumbnailPath, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - thumbnailPath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_path'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final String thumbnailPath; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.thumbnailPath, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['thumbnail_path'] = Variable(thumbnailPath); - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - thumbnailPath: serializer.fromJson(json['thumbnailPath']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'thumbnailPath': serializer.toJson(thumbnailPath), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - String? thumbnailPath, - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - thumbnailPath: data.thumbnailPath.present - ? data.thumbnailPath.value - : this.thumbnailPath, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('thumbnailPath: $thumbnailPath, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - thumbnailPath, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.thumbnailPath == this.thumbnailPath && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value thumbnailPath; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.thumbnailPath = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required String thumbnailPath, - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - thumbnailPath = Value(thumbnailPath), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? thumbnailPath, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (thumbnailPath != null) 'thumbnail_path': thumbnailPath, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? thumbnailPath, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - thumbnailPath: thumbnailPath ?? this.thumbnailPath, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (thumbnailPath.present) { - map['thumbnail_path'] = Variable(thumbnailPath.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('thumbnailPath: $thumbnailPath, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV3 extends GeneratedDatabase { - DatabaseAtV3(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - localAssetEntity, - stackEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - localAlbumEntity, - localAlbumAssetEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - ]; - @override - int get schemaVersion => 3; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v30.dart b/mobile/test/drift/main/generated/schema_v30.dart deleted file mode 100644 index 642bd4aadd..0000000000 --- a/mobile/test/drift/main/generated/schema_v30.dart +++ /dev/null @@ -1,10027 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (uploadedAt != null) 'uploaded_at': uploadedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? marker; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - String? updatedAt, - int? backupSelection, - int? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker == this.marker); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [assetId, albumId, marker]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? marker; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker == this.marker); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - int? isAdmin, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - int? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required String memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required int isFavorite, - required int isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final int isVisible; - final String? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Settings extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Settings(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - Set get $primaryKey => {key}; - @override - SettingsData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SettingsData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Settings createAlias(String alias) { - return Settings(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class SettingsData extends DataClass implements Insertable { - final String key; - final String? value; - final String updatedAt; - const SettingsData({required this.key, this.value, required this.updatedAt}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - if (!nullToAbsent || value != null) { - map['value'] = Variable(value); - } - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory SettingsData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SettingsData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - SettingsData copyWith({ - String? key, - Value value = const Value.absent(), - String? updatedAt, - }) => SettingsData( - key: key ?? this.key, - value: value.present ? value.value : this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsData copyWithCompanion(SettingsCompanion data) { - return SettingsData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SettingsData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const SettingsCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - SettingsCompanion.insert({ - required String key, - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : key = Value(key); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - SettingsCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return SettingsCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class AssetOcrEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetOcrEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn x1 = GeneratedColumn( - 'x1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y1 = GeneratedColumn( - 'y1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x2 = GeneratedColumn( - 'x2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y2 = GeneratedColumn( - 'y2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x3 = GeneratedColumn( - 'x3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y3 = GeneratedColumn( - 'y3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x4 = GeneratedColumn( - 'x4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y4 = GeneratedColumn( - 'y4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boxScore = GeneratedColumn( - 'box_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn textScore = GeneratedColumn( - 'text_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn recognizedText = GeneratedColumn( - 'recognized_text', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - @override - List get $columns => [ - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_ocr_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetOcrEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetOcrEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - x1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x1'], - )!, - y1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y1'], - )!, - x2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x2'], - )!, - y2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y2'], - )!, - x3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x3'], - )!, - y3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y3'], - )!, - x4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x4'], - )!, - y4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y4'], - )!, - boxScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}box_score'], - )!, - textScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}text_score'], - )!, - recognizedText: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}recognized_text'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - ); - } - - @override - AssetOcrEntity createAlias(String alias) { - return AssetOcrEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetOcrEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final double x1; - final double y1; - final double x2; - final double y2; - final double x3; - final double y3; - final double x4; - final double y4; - final double boxScore; - final double textScore; - final String recognizedText; - final int isVisible; - const AssetOcrEntityData({ - required this.id, - required this.assetId, - required this.x1, - required this.y1, - required this.x2, - required this.y2, - required this.x3, - required this.y3, - required this.x4, - required this.y4, - required this.boxScore, - required this.textScore, - required this.recognizedText, - required this.isVisible, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['x1'] = Variable(x1); - map['y1'] = Variable(y1); - map['x2'] = Variable(x2); - map['y2'] = Variable(y2); - map['x3'] = Variable(x3); - map['y3'] = Variable(y3); - map['x4'] = Variable(x4); - map['y4'] = Variable(y4); - map['box_score'] = Variable(boxScore); - map['text_score'] = Variable(textScore); - map['recognized_text'] = Variable(recognizedText); - map['is_visible'] = Variable(isVisible); - return map; - } - - factory AssetOcrEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetOcrEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - x1: serializer.fromJson(json['x1']), - y1: serializer.fromJson(json['y1']), - x2: serializer.fromJson(json['x2']), - y2: serializer.fromJson(json['y2']), - x3: serializer.fromJson(json['x3']), - y3: serializer.fromJson(json['y3']), - x4: serializer.fromJson(json['x4']), - y4: serializer.fromJson(json['y4']), - boxScore: serializer.fromJson(json['boxScore']), - textScore: serializer.fromJson(json['textScore']), - recognizedText: serializer.fromJson(json['recognizedText']), - isVisible: serializer.fromJson(json['isVisible']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'x1': serializer.toJson(x1), - 'y1': serializer.toJson(y1), - 'x2': serializer.toJson(x2), - 'y2': serializer.toJson(y2), - 'x3': serializer.toJson(x3), - 'y3': serializer.toJson(y3), - 'x4': serializer.toJson(x4), - 'y4': serializer.toJson(y4), - 'boxScore': serializer.toJson(boxScore), - 'textScore': serializer.toJson(textScore), - 'recognizedText': serializer.toJson(recognizedText), - 'isVisible': serializer.toJson(isVisible), - }; - } - - AssetOcrEntityData copyWith({ - String? id, - String? assetId, - double? x1, - double? y1, - double? x2, - double? y2, - double? x3, - double? y3, - double? x4, - double? y4, - double? boxScore, - double? textScore, - String? recognizedText, - int? isVisible, - }) => AssetOcrEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - AssetOcrEntityData copyWithCompanion(AssetOcrEntityCompanion data) { - return AssetOcrEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - x1: data.x1.present ? data.x1.value : this.x1, - y1: data.y1.present ? data.y1.value : this.y1, - x2: data.x2.present ? data.x2.value : this.x2, - y2: data.y2.present ? data.y2.value : this.y2, - x3: data.x3.present ? data.x3.value : this.x3, - y3: data.y3.present ? data.y3.value : this.y3, - x4: data.x4.present ? data.x4.value : this.x4, - y4: data.y4.present ? data.y4.value : this.y4, - boxScore: data.boxScore.present ? data.boxScore.value : this.boxScore, - textScore: data.textScore.present ? data.textScore.value : this.textScore, - recognizedText: data.recognizedText.present - ? data.recognizedText.value - : this.recognizedText, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - ); - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetOcrEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.x1 == this.x1 && - other.y1 == this.y1 && - other.x2 == this.x2 && - other.y2 == this.y2 && - other.x3 == this.x3 && - other.y3 == this.y3 && - other.x4 == this.x4 && - other.y4 == this.y4 && - other.boxScore == this.boxScore && - other.textScore == this.textScore && - other.recognizedText == this.recognizedText && - other.isVisible == this.isVisible); -} - -class AssetOcrEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value x1; - final Value y1; - final Value x2; - final Value y2; - final Value x3; - final Value y3; - final Value x4; - final Value y4; - final Value boxScore; - final Value textScore; - final Value recognizedText; - final Value isVisible; - const AssetOcrEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.x1 = const Value.absent(), - this.y1 = const Value.absent(), - this.x2 = const Value.absent(), - this.y2 = const Value.absent(), - this.x3 = const Value.absent(), - this.y3 = const Value.absent(), - this.x4 = const Value.absent(), - this.y4 = const Value.absent(), - this.boxScore = const Value.absent(), - this.textScore = const Value.absent(), - this.recognizedText = const Value.absent(), - this.isVisible = const Value.absent(), - }); - AssetOcrEntityCompanion.insert({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - this.isVisible = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - x1 = Value(x1), - y1 = Value(y1), - x2 = Value(x2), - y2 = Value(y2), - x3 = Value(x3), - y3 = Value(y3), - x4 = Value(x4), - y4 = Value(y4), - boxScore = Value(boxScore), - textScore = Value(textScore), - recognizedText = Value(recognizedText); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? x1, - Expression? y1, - Expression? x2, - Expression? y2, - Expression? x3, - Expression? y3, - Expression? x4, - Expression? y4, - Expression? boxScore, - Expression? textScore, - Expression? recognizedText, - Expression? isVisible, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (x1 != null) 'x1': x1, - if (y1 != null) 'y1': y1, - if (x2 != null) 'x2': x2, - if (y2 != null) 'y2': y2, - if (x3 != null) 'x3': x3, - if (y3 != null) 'y3': y3, - if (x4 != null) 'x4': x4, - if (y4 != null) 'y4': y4, - if (boxScore != null) 'box_score': boxScore, - if (textScore != null) 'text_score': textScore, - if (recognizedText != null) 'recognized_text': recognizedText, - if (isVisible != null) 'is_visible': isVisible, - }); - } - - AssetOcrEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? x1, - Value? y1, - Value? x2, - Value? y2, - Value? x3, - Value? y3, - Value? x4, - Value? y4, - Value? boxScore, - Value? textScore, - Value? recognizedText, - Value? isVisible, - }) { - return AssetOcrEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (x1.present) { - map['x1'] = Variable(x1.value); - } - if (y1.present) { - map['y1'] = Variable(y1.value); - } - if (x2.present) { - map['x2'] = Variable(x2.value); - } - if (y2.present) { - map['y2'] = Variable(y2.value); - } - if (x3.present) { - map['x3'] = Variable(x3.value); - } - if (y3.present) { - map['y3'] = Variable(y3.value); - } - if (x4.present) { - map['x4'] = Variable(x4.value); - } - if (y4.present) { - map['y4'] = Variable(y4.value); - } - if (boxScore.present) { - map['box_score'] = Variable(boxScore.value); - } - if (textScore.present) { - map['text_score'] = Variable(textScore.value); - } - if (recognizedText.present) { - map['recognized_text'] = Variable(recognizedText.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV30 extends GeneratedDatabase { - DatabaseAtV30(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxLocalAssetCreatedAt = Index( - 'idx_local_asset_created_at', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Settings settings = Settings(this); - late final AssetOcrEntity assetOcrEntity = AssetOcrEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - late final Index idxAssetOcrAssetId = Index( - 'idx_asset_ocr_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxLocalAssetCreatedAt, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settings, - assetOcrEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - idxAssetOcrAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_ocr_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 30; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v31.dart b/mobile/test/drift/main/generated/schema_v31.dart deleted file mode 100644 index 06db7e3081..0000000000 --- a/mobile/test/drift/main/generated/schema_v31.dart +++ /dev/null @@ -1,10032 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final String email; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - const UserEntityData({ - required this.id, - required this.name, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - String? email, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - hasProfileImage, - profileChangedAt, - avatarColor, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn localDateTime = GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn uploadedAt = GeneratedColumn( - 'uploaded_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isEdited = GeneratedColumn( - 'is_edited', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - uploadedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}uploaded_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - isEdited: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_edited'], - )!, - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String checksum; - final int isFavorite; - final String ownerId; - final String? localDateTime; - final String? thumbHash; - final String? deletedAt; - final String? uploadedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - final int isEdited; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.uploadedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - required this.isEdited, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || uploadedAt != null) { - map['uploaded_at'] = Variable(uploadedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - map['is_edited'] = Variable(isEdited); - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - uploadedAt: serializer.fromJson(json['uploadedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - isEdited: serializer.fromJson(json['isEdited']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'uploadedAt': serializer.toJson(uploadedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - 'isEdited': serializer.toJson(isEdited), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? checksum, - int? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value uploadedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - int? isEdited, - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - uploadedAt: uploadedAt.present ? uploadedAt.value : this.uploadedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - uploadedAt: data.uploadedAt.present - ? data.uploadedAt.value - : this.uploadedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - uploadedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - isEdited, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.uploadedAt == this.uploadedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId && - other.isEdited == this.isEdited); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value uploadedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - final Value isEdited; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.uploadedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - this.isEdited = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? uploadedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - Expression? isEdited, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (uploadedAt != null) 'uploaded_at': uploadedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - if (isEdited != null) 'is_edited': isEdited, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? uploadedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - Value? isEdited, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - uploadedAt: uploadedAt ?? this.uploadedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - isEdited: isEdited ?? this.isEdited, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (uploadedAt.present) { - map['uploaded_at'] = Variable(uploadedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - if (isEdited.present) { - map['is_edited'] = Variable(isEdited.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('uploadedAt: $uploadedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId, ') - ..write('isEdited: $isEdited') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn iCloudId = GeneratedColumn( - 'i_cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - iCloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}i_cloud_id'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String? checksum; - final int isFavorite; - final int orientation; - final String? iCloudId; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - final int playbackStyle; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - this.iCloudId, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - if (!nullToAbsent || iCloudId != null) { - map['i_cloud_id'] = Variable(iCloudId); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - iCloudId: serializer.fromJson(json['iCloudId']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'iCloudId': serializer.toJson(iCloudId), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - Value iCloudId = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - int? playbackStyle, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - checksum, - isFavorite, - orientation, - iCloudId, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.iCloudId == this.iCloudId && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.playbackStyle == this.playbackStyle); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value iCloudId; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - final Value playbackStyle; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.iCloudId = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? iCloudId, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (iCloudId != null) 'i_cloud_id': iCloudId, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? iCloudId, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - Value? playbackStyle, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - iCloudId: iCloudId ?? this.iCloudId, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (iCloudId.present) { - map['i_cloud_id'] = Variable(iCloudId.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('iCloudId: $iCloudId, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT \'\'', - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final String createdAt; - final String updatedAt; - final String? thumbnailAssetId; - final int isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - String? createdAt, - String? updatedAt, - Value thumbnailAssetId = const Value.absent(), - int? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: - 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String updatedAt; - final int backupSelection; - final int isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final int? marker; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - String? updatedAt, - int? backupSelection, - int? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker == this.marker); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn marker = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL CHECK (marker IN (0, 1))', - ); - @override - List get $columns => [assetId, albumId, marker]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - marker: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - final int? marker; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - this.marker, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || marker != null) { - map['marker'] = Variable(marker); - } - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - marker: serializer.fromJson(json['marker']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - 'marker': serializer.toJson(marker), - }; - } - - LocalAlbumAssetEntityData copyWith({ - String? assetId, - String? albumId, - Value marker = const Value.absent(), - }) => LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker.present ? marker.value : this.marker, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - marker: data.marker.present ? data.marker.value : this.marker, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId, marker); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId && - other.marker == this.marker); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - final Value marker; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - this.marker = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - this.marker = const Value.absent(), - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - Expression? marker, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - if (marker != null) 'marker': marker, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - Value? marker, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - marker: marker ?? this.marker, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (marker.present) { - map['marker'] = Variable(marker.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId, ') - ..write('marker: $marker') - ..write(')')) - .toString(); - } -} - -class AuthUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AuthUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: - 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn avatarColor = GeneratedColumn( - 'avatar_color', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn pinCode = GeneratedColumn( - 'pin_code', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'auth_user_entity'; - @override - Set get $primaryKey => {id}; - @override - AuthUserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AuthUserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_admin'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_changed_at'], - )!, - avatarColor: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}avatar_color'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - )!, - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - pinCode: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}pin_code'], - ), - ); - } - - @override - AuthUserEntity createAlias(String alias) { - return AuthUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AuthUserEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String email; - final int isAdmin; - final int hasProfileImage; - final String profileChangedAt; - final int avatarColor; - final int quotaSizeInBytes; - final int quotaUsageInBytes; - final String? pinCode; - const AuthUserEntityData({ - required this.id, - required this.name, - required this.email, - required this.isAdmin, - required this.hasProfileImage, - required this.profileChangedAt, - required this.avatarColor, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - this.pinCode, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['email'] = Variable(email); - map['is_admin'] = Variable(isAdmin); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['avatar_color'] = Variable(avatarColor); - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - if (!nullToAbsent || pinCode != null) { - map['pin_code'] = Variable(pinCode); - } - return map; - } - - factory AuthUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AuthUserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - email: serializer.fromJson(json['email']), - isAdmin: serializer.fromJson(json['isAdmin']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - avatarColor: serializer.fromJson(json['avatarColor']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - pinCode: serializer.fromJson(json['pinCode']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'email': serializer.toJson(email), - 'isAdmin': serializer.toJson(isAdmin), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'avatarColor': serializer.toJson(avatarColor), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - 'pinCode': serializer.toJson(pinCode), - }; - } - - AuthUserEntityData copyWith({ - String? id, - String? name, - String? email, - int? isAdmin, - int? hasProfileImage, - String? profileChangedAt, - int? avatarColor, - int? quotaSizeInBytes, - int? quotaUsageInBytes, - Value pinCode = const Value.absent(), - }) => AuthUserEntityData( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode.present ? pinCode.value : this.pinCode, - ); - AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { - return AuthUserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - email: data.email.present ? data.email.value : this.email, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - avatarColor: data.avatarColor.present - ? data.avatarColor.value - : this.avatarColor, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, - ); - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - email, - isAdmin, - hasProfileImage, - profileChangedAt, - avatarColor, - quotaSizeInBytes, - quotaUsageInBytes, - pinCode, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AuthUserEntityData && - other.id == this.id && - other.name == this.name && - other.email == this.email && - other.isAdmin == this.isAdmin && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.avatarColor == this.avatarColor && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes && - other.pinCode == this.pinCode); -} - -class AuthUserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value email; - final Value isAdmin; - final Value hasProfileImage; - final Value profileChangedAt; - final Value avatarColor; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - final Value pinCode; - const AuthUserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.email = const Value.absent(), - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.avatarColor = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }); - AuthUserEntityCompanion.insert({ - required String id, - required String name, - required String email, - this.isAdmin = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - required int avatarColor, - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - this.pinCode = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email), - avatarColor = Value(avatarColor); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? email, - Expression? isAdmin, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? avatarColor, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - Expression? pinCode, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (email != null) 'email': email, - if (isAdmin != null) 'is_admin': isAdmin, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (avatarColor != null) 'avatar_color': avatarColor, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - if (pinCode != null) 'pin_code': pinCode, - }); - } - - AuthUserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? email, - Value? isAdmin, - Value? hasProfileImage, - Value? profileChangedAt, - Value? avatarColor, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - Value? pinCode, - }) { - return AuthUserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - email: email ?? this.email, - isAdmin: isAdmin ?? this.isAdmin, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - avatarColor: avatarColor ?? this.avatarColor, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - pinCode: pinCode ?? this.pinCode, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (avatarColor.present) { - map['avatar_color'] = Variable(avatarColor.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - if (pinCode.present) { - map['pin_code'] = Variable(pinCode.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AuthUserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('email: $email, ') - ..write('isAdmin: $isAdmin, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('avatarColor: $avatarColor, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes, ') - ..write('pinCode: $pinCode') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(user_id, "key")']; - @override - bool get dontWriteConstraints => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(shared_by_id, shared_with_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final int inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - int? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn dateTimeOriginal = GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final String? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, album_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(album_id, user_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class RemoteAssetCloudIdEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn cloudId = GeneratedColumn( - 'cloud_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn adjustmentTime = GeneratedColumn( - 'adjustment_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_cloud_id_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteAssetCloudIdEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetCloudIdEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - cloudId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}cloud_id'], - ), - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - ), - adjustmentTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}adjustment_time'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - ); - } - - @override - RemoteAssetCloudIdEntity createAlias(String alias) { - return RemoteAssetCloudIdEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(asset_id)']; - @override - bool get dontWriteConstraints => true; -} - -class RemoteAssetCloudIdEntityData extends DataClass - implements Insertable { - final String assetId; - final String? cloudId; - final String? createdAt; - final String? adjustmentTime; - final double? latitude; - final double? longitude; - const RemoteAssetCloudIdEntityData({ - required this.assetId, - this.cloudId, - this.createdAt, - this.adjustmentTime, - this.latitude, - this.longitude, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || cloudId != null) { - map['cloud_id'] = Variable(cloudId); - } - if (!nullToAbsent || createdAt != null) { - map['created_at'] = Variable(createdAt); - } - if (!nullToAbsent || adjustmentTime != null) { - map['adjustment_time'] = Variable(adjustmentTime); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - return map; - } - - factory RemoteAssetCloudIdEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetCloudIdEntityData( - assetId: serializer.fromJson(json['assetId']), - cloudId: serializer.fromJson(json['cloudId']), - createdAt: serializer.fromJson(json['createdAt']), - adjustmentTime: serializer.fromJson(json['adjustmentTime']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'cloudId': serializer.toJson(cloudId), - 'createdAt': serializer.toJson(createdAt), - 'adjustmentTime': serializer.toJson(adjustmentTime), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - }; - } - - RemoteAssetCloudIdEntityData copyWith({ - String? assetId, - Value cloudId = const Value.absent(), - Value createdAt = const Value.absent(), - Value adjustmentTime = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - }) => RemoteAssetCloudIdEntityData( - assetId: assetId ?? this.assetId, - cloudId: cloudId.present ? cloudId.value : this.cloudId, - createdAt: createdAt.present ? createdAt.value : this.createdAt, - adjustmentTime: adjustmentTime.present - ? adjustmentTime.value - : this.adjustmentTime, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - ); - RemoteAssetCloudIdEntityData copyWithCompanion( - RemoteAssetCloudIdEntityCompanion data, - ) { - return RemoteAssetCloudIdEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - adjustmentTime: data.adjustmentTime.present - ? data.adjustmentTime.value - : this.adjustmentTime, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityData(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - assetId, - cloudId, - createdAt, - adjustmentTime, - latitude, - longitude, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetCloudIdEntityData && - other.assetId == this.assetId && - other.cloudId == this.cloudId && - other.createdAt == this.createdAt && - other.adjustmentTime == this.adjustmentTime && - other.latitude == this.latitude && - other.longitude == this.longitude); -} - -class RemoteAssetCloudIdEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value cloudId; - final Value createdAt; - final Value adjustmentTime; - final Value latitude; - final Value longitude; - const RemoteAssetCloudIdEntityCompanion({ - this.assetId = const Value.absent(), - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }); - RemoteAssetCloudIdEntityCompanion.insert({ - required String assetId, - this.cloudId = const Value.absent(), - this.createdAt = const Value.absent(), - this.adjustmentTime = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? cloudId, - Expression? createdAt, - Expression? adjustmentTime, - Expression? latitude, - Expression? longitude, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (cloudId != null) 'cloud_id': cloudId, - if (createdAt != null) 'created_at': createdAt, - if (adjustmentTime != null) 'adjustment_time': adjustmentTime, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }); - } - - RemoteAssetCloudIdEntityCompanion copyWith({ - Value? assetId, - Value? cloudId, - Value? createdAt, - Value? adjustmentTime, - Value? latitude, - Value? longitude, - }) { - return RemoteAssetCloudIdEntityCompanion( - assetId: assetId ?? this.assetId, - cloudId: cloudId ?? this.cloudId, - createdAt: createdAt ?? this.createdAt, - adjustmentTime: adjustmentTime ?? this.adjustmentTime, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (cloudId.present) { - map['cloud_id'] = Variable(cloudId.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (adjustmentTime.present) { - map['adjustment_time'] = Variable(adjustmentTime.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetCloudIdEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('cloudId: $cloudId, ') - ..write('createdAt: $createdAt, ') - ..write('adjustmentTime: $adjustmentTime, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String? deletedAt; - final String ownerId; - final int type; - final String data; - final int isSaved; - final String memoryAt; - final String? seenAt; - final String? showAt; - final String? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - int? isSaved, - String? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required String memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE', - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const [ - 'PRIMARY KEY(asset_id, memory_id)', - ]; - @override - bool get dontWriteConstraints => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))', - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))', - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final String createdAt; - final String updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final int isFavorite; - final int isHidden; - final String? color; - final String? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - String? createdAt, - String? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - int? isFavorite, - int? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required int isFavorite, - required int isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL', - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}deleted_at'], - ), - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - final int isVisible; - final String? deletedAt; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - required this.isVisible, - this.deletedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - map['is_visible'] = Variable(isVisible); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - isVisible: serializer.fromJson(json['isVisible']), - deletedAt: serializer.fromJson(json['deletedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - 'isVisible': serializer.toJson(isVisible), - 'deletedAt': serializer.toJson(deletedAt), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - int? isVisible, - Value deletedAt = const Value.absent(), - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - isVisible, - deletedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType && - other.isVisible == this.isVisible && - other.deletedAt == this.deletedAt); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - final Value isVisible; - final Value deletedAt; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - this.isVisible = const Value.absent(), - this.deletedAt = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - Expression? isVisible, - Expression? deletedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - if (isVisible != null) 'is_visible': isVisible, - if (deletedAt != null) 'deleted_at': deletedAt, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - Value? isVisible, - Value? deletedAt, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - isVisible: isVisible ?? this.isVisible, - deletedAt: deletedAt ?? this.deletedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType, ') - ..write('isVisible: $isVisible, ') - ..write('deletedAt: $deletedAt') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class TrashedLocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn durationMs = GeneratedColumn( - 'duration_ms', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn source = GeneratedColumn( - 'source', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn playbackStyle = GeneratedColumn( - 'playback_style', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 0', - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'trashed_local_asset_entity'; - @override - Set get $primaryKey => {id, albumId}; - @override - TrashedLocalAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return TrashedLocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationMs: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_ms'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - source: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}source'], - )!, - playbackStyle: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}playback_style'], - )!, - ); - } - - @override - TrashedLocalAssetEntity createAlias(String alias) { - return TrashedLocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id, album_id)']; - @override - bool get dontWriteConstraints => true; -} - -class TrashedLocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final String createdAt; - final String updatedAt; - final int? width; - final int? height; - final int? durationMs; - final String id; - final String albumId; - final String? checksum; - final int isFavorite; - final int orientation; - final int source; - final int playbackStyle; - const TrashedLocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationMs, - required this.id, - required this.albumId, - this.checksum, - required this.isFavorite, - required this.orientation, - required this.source, - required this.playbackStyle, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationMs != null) { - map['duration_ms'] = Variable(durationMs); - } - map['id'] = Variable(id); - map['album_id'] = Variable(albumId); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - map['source'] = Variable(source); - map['playback_style'] = Variable(playbackStyle); - return map; - } - - factory TrashedLocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return TrashedLocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationMs: serializer.fromJson(json['durationMs']), - id: serializer.fromJson(json['id']), - albumId: serializer.fromJson(json['albumId']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - source: serializer.fromJson(json['source']), - playbackStyle: serializer.fromJson(json['playbackStyle']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationMs': serializer.toJson(durationMs), - 'id': serializer.toJson(id), - 'albumId': serializer.toJson(albumId), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - 'source': serializer.toJson(source), - 'playbackStyle': serializer.toJson(playbackStyle), - }; - } - - TrashedLocalAssetEntityData copyWith({ - String? name, - int? type, - String? createdAt, - String? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationMs = const Value.absent(), - String? id, - String? albumId, - Value checksum = const Value.absent(), - int? isFavorite, - int? orientation, - int? source, - int? playbackStyle, - }) => TrashedLocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationMs: durationMs.present ? durationMs.value : this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - TrashedLocalAssetEntityData copyWithCompanion( - TrashedLocalAssetEntityCompanion data, - ) { - return TrashedLocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationMs: data.durationMs.present - ? data.durationMs.value - : this.durationMs, - id: data.id.present ? data.id.value : this.id, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - source: data.source.present ? data.source.value : this.source, - playbackStyle: data.playbackStyle.present - ? data.playbackStyle.value - : this.playbackStyle, - ); - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - id, - albumId, - checksum, - isFavorite, - orientation, - source, - playbackStyle, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is TrashedLocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationMs == this.durationMs && - other.id == this.id && - other.albumId == this.albumId && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation && - other.source == this.source && - other.playbackStyle == this.playbackStyle); -} - -class TrashedLocalAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationMs; - final Value id; - final Value albumId; - final Value checksum; - final Value isFavorite; - final Value orientation; - final Value source; - final Value playbackStyle; - const TrashedLocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - this.id = const Value.absent(), - this.albumId = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - this.source = const Value.absent(), - this.playbackStyle = const Value.absent(), - }); - TrashedLocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationMs = const Value.absent(), - required String id, - required String albumId, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - required int source, - this.playbackStyle = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - albumId = Value(albumId), - source = Value(source); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationMs, - Expression? id, - Expression? albumId, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - Expression? source, - Expression? playbackStyle, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationMs != null) 'duration_ms': durationMs, - if (id != null) 'id': id, - if (albumId != null) 'album_id': albumId, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - if (source != null) 'source': source, - if (playbackStyle != null) 'playback_style': playbackStyle, - }); - } - - TrashedLocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationMs, - Value? id, - Value? albumId, - Value? checksum, - Value? isFavorite, - Value? orientation, - Value? source, - Value? playbackStyle, - }) { - return TrashedLocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationMs: durationMs ?? this.durationMs, - id: id ?? this.id, - albumId: albumId ?? this.albumId, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - source: source ?? this.source, - playbackStyle: playbackStyle ?? this.playbackStyle, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationMs.present) { - map['duration_ms'] = Variable(durationMs.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (source.present) { - map['source'] = Variable(source.value); - } - if (playbackStyle.present) { - map['playback_style'] = Variable(playbackStyle.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('TrashedLocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationMs: $durationMs, ') - ..write('id: $id, ') - ..write('albumId: $albumId, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation, ') - ..write('source: $source, ') - ..write('playbackStyle: $playbackStyle') - ..write(')')) - .toString(); - } -} - -class AssetEditEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetEditEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn action = GeneratedColumn( - 'action', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn parameters = - GeneratedColumn( - 'parameters', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn sequence = GeneratedColumn( - 'sequence', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - @override - List get $columns => [ - id, - assetId, - action, - parameters, - sequence, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_edit_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetEditEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetEditEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - action: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}action'], - )!, - parameters: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}parameters'], - )!, - sequence: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}sequence'], - )!, - ); - } - - @override - AssetEditEntity createAlias(String alias) { - return AssetEditEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetEditEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final int action; - final i2.Uint8List parameters; - final int sequence; - const AssetEditEntityData({ - required this.id, - required this.assetId, - required this.action, - required this.parameters, - required this.sequence, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['action'] = Variable(action); - map['parameters'] = Variable(parameters); - map['sequence'] = Variable(sequence); - return map; - } - - factory AssetEditEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetEditEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - action: serializer.fromJson(json['action']), - parameters: serializer.fromJson(json['parameters']), - sequence: serializer.fromJson(json['sequence']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'action': serializer.toJson(action), - 'parameters': serializer.toJson(parameters), - 'sequence': serializer.toJson(sequence), - }; - } - - AssetEditEntityData copyWith({ - String? id, - String? assetId, - int? action, - i2.Uint8List? parameters, - int? sequence, - }) => AssetEditEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) { - return AssetEditEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - action: data.action.present ? data.action.value : this.action, - parameters: data.parameters.present - ? data.parameters.value - : this.parameters, - sequence: data.sequence.present ? data.sequence.value : this.sequence, - ); - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - action, - $driftBlobEquality.hash(parameters), - sequence, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetEditEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.action == this.action && - $driftBlobEquality.equals(other.parameters, this.parameters) && - other.sequence == this.sequence); -} - -class AssetEditEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value action; - final Value parameters; - final Value sequence; - const AssetEditEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.action = const Value.absent(), - this.parameters = const Value.absent(), - this.sequence = const Value.absent(), - }); - AssetEditEntityCompanion.insert({ - required String id, - required String assetId, - required int action, - required i2.Uint8List parameters, - required int sequence, - }) : id = Value(id), - assetId = Value(assetId), - action = Value(action), - parameters = Value(parameters), - sequence = Value(sequence); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? action, - Expression? parameters, - Expression? sequence, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (action != null) 'action': action, - if (parameters != null) 'parameters': parameters, - if (sequence != null) 'sequence': sequence, - }); - } - - AssetEditEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? action, - Value? parameters, - Value? sequence, - }) { - return AssetEditEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - action: action ?? this.action, - parameters: parameters ?? this.parameters, - sequence: sequence ?? this.sequence, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (action.present) { - map['action'] = Variable(action.value); - } - if (parameters.present) { - map['parameters'] = Variable(parameters.value); - } - if (sequence.present) { - map['sequence'] = Variable(sequence.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetEditEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('action: $action, ') - ..write('parameters: $parameters, ') - ..write('sequence: $sequence') - ..write(')')) - .toString(); - } -} - -class Settings extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - Settings(this.attachedDatabase, [this._alias]); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn value = GeneratedColumn( - 'value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NULL', - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP', - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [key, value, updatedAt]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'settings'; - @override - Set get $primaryKey => {key}; - @override - SettingsData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return SettingsData( - key: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}value'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - Settings createAlias(String alias) { - return Settings(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY("key")']; - @override - bool get dontWriteConstraints => true; -} - -class SettingsData extends DataClass implements Insertable { - final String key; - final String? value; - final String updatedAt; - const SettingsData({required this.key, this.value, required this.updatedAt}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['key'] = Variable(key); - if (!nullToAbsent || value != null) { - map['value'] = Variable(value); - } - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory SettingsData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return SettingsData( - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - SettingsData copyWith({ - String? key, - Value value = const Value.absent(), - String? updatedAt, - }) => SettingsData( - key: key ?? this.key, - value: value.present ? value.value : this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - SettingsData copyWithCompanion(SettingsCompanion data) { - return SettingsData( - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('SettingsData(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(key, value, updatedAt); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is SettingsData && - other.key == this.key && - other.value == this.value && - other.updatedAt == this.updatedAt); -} - -class SettingsCompanion extends UpdateCompanion { - final Value key; - final Value value; - final Value updatedAt; - const SettingsCompanion({ - this.key = const Value.absent(), - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - SettingsCompanion.insert({ - required String key, - this.value = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : key = Value(key); - static Insertable custom({ - Expression? key, - Expression? value, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (key != null) 'key': key, - if (value != null) 'value': value, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - SettingsCompanion copyWith({ - Value? key, - Value? value, - Value? updatedAt, - }) { - return SettingsCompanion( - key: key ?? this.key, - value: value ?? this.value, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('SettingsCompanion(') - ..write('key: $key, ') - ..write('value: $value, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class AssetOcrEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetOcrEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: - 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE', - ); - late final GeneratedColumn x1 = GeneratedColumn( - 'x1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y1 = GeneratedColumn( - 'y1', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x2 = GeneratedColumn( - 'x2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y2 = GeneratedColumn( - 'y2', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x3 = GeneratedColumn( - 'x3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y3 = GeneratedColumn( - 'y3', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn x4 = GeneratedColumn( - 'x4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn y4 = GeneratedColumn( - 'y4', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn boxScore = GeneratedColumn( - 'box_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn textScore = GeneratedColumn( - 'text_score', - aliasedName, - false, - type: DriftSqlType.double, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn recognizedText = GeneratedColumn( - 'recognized_text', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - $customConstraints: 'NOT NULL', - ); - late final GeneratedColumn isVisible = GeneratedColumn( - 'is_visible', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))', - defaultValue: const CustomExpression('1'), - ); - @override - List get $columns => [ - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_ocr_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetOcrEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetOcrEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - x1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x1'], - )!, - y1: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y1'], - )!, - x2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x2'], - )!, - y2: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y2'], - )!, - x3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x3'], - )!, - y3: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y3'], - )!, - x4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}x4'], - )!, - y4: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}y4'], - )!, - boxScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}box_score'], - )!, - textScore: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}text_score'], - )!, - recognizedText: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}recognized_text'], - )!, - isVisible: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}is_visible'], - )!, - ); - } - - @override - AssetOcrEntity createAlias(String alias) { - return AssetOcrEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; - @override - List get customConstraints => const ['PRIMARY KEY(id)']; - @override - bool get dontWriteConstraints => true; -} - -class AssetOcrEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final double x1; - final double y1; - final double x2; - final double y2; - final double x3; - final double y3; - final double x4; - final double y4; - final double boxScore; - final double textScore; - final String recognizedText; - final int isVisible; - const AssetOcrEntityData({ - required this.id, - required this.assetId, - required this.x1, - required this.y1, - required this.x2, - required this.y2, - required this.x3, - required this.y3, - required this.x4, - required this.y4, - required this.boxScore, - required this.textScore, - required this.recognizedText, - required this.isVisible, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - map['x1'] = Variable(x1); - map['y1'] = Variable(y1); - map['x2'] = Variable(x2); - map['y2'] = Variable(y2); - map['x3'] = Variable(x3); - map['y3'] = Variable(y3); - map['x4'] = Variable(x4); - map['y4'] = Variable(y4); - map['box_score'] = Variable(boxScore); - map['text_score'] = Variable(textScore); - map['recognized_text'] = Variable(recognizedText); - map['is_visible'] = Variable(isVisible); - return map; - } - - factory AssetOcrEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetOcrEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - x1: serializer.fromJson(json['x1']), - y1: serializer.fromJson(json['y1']), - x2: serializer.fromJson(json['x2']), - y2: serializer.fromJson(json['y2']), - x3: serializer.fromJson(json['x3']), - y3: serializer.fromJson(json['y3']), - x4: serializer.fromJson(json['x4']), - y4: serializer.fromJson(json['y4']), - boxScore: serializer.fromJson(json['boxScore']), - textScore: serializer.fromJson(json['textScore']), - recognizedText: serializer.fromJson(json['recognizedText']), - isVisible: serializer.fromJson(json['isVisible']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'x1': serializer.toJson(x1), - 'y1': serializer.toJson(y1), - 'x2': serializer.toJson(x2), - 'y2': serializer.toJson(y2), - 'x3': serializer.toJson(x3), - 'y3': serializer.toJson(y3), - 'x4': serializer.toJson(x4), - 'y4': serializer.toJson(y4), - 'boxScore': serializer.toJson(boxScore), - 'textScore': serializer.toJson(textScore), - 'recognizedText': serializer.toJson(recognizedText), - 'isVisible': serializer.toJson(isVisible), - }; - } - - AssetOcrEntityData copyWith({ - String? id, - String? assetId, - double? x1, - double? y1, - double? x2, - double? y2, - double? x3, - double? y3, - double? x4, - double? y4, - double? boxScore, - double? textScore, - String? recognizedText, - int? isVisible, - }) => AssetOcrEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - AssetOcrEntityData copyWithCompanion(AssetOcrEntityCompanion data) { - return AssetOcrEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - x1: data.x1.present ? data.x1.value : this.x1, - y1: data.y1.present ? data.y1.value : this.y1, - x2: data.x2.present ? data.x2.value : this.x2, - y2: data.y2.present ? data.y2.value : this.y2, - x3: data.x3.present ? data.x3.value : this.x3, - y3: data.y3.present ? data.y3.value : this.y3, - x4: data.x4.present ? data.x4.value : this.x4, - y4: data.y4.present ? data.y4.value : this.y4, - boxScore: data.boxScore.present ? data.boxScore.value : this.boxScore, - textScore: data.textScore.present ? data.textScore.value : this.textScore, - recognizedText: data.recognizedText.present - ? data.recognizedText.value - : this.recognizedText, - isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible, - ); - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - boxScore, - textScore, - recognizedText, - isVisible, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetOcrEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.x1 == this.x1 && - other.y1 == this.y1 && - other.x2 == this.x2 && - other.y2 == this.y2 && - other.x3 == this.x3 && - other.y3 == this.y3 && - other.x4 == this.x4 && - other.y4 == this.y4 && - other.boxScore == this.boxScore && - other.textScore == this.textScore && - other.recognizedText == this.recognizedText && - other.isVisible == this.isVisible); -} - -class AssetOcrEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value x1; - final Value y1; - final Value x2; - final Value y2; - final Value x3; - final Value y3; - final Value x4; - final Value y4; - final Value boxScore; - final Value textScore; - final Value recognizedText; - final Value isVisible; - const AssetOcrEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.x1 = const Value.absent(), - this.y1 = const Value.absent(), - this.x2 = const Value.absent(), - this.y2 = const Value.absent(), - this.x3 = const Value.absent(), - this.y3 = const Value.absent(), - this.x4 = const Value.absent(), - this.y4 = const Value.absent(), - this.boxScore = const Value.absent(), - this.textScore = const Value.absent(), - this.recognizedText = const Value.absent(), - this.isVisible = const Value.absent(), - }); - AssetOcrEntityCompanion.insert({ - required String id, - required String assetId, - required double x1, - required double y1, - required double x2, - required double y2, - required double x3, - required double y3, - required double x4, - required double y4, - required double boxScore, - required double textScore, - required String recognizedText, - this.isVisible = const Value.absent(), - }) : id = Value(id), - assetId = Value(assetId), - x1 = Value(x1), - y1 = Value(y1), - x2 = Value(x2), - y2 = Value(y2), - x3 = Value(x3), - y3 = Value(y3), - x4 = Value(x4), - y4 = Value(y4), - boxScore = Value(boxScore), - textScore = Value(textScore), - recognizedText = Value(recognizedText); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? x1, - Expression? y1, - Expression? x2, - Expression? y2, - Expression? x3, - Expression? y3, - Expression? x4, - Expression? y4, - Expression? boxScore, - Expression? textScore, - Expression? recognizedText, - Expression? isVisible, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (x1 != null) 'x1': x1, - if (y1 != null) 'y1': y1, - if (x2 != null) 'x2': x2, - if (y2 != null) 'y2': y2, - if (x3 != null) 'x3': x3, - if (y3 != null) 'y3': y3, - if (x4 != null) 'x4': x4, - if (y4 != null) 'y4': y4, - if (boxScore != null) 'box_score': boxScore, - if (textScore != null) 'text_score': textScore, - if (recognizedText != null) 'recognized_text': recognizedText, - if (isVisible != null) 'is_visible': isVisible, - }); - } - - AssetOcrEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? x1, - Value? y1, - Value? x2, - Value? y2, - Value? x3, - Value? y3, - Value? x4, - Value? y4, - Value? boxScore, - Value? textScore, - Value? recognizedText, - Value? isVisible, - }) { - return AssetOcrEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - x1: x1 ?? this.x1, - y1: y1 ?? this.y1, - x2: x2 ?? this.x2, - y2: y2 ?? this.y2, - x3: x3 ?? this.x3, - y3: y3 ?? this.y3, - x4: x4 ?? this.x4, - y4: y4 ?? this.y4, - boxScore: boxScore ?? this.boxScore, - textScore: textScore ?? this.textScore, - recognizedText: recognizedText ?? this.recognizedText, - isVisible: isVisible ?? this.isVisible, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (x1.present) { - map['x1'] = Variable(x1.value); - } - if (y1.present) { - map['y1'] = Variable(y1.value); - } - if (x2.present) { - map['x2'] = Variable(x2.value); - } - if (y2.present) { - map['y2'] = Variable(y2.value); - } - if (x3.present) { - map['x3'] = Variable(x3.value); - } - if (y3.present) { - map['y3'] = Variable(y3.value); - } - if (x4.present) { - map['x4'] = Variable(x4.value); - } - if (y4.present) { - map['y4'] = Variable(y4.value); - } - if (boxScore.present) { - map['box_score'] = Variable(boxScore.value); - } - if (textScore.present) { - map['text_score'] = Variable(textScore.value); - } - if (recognizedText.present) { - map['recognized_text'] = Variable(recognizedText.value); - } - if (isVisible.present) { - map['is_visible'] = Variable(isVisible.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetOcrEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('x1: $x1, ') - ..write('y1: $y1, ') - ..write('x2: $x2, ') - ..write('y2: $y2, ') - ..write('x3: $x3, ') - ..write('y3: $y3, ') - ..write('x4: $x4, ') - ..write('y4: $y4, ') - ..write('boxScore: $boxScore, ') - ..write('textScore: $textScore, ') - ..write('recognizedText: $recognizedText, ') - ..write('isVisible: $isVisible') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV31 extends GeneratedDatabase { - DatabaseAtV31(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAlbumAssetAlbumAsset = Index( - 'idx_local_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)', - ); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxLocalAssetCloudId = Index( - 'idx_local_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)', - ); - late final Index idxLocalAssetCreatedAt = Index( - 'idx_local_asset_created_at', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_created_at ON local_asset_entity (created_at)', - ); - late final Index idxStackPrimaryAssetId = Index( - 'idx_stack_primary_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final Index idxRemoteAssetStackId = Index( - 'idx_remote_asset_stack_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)', - ); - late final Index idxRemoteAssetOwnerVisibilityDeletedCreated = Index( - 'idx_remote_asset_owner_visibility_deleted_created', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_visibility_deleted_created ON remote_asset_entity (owner_id, visibility, deleted_at, created_at DESC)', - ); - late final Index idxRemoteAssetUploaded = Index( - 'idx_remote_asset_uploaded', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_uploaded ON remote_asset_entity (uploaded_at)', - ); - late final AuthUserEntity authUserEntity = AuthUserEntity(this); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity = - RemoteAssetCloudIdEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final TrashedLocalAssetEntity trashedLocalAssetEntity = - TrashedLocalAssetEntity(this); - late final AssetEditEntity assetEditEntity = AssetEditEntity(this); - late final Settings settings = Settings(this); - late final AssetOcrEntity assetOcrEntity = AssetOcrEntity(this); - late final Index idxPartnerSharedWithId = Index( - 'idx_partner_shared_with_id', - 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)', - ); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - late final Index idxRemoteExifCity = Index( - 'idx_remote_exif_city', - 'CREATE INDEX IF NOT EXISTS idx_remote_exif_city ON remote_exif_entity (city) WHERE city IS NOT NULL', - ); - late final Index idxRemoteAlbumAssetAlbumAsset = Index( - 'idx_remote_album_asset_album_asset', - 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)', - ); - late final Index idxRemoteAssetCloudId = Index( - 'idx_remote_asset_cloud_id', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)', - ); - late final Index idxPersonOwnerId = Index( - 'idx_person_owner_id', - 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)', - ); - late final Index idxAssetFacePersonId = Index( - 'idx_asset_face_person_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)', - ); - late final Index idxAssetFaceAssetId = Index( - 'idx_asset_face_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)', - ); - late final Index idxAssetFaceVisiblePerson = Index( - 'idx_asset_face_visible_person', - 'CREATE INDEX IF NOT EXISTS idx_asset_face_visible_person ON asset_face_entity (person_id, asset_id) WHERE is_visible = 1 AND deleted_at IS NULL', - ); - late final Index idxTrashedLocalAssetChecksum = Index( - 'idx_trashed_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', - ); - late final Index idxTrashedLocalAssetAlbum = Index( - 'idx_trashed_local_asset_album', - 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', - ); - late final Index idxAssetEditAssetId = Index( - 'idx_asset_edit_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)', - ); - late final Index idxAssetOcrAssetId = Index( - 'idx_asset_ocr_asset_id', - 'CREATE INDEX IF NOT EXISTS idx_asset_ocr_asset_id ON asset_ocr_entity (asset_id)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAlbumAssetAlbumAsset, - idxLocalAssetChecksum, - idxLocalAssetCloudId, - idxLocalAssetCreatedAt, - idxStackPrimaryAssetId, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - idxRemoteAssetStackId, - idxRemoteAssetOwnerVisibilityDeletedCreated, - idxRemoteAssetUploaded, - authUserEntity, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - remoteAssetCloudIdEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - trashedLocalAssetEntity, - assetEditEntity, - settings, - assetOcrEntity, - idxPartnerSharedWithId, - idxLatLng, - idxRemoteExifCity, - idxRemoteAlbumAssetAlbumAsset, - idxRemoteAssetCloudId, - idxPersonOwnerId, - idxAssetFacePersonId, - idxAssetFaceAssetId, - idxAssetFaceVisiblePerson, - idxTrashedLocalAssetChecksum, - idxTrashedLocalAssetAlbum, - idxAssetEditAssetId, - idxAssetOcrAssetId, - ]; - @override - StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('stack_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('local_album_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'local_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('local_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('partner_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_album_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_album_user_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [ - TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete), - ], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'memory_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'user_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('person_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'person_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)], - ), - WritePropagation( - on: TableUpdateQuery.onTableName( - 'remote_asset_entity', - limitUpdateKind: UpdateKind.delete, - ), - result: [TableUpdate('asset_ocr_entity', kind: UpdateKind.delete)], - ), - ]); - @override - int get schemaVersion => 31; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v4.dart b/mobile/test/drift/main/generated/schema_v4.dart deleted file mode 100644 index 8321f23a0d..0000000000 --- a/mobile/test/drift/main/generated/schema_v4.dart +++ /dev/null @@ -1,6444 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn profileImagePath = GeneratedColumn( - 'profile_image_path', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( - 'quota_size_in_bytes', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( - 'quota_usage_in_bytes', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - profileImagePath: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}profile_image_path'], - ), - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - quotaSizeInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_size_in_bytes'], - ), - quotaUsageInBytes: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}quota_usage_in_bytes'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final bool isAdmin; - final String email; - final String? profileImagePath; - final DateTime updatedAt; - final int? quotaSizeInBytes; - final int quotaUsageInBytes; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - this.profileImagePath, - required this.updatedAt, - this.quotaSizeInBytes, - required this.quotaUsageInBytes, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - if (!nullToAbsent || profileImagePath != null) { - map['profile_image_path'] = Variable(profileImagePath); - } - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || quotaSizeInBytes != null) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); - } - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - profileImagePath: serializer.fromJson(json['profileImagePath']), - updatedAt: serializer.fromJson(json['updatedAt']), - quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), - quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'profileImagePath': serializer.toJson(profileImagePath), - 'updatedAt': serializer.toJson(updatedAt), - 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), - 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - Value profileImagePath = const Value.absent(), - DateTime? updatedAt, - Value quotaSizeInBytes = const Value.absent(), - int? quotaUsageInBytes, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath.present - ? profileImagePath.value - : this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes.present - ? quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - profileImagePath: data.profileImagePath.present - ? data.profileImagePath.value - : this.profileImagePath, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - quotaSizeInBytes: data.quotaSizeInBytes.present - ? data.quotaSizeInBytes.value - : this.quotaSizeInBytes, - quotaUsageInBytes: data.quotaUsageInBytes.present - ? data.quotaUsageInBytes.value - : this.quotaUsageInBytes, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - profileImagePath, - updatedAt, - quotaSizeInBytes, - quotaUsageInBytes, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.profileImagePath == this.profileImagePath && - other.updatedAt == this.updatedAt && - other.quotaSizeInBytes == this.quotaSizeInBytes && - other.quotaUsageInBytes == this.quotaUsageInBytes); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value profileImagePath; - final Value updatedAt; - final Value quotaSizeInBytes; - final Value quotaUsageInBytes; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.profileImagePath = const Value.absent(), - this.updatedAt = const Value.absent(), - this.quotaSizeInBytes = const Value.absent(), - this.quotaUsageInBytes = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? profileImagePath, - Expression? updatedAt, - Expression? quotaSizeInBytes, - Expression? quotaUsageInBytes, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (profileImagePath != null) 'profile_image_path': profileImagePath, - if (updatedAt != null) 'updated_at': updatedAt, - if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, - if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? profileImagePath, - Value? updatedAt, - Value? quotaSizeInBytes, - Value? quotaUsageInBytes, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - profileImagePath: profileImagePath ?? this.profileImagePath, - updatedAt: updatedAt ?? this.updatedAt, - quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, - quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (profileImagePath.present) { - map['profile_image_path'] = Variable(profileImagePath.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (quotaSizeInBytes.present) { - map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); - } - if (quotaUsageInBytes.present) { - map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('profileImagePath: $profileImagePath, ') - ..write('updatedAt: $updatedAt, ') - ..write('quotaSizeInBytes: $quotaSizeInBytes, ') - ..write('quotaUsageInBytes: $quotaUsageInBytes') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV4 extends GeneratedDatabase { - DatabaseAtV4(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - ]; - @override - int get schemaVersion => 4; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v5.dart b/mobile/test/drift/main/generated/schema_v5.dart deleted file mode 100644 index e9f276c6bc..0000000000 --- a/mobile/test/drift/main/generated/schema_v5.dart +++ /dev/null @@ -1,6405 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV5 extends GeneratedDatabase { - DatabaseAtV5(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index uQRemoteAssetOwnerChecksum = Index( - 'UQ_remote_asset_owner_checksum', - 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - uQRemoteAssetOwnerChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - ]; - @override - int get schemaVersion => 5; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v6.dart b/mobile/test/drift/main/generated/schema_v6.dart deleted file mode 100644 index 0a3fe51fb9..0000000000 --- a/mobile/test/drift/main/generated/schema_v6.dart +++ /dev/null @@ -1,6451 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV6 extends GeneratedDatabase { - DatabaseAtV6(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - ]; - @override - int get schemaVersion => 6; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v7.dart b/mobile/test/drift/main/generated/schema_v7.dart deleted file mode 100644 index e08c1ca445..0000000000 --- a/mobile/test/drift/main/generated/schema_v7.dart +++ /dev/null @@ -1,6456 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV7 extends GeneratedDatabase { - DatabaseAtV7(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - idxLatLng, - ]; - @override - int get schemaVersion => 7; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v8.dart b/mobile/test/drift/main/generated/schema_v8.dart deleted file mode 100644 index 55a9d3ef4f..0000000000 --- a/mobile/test/drift/main/generated/schema_v8.dart +++ /dev/null @@ -1,6666 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV8 extends GeneratedDatabase { - DatabaseAtV8(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - idxLatLng, - ]; - @override - int get schemaVersion => 8; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} diff --git a/mobile/test/drift/main/generated/schema_v9.dart b/mobile/test/drift/main/generated/schema_v9.dart deleted file mode 100644 index f09db1a378..0000000000 --- a/mobile/test/drift/main/generated/schema_v9.dart +++ /dev/null @@ -1,6715 +0,0 @@ -// dart format width=80 -import 'dart:typed_data' as i2; -// GENERATED BY drift_dev, DO NOT MODIFY. -// ignore_for_file: type=lint,unused_import -// -import 'package:drift/drift.dart'; - -class UserEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isAdmin = GeneratedColumn( - 'is_admin', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_admin" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn email = GeneratedColumn( - 'email', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn hasProfileImage = GeneratedColumn( - 'has_profile_image', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("has_profile_image" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn profileChangedAt = - GeneratedColumn( - 'profile_changed_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - @override - List get $columns => [ - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_entity'; - @override - Set get $primaryKey => {id}; - @override - UserEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - isAdmin: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_admin'], - )!, - email: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}email'], - )!, - hasProfileImage: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}has_profile_image'], - )!, - profileChangedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}profile_changed_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ); - } - - @override - UserEntity createAlias(String alias) { - return UserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserEntityData extends DataClass implements Insertable { - final String id; - final String name; - final bool isAdmin; - final String email; - final bool hasProfileImage; - final DateTime profileChangedAt; - final DateTime updatedAt; - const UserEntityData({ - required this.id, - required this.name, - required this.isAdmin, - required this.email, - required this.hasProfileImage, - required this.profileChangedAt, - required this.updatedAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['is_admin'] = Variable(isAdmin); - map['email'] = Variable(email); - map['has_profile_image'] = Variable(hasProfileImage); - map['profile_changed_at'] = Variable(profileChangedAt); - map['updated_at'] = Variable(updatedAt); - return map; - } - - factory UserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - isAdmin: serializer.fromJson(json['isAdmin']), - email: serializer.fromJson(json['email']), - hasProfileImage: serializer.fromJson(json['hasProfileImage']), - profileChangedAt: serializer.fromJson(json['profileChangedAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'isAdmin': serializer.toJson(isAdmin), - 'email': serializer.toJson(email), - 'hasProfileImage': serializer.toJson(hasProfileImage), - 'profileChangedAt': serializer.toJson(profileChangedAt), - 'updatedAt': serializer.toJson(updatedAt), - }; - } - - UserEntityData copyWith({ - String? id, - String? name, - bool? isAdmin, - String? email, - bool? hasProfileImage, - DateTime? profileChangedAt, - DateTime? updatedAt, - }) => UserEntityData( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - UserEntityData copyWithCompanion(UserEntityCompanion data) { - return UserEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, - email: data.email.present ? data.email.value : this.email, - hasProfileImage: data.hasProfileImage.present - ? data.hasProfileImage.value - : this.hasProfileImage, - profileChangedAt: data.profileChangedAt.present - ? data.profileChangedAt.value - : this.profileChangedAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ); - } - - @override - String toString() { - return (StringBuffer('UserEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - isAdmin, - email, - hasProfileImage, - profileChangedAt, - updatedAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserEntityData && - other.id == this.id && - other.name == this.name && - other.isAdmin == this.isAdmin && - other.email == this.email && - other.hasProfileImage == this.hasProfileImage && - other.profileChangedAt == this.profileChangedAt && - other.updatedAt == this.updatedAt); -} - -class UserEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value isAdmin; - final Value email; - final Value hasProfileImage; - final Value profileChangedAt; - final Value updatedAt; - const UserEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.isAdmin = const Value.absent(), - this.email = const Value.absent(), - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }); - UserEntityCompanion.insert({ - required String id, - required String name, - this.isAdmin = const Value.absent(), - required String email, - this.hasProfileImage = const Value.absent(), - this.profileChangedAt = const Value.absent(), - this.updatedAt = const Value.absent(), - }) : id = Value(id), - name = Value(name), - email = Value(email); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? isAdmin, - Expression? email, - Expression? hasProfileImage, - Expression? profileChangedAt, - Expression? updatedAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (isAdmin != null) 'is_admin': isAdmin, - if (email != null) 'email': email, - if (hasProfileImage != null) 'has_profile_image': hasProfileImage, - if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, - if (updatedAt != null) 'updated_at': updatedAt, - }); - } - - UserEntityCompanion copyWith({ - Value? id, - Value? name, - Value? isAdmin, - Value? email, - Value? hasProfileImage, - Value? profileChangedAt, - Value? updatedAt, - }) { - return UserEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - isAdmin: isAdmin ?? this.isAdmin, - email: email ?? this.email, - hasProfileImage: hasProfileImage ?? this.hasProfileImage, - profileChangedAt: profileChangedAt ?? this.profileChangedAt, - updatedAt: updatedAt ?? this.updatedAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (isAdmin.present) { - map['is_admin'] = Variable(isAdmin.value); - } - if (email.present) { - map['email'] = Variable(email.value); - } - if (hasProfileImage.present) { - map['has_profile_image'] = Variable(hasProfileImage.value); - } - if (profileChangedAt.present) { - map['profile_changed_at'] = Variable(profileChangedAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('isAdmin: $isAdmin, ') - ..write('email: $email, ') - ..write('hasProfileImage: $hasProfileImage, ') - ..write('profileChangedAt: $profileChangedAt, ') - ..write('updatedAt: $updatedAt') - ..write(')')) - .toString(); - } -} - -class RemoteAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn localDateTime = - GeneratedColumn( - 'local_date_time', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn thumbHash = GeneratedColumn( - 'thumb_hash', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn livePhotoVideoId = GeneratedColumn( - 'live_photo_video_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn visibility = GeneratedColumn( - 'visibility', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stackId = GeneratedColumn( - 'stack_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn libraryId = GeneratedColumn( - 'library_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - )!, - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - localDateTime: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}local_date_time'], - ), - thumbHash: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumb_hash'], - ), - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - livePhotoVideoId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}live_photo_video_id'], - ), - visibility: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}visibility'], - )!, - stackId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}stack_id'], - ), - libraryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}library_id'], - ), - ); - } - - @override - RemoteAssetEntity createAlias(String alias) { - return RemoteAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String checksum; - final bool isFavorite; - final String ownerId; - final DateTime? localDateTime; - final String? thumbHash; - final DateTime? deletedAt; - final String? livePhotoVideoId; - final int visibility; - final String? stackId; - final String? libraryId; - const RemoteAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - required this.checksum, - required this.isFavorite, - required this.ownerId, - this.localDateTime, - this.thumbHash, - this.deletedAt, - this.livePhotoVideoId, - required this.visibility, - this.stackId, - this.libraryId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - map['checksum'] = Variable(checksum); - map['is_favorite'] = Variable(isFavorite); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || localDateTime != null) { - map['local_date_time'] = Variable(localDateTime); - } - if (!nullToAbsent || thumbHash != null) { - map['thumb_hash'] = Variable(thumbHash); - } - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - if (!nullToAbsent || livePhotoVideoId != null) { - map['live_photo_video_id'] = Variable(livePhotoVideoId); - } - map['visibility'] = Variable(visibility); - if (!nullToAbsent || stackId != null) { - map['stack_id'] = Variable(stackId); - } - if (!nullToAbsent || libraryId != null) { - map['library_id'] = Variable(libraryId); - } - return map; - } - - factory RemoteAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - ownerId: serializer.fromJson(json['ownerId']), - localDateTime: serializer.fromJson(json['localDateTime']), - thumbHash: serializer.fromJson(json['thumbHash']), - deletedAt: serializer.fromJson(json['deletedAt']), - livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), - visibility: serializer.fromJson(json['visibility']), - stackId: serializer.fromJson(json['stackId']), - libraryId: serializer.fromJson(json['libraryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'ownerId': serializer.toJson(ownerId), - 'localDateTime': serializer.toJson(localDateTime), - 'thumbHash': serializer.toJson(thumbHash), - 'deletedAt': serializer.toJson(deletedAt), - 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), - 'visibility': serializer.toJson(visibility), - 'stackId': serializer.toJson(stackId), - 'libraryId': serializer.toJson(libraryId), - }; - } - - RemoteAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - String? checksum, - bool? isFavorite, - String? ownerId, - Value localDateTime = const Value.absent(), - Value thumbHash = const Value.absent(), - Value deletedAt = const Value.absent(), - Value livePhotoVideoId = const Value.absent(), - int? visibility, - Value stackId = const Value.absent(), - Value libraryId = const Value.absent(), - }) => RemoteAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime.present - ? localDateTime.value - : this.localDateTime, - thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - livePhotoVideoId: livePhotoVideoId.present - ? livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId.present ? stackId.value : this.stackId, - libraryId: libraryId.present ? libraryId.value : this.libraryId, - ); - RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { - return RemoteAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - localDateTime: data.localDateTime.present - ? data.localDateTime.value - : this.localDateTime, - thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - livePhotoVideoId: data.livePhotoVideoId.present - ? data.livePhotoVideoId.value - : this.livePhotoVideoId, - visibility: data.visibility.present - ? data.visibility.value - : this.visibility, - stackId: data.stackId.present ? data.stackId.value : this.stackId, - libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - ownerId, - localDateTime, - thumbHash, - deletedAt, - livePhotoVideoId, - visibility, - stackId, - libraryId, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.ownerId == this.ownerId && - other.localDateTime == this.localDateTime && - other.thumbHash == this.thumbHash && - other.deletedAt == this.deletedAt && - other.livePhotoVideoId == this.livePhotoVideoId && - other.visibility == this.visibility && - other.stackId == this.stackId && - other.libraryId == this.libraryId); -} - -class RemoteAssetEntityCompanion - extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value ownerId; - final Value localDateTime; - final Value thumbHash; - final Value deletedAt; - final Value livePhotoVideoId; - final Value visibility; - final Value stackId; - final Value libraryId; - const RemoteAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.ownerId = const Value.absent(), - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - this.visibility = const Value.absent(), - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }); - RemoteAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - required String checksum, - this.isFavorite = const Value.absent(), - required String ownerId, - this.localDateTime = const Value.absent(), - this.thumbHash = const Value.absent(), - this.deletedAt = const Value.absent(), - this.livePhotoVideoId = const Value.absent(), - required int visibility, - this.stackId = const Value.absent(), - this.libraryId = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id), - checksum = Value(checksum), - ownerId = Value(ownerId), - visibility = Value(visibility); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? ownerId, - Expression? localDateTime, - Expression? thumbHash, - Expression? deletedAt, - Expression? livePhotoVideoId, - Expression? visibility, - Expression? stackId, - Expression? libraryId, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (ownerId != null) 'owner_id': ownerId, - if (localDateTime != null) 'local_date_time': localDateTime, - if (thumbHash != null) 'thumb_hash': thumbHash, - if (deletedAt != null) 'deleted_at': deletedAt, - if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, - if (visibility != null) 'visibility': visibility, - if (stackId != null) 'stack_id': stackId, - if (libraryId != null) 'library_id': libraryId, - }); - } - - RemoteAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? ownerId, - Value? localDateTime, - Value? thumbHash, - Value? deletedAt, - Value? livePhotoVideoId, - Value? visibility, - Value? stackId, - Value? libraryId, - }) { - return RemoteAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - ownerId: ownerId ?? this.ownerId, - localDateTime: localDateTime ?? this.localDateTime, - thumbHash: thumbHash ?? this.thumbHash, - deletedAt: deletedAt ?? this.deletedAt, - livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, - visibility: visibility ?? this.visibility, - stackId: stackId ?? this.stackId, - libraryId: libraryId ?? this.libraryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (localDateTime.present) { - map['local_date_time'] = Variable(localDateTime.value); - } - if (thumbHash.present) { - map['thumb_hash'] = Variable(thumbHash.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (livePhotoVideoId.present) { - map['live_photo_video_id'] = Variable(livePhotoVideoId.value); - } - if (visibility.present) { - map['visibility'] = Variable(visibility.value); - } - if (stackId.present) { - map['stack_id'] = Variable(stackId.value); - } - if (libraryId.present) { - map['library_id'] = Variable(libraryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('ownerId: $ownerId, ') - ..write('localDateTime: $localDateTime, ') - ..write('thumbHash: $thumbHash, ') - ..write('deletedAt: $deletedAt, ') - ..write('livePhotoVideoId: $livePhotoVideoId, ') - ..write('visibility: $visibility, ') - ..write('stackId: $stackId, ') - ..write('libraryId: $libraryId') - ..write(')')) - .toString(); - } -} - -class StackEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StackEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn primaryAssetId = GeneratedColumn( - 'primary_asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - primaryAssetId, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'stack_entity'; - @override - Set get $primaryKey => {id}; - @override - StackEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StackEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - primaryAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}primary_asset_id'], - )!, - ); - } - - @override - StackEntity createAlias(String alias) { - return StackEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StackEntityData extends DataClass implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String primaryAssetId; - const StackEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.primaryAssetId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['primary_asset_id'] = Variable(primaryAssetId); - return map; - } - - factory StackEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StackEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - primaryAssetId: serializer.fromJson(json['primaryAssetId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'primaryAssetId': serializer.toJson(primaryAssetId), - }; - } - - StackEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? primaryAssetId, - }) => StackEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - StackEntityData copyWithCompanion(StackEntityCompanion data) { - return StackEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - primaryAssetId: data.primaryAssetId.present - ? data.primaryAssetId.value - : this.primaryAssetId, - ); - } - - @override - String toString() { - return (StringBuffer('StackEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => - Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StackEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.primaryAssetId == this.primaryAssetId); -} - -class StackEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value primaryAssetId; - const StackEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.primaryAssetId = const Value.absent(), - }); - StackEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String primaryAssetId, - }) : id = Value(id), - ownerId = Value(ownerId), - primaryAssetId = Value(primaryAssetId); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? primaryAssetId, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, - }); - } - - StackEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? primaryAssetId, - }) { - return StackEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - primaryAssetId: primaryAssetId ?? this.primaryAssetId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (primaryAssetId.present) { - map['primary_asset_id'] = Variable(primaryAssetId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StackEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('primaryAssetId: $primaryAssetId') - ..write(')')) - .toString(); - } -} - -class LocalAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn durationInSeconds = GeneratedColumn( - 'duration_in_seconds', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn checksum = GeneratedColumn( - 'checksum', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: false, - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [ - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_asset_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAssetEntityData( - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - durationInSeconds: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}duration_in_seconds'], - ), - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - checksum: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}checksum'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}orientation'], - )!, - ); - } - - @override - LocalAssetEntity createAlias(String alias) { - return LocalAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAssetEntityData extends DataClass - implements Insertable { - final String name; - final int type; - final DateTime createdAt; - final DateTime updatedAt; - final int? width; - final int? height; - final int? durationInSeconds; - final String id; - final String? checksum; - final bool isFavorite; - final int orientation; - const LocalAssetEntityData({ - required this.name, - required this.type, - required this.createdAt, - required this.updatedAt, - this.width, - this.height, - this.durationInSeconds, - required this.id, - this.checksum, - required this.isFavorite, - required this.orientation, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['name'] = Variable(name); - map['type'] = Variable(type); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || durationInSeconds != null) { - map['duration_in_seconds'] = Variable(durationInSeconds); - } - map['id'] = Variable(id); - if (!nullToAbsent || checksum != null) { - map['checksum'] = Variable(checksum); - } - map['is_favorite'] = Variable(isFavorite); - map['orientation'] = Variable(orientation); - return map; - } - - factory LocalAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAssetEntityData( - name: serializer.fromJson(json['name']), - type: serializer.fromJson(json['type']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - width: serializer.fromJson(json['width']), - height: serializer.fromJson(json['height']), - durationInSeconds: serializer.fromJson(json['durationInSeconds']), - id: serializer.fromJson(json['id']), - checksum: serializer.fromJson(json['checksum']), - isFavorite: serializer.fromJson(json['isFavorite']), - orientation: serializer.fromJson(json['orientation']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'name': serializer.toJson(name), - 'type': serializer.toJson(type), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'width': serializer.toJson(width), - 'height': serializer.toJson(height), - 'durationInSeconds': serializer.toJson(durationInSeconds), - 'id': serializer.toJson(id), - 'checksum': serializer.toJson(checksum), - 'isFavorite': serializer.toJson(isFavorite), - 'orientation': serializer.toJson(orientation), - }; - } - - LocalAssetEntityData copyWith({ - String? name, - int? type, - DateTime? createdAt, - DateTime? updatedAt, - Value width = const Value.absent(), - Value height = const Value.absent(), - Value durationInSeconds = const Value.absent(), - String? id, - Value checksum = const Value.absent(), - bool? isFavorite, - int? orientation, - }) => LocalAssetEntityData( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width.present ? width.value : this.width, - height: height.present ? height.value : this.height, - durationInSeconds: durationInSeconds.present - ? durationInSeconds.value - : this.durationInSeconds, - id: id ?? this.id, - checksum: checksum.present ? checksum.value : this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { - return LocalAssetEntityData( - name: data.name.present ? data.name.value : this.name, - type: data.type.present ? data.type.value : this.type, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - width: data.width.present ? data.width.value : this.width, - height: data.height.present ? data.height.value : this.height, - durationInSeconds: data.durationInSeconds.present - ? data.durationInSeconds.value - : this.durationInSeconds, - id: data.id.present ? data.id.value : this.id, - checksum: data.checksum.present ? data.checksum.value : this.checksum, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityData(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - name, - type, - createdAt, - updatedAt, - width, - height, - durationInSeconds, - id, - checksum, - isFavorite, - orientation, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAssetEntityData && - other.name == this.name && - other.type == this.type && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.width == this.width && - other.height == this.height && - other.durationInSeconds == this.durationInSeconds && - other.id == this.id && - other.checksum == this.checksum && - other.isFavorite == this.isFavorite && - other.orientation == this.orientation); -} - -class LocalAssetEntityCompanion extends UpdateCompanion { - final Value name; - final Value type; - final Value createdAt; - final Value updatedAt; - final Value width; - final Value height; - final Value durationInSeconds; - final Value id; - final Value checksum; - final Value isFavorite; - final Value orientation; - const LocalAssetEntityCompanion({ - this.name = const Value.absent(), - this.type = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - this.id = const Value.absent(), - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }); - LocalAssetEntityCompanion.insert({ - required String name, - required int type, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.width = const Value.absent(), - this.height = const Value.absent(), - this.durationInSeconds = const Value.absent(), - required String id, - this.checksum = const Value.absent(), - this.isFavorite = const Value.absent(), - this.orientation = const Value.absent(), - }) : name = Value(name), - type = Value(type), - id = Value(id); - static Insertable custom({ - Expression? name, - Expression? type, - Expression? createdAt, - Expression? updatedAt, - Expression? width, - Expression? height, - Expression? durationInSeconds, - Expression? id, - Expression? checksum, - Expression? isFavorite, - Expression? orientation, - }) { - return RawValuesInsertable({ - if (name != null) 'name': name, - if (type != null) 'type': type, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, - if (id != null) 'id': id, - if (checksum != null) 'checksum': checksum, - if (isFavorite != null) 'is_favorite': isFavorite, - if (orientation != null) 'orientation': orientation, - }); - } - - LocalAssetEntityCompanion copyWith({ - Value? name, - Value? type, - Value? createdAt, - Value? updatedAt, - Value? width, - Value? height, - Value? durationInSeconds, - Value? id, - Value? checksum, - Value? isFavorite, - Value? orientation, - }) { - return LocalAssetEntityCompanion( - name: name ?? this.name, - type: type ?? this.type, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - width: width ?? this.width, - height: height ?? this.height, - durationInSeconds: durationInSeconds ?? this.durationInSeconds, - id: id ?? this.id, - checksum: checksum ?? this.checksum, - isFavorite: isFavorite ?? this.isFavorite, - orientation: orientation ?? this.orientation, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (name.present) { - map['name'] = Variable(name.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (durationInSeconds.present) { - map['duration_in_seconds'] = Variable(durationInSeconds.value); - } - if (id.present) { - map['id'] = Variable(id.value); - } - if (checksum.present) { - map['checksum'] = Variable(checksum.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAssetEntityCompanion(') - ..write('name: $name, ') - ..write('type: $type, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('width: $width, ') - ..write('height: $height, ') - ..write('durationInSeconds: $durationInSeconds, ') - ..write('id: $id, ') - ..write('checksum: $checksum, ') - ..write('isFavorite: $isFavorite, ') - ..write('orientation: $orientation') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultValue: const CustomExpression('\'\''), - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn thumbnailAssetId = GeneratedColumn( - 'thumbnail_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn isActivityEnabled = GeneratedColumn( - 'is_activity_enabled', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_activity_enabled" IN (0, 1))', - ), - defaultValue: const CustomExpression('1'), - ); - late final GeneratedColumn order = GeneratedColumn( - 'order', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_entity'; - @override - Set get $primaryKey => {id}; - @override - RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - thumbnailAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}thumbnail_asset_id'], - ), - isActivityEnabled: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_activity_enabled'], - )!, - order: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}order'], - )!, - ); - } - - @override - RemoteAlbumEntity createAlias(String alias) { - return RemoteAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final String description; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String? thumbnailAssetId; - final bool isActivityEnabled; - final int order; - const RemoteAlbumEntityData({ - required this.id, - required this.name, - required this.description, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - this.thumbnailAssetId, - required this.isActivityEnabled, - required this.order, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['description'] = Variable(description); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - if (!nullToAbsent || thumbnailAssetId != null) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId); - } - map['is_activity_enabled'] = Variable(isActivityEnabled); - map['order'] = Variable(order); - return map; - } - - factory RemoteAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - description: serializer.fromJson(json['description']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), - isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), - order: serializer.fromJson(json['order']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'description': serializer.toJson(description), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), - 'isActivityEnabled': serializer.toJson(isActivityEnabled), - 'order': serializer.toJson(order), - }; - } - - RemoteAlbumEntityData copyWith({ - String? id, - String? name, - String? description, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - Value thumbnailAssetId = const Value.absent(), - bool? isActivityEnabled, - int? order, - }) => RemoteAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId.present - ? thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { - return RemoteAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - description: data.description.present - ? data.description.value - : this.description, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - thumbnailAssetId: data.thumbnailAssetId.present - ? data.thumbnailAssetId.value - : this.thumbnailAssetId, - isActivityEnabled: data.isActivityEnabled.present - ? data.isActivityEnabled.value - : this.isActivityEnabled, - order: data.order.present ? data.order.value : this.order, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - description, - createdAt, - updatedAt, - ownerId, - thumbnailAssetId, - isActivityEnabled, - order, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.description == this.description && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.thumbnailAssetId == this.thumbnailAssetId && - other.isActivityEnabled == this.isActivityEnabled && - other.order == this.order); -} - -class RemoteAlbumEntityCompanion - extends UpdateCompanion { - final Value id; - final Value name; - final Value description; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value thumbnailAssetId; - final Value isActivityEnabled; - final Value order; - const RemoteAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - this.order = const Value.absent(), - }); - RemoteAlbumEntityCompanion.insert({ - required String id, - required String name, - this.description = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - this.thumbnailAssetId = const Value.absent(), - this.isActivityEnabled = const Value.absent(), - required int order, - }) : id = Value(id), - name = Value(name), - ownerId = Value(ownerId), - order = Value(order); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? description, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? thumbnailAssetId, - Expression? isActivityEnabled, - Expression? order, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (description != null) 'description': description, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, - if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, - if (order != null) 'order': order, - }); - } - - RemoteAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? description, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? thumbnailAssetId, - Value? isActivityEnabled, - Value? order, - }) { - return RemoteAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - description: description ?? this.description, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, - isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, - order: order ?? this.order, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (thumbnailAssetId.present) { - map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); - } - if (isActivityEnabled.present) { - map['is_activity_enabled'] = Variable(isActivityEnabled.value); - } - if (order.present) { - map['order'] = Variable(order.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('description: $description, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('thumbnailAssetId: $thumbnailAssetId, ') - ..write('isActivityEnabled: $isActivityEnabled, ') - ..write('order: $order') - ..write(')')) - .toString(); - } -} - -class LocalAlbumEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn backupSelection = GeneratedColumn( - 'backup_selection', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( - 'is_ios_shared_album', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_ios_shared_album" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn linkedRemoteAlbumId = - GeneratedColumn( - 'linked_remote_album_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn marker_ = GeneratedColumn( - 'marker', - aliasedName, - true, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("marker" IN (0, 1))', - ), - ); - @override - List get $columns => [ - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_entity'; - @override - Set get $primaryKey => {id}; - @override - LocalAlbumEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - backupSelection: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}backup_selection'], - )!, - isIosSharedAlbum: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_ios_shared_album'], - )!, - linkedRemoteAlbumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}linked_remote_album_id'], - ), - marker_: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}marker'], - ), - ); - } - - @override - LocalAlbumEntity createAlias(String alias) { - return LocalAlbumEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumEntityData extends DataClass - implements Insertable { - final String id; - final String name; - final DateTime updatedAt; - final int backupSelection; - final bool isIosSharedAlbum; - final String? linkedRemoteAlbumId; - final bool? marker_; - const LocalAlbumEntityData({ - required this.id, - required this.name, - required this.updatedAt, - required this.backupSelection, - required this.isIosSharedAlbum, - this.linkedRemoteAlbumId, - this.marker_, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['name'] = Variable(name); - map['updated_at'] = Variable(updatedAt); - map['backup_selection'] = Variable(backupSelection); - map['is_ios_shared_album'] = Variable(isIosSharedAlbum); - if (!nullToAbsent || linkedRemoteAlbumId != null) { - map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); - } - if (!nullToAbsent || marker_ != null) { - map['marker'] = Variable(marker_); - } - return map; - } - - factory LocalAlbumEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumEntityData( - id: serializer.fromJson(json['id']), - name: serializer.fromJson(json['name']), - updatedAt: serializer.fromJson(json['updatedAt']), - backupSelection: serializer.fromJson(json['backupSelection']), - isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), - linkedRemoteAlbumId: serializer.fromJson( - json['linkedRemoteAlbumId'], - ), - marker_: serializer.fromJson(json['marker_']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'name': serializer.toJson(name), - 'updatedAt': serializer.toJson(updatedAt), - 'backupSelection': serializer.toJson(backupSelection), - 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), - 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), - 'marker_': serializer.toJson(marker_), - }; - } - - LocalAlbumEntityData copyWith({ - String? id, - String? name, - DateTime? updatedAt, - int? backupSelection, - bool? isIosSharedAlbum, - Value linkedRemoteAlbumId = const Value.absent(), - Value marker_ = const Value.absent(), - }) => LocalAlbumEntityData( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId.present - ? linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: marker_.present ? marker_.value : this.marker_, - ); - LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { - return LocalAlbumEntityData( - id: data.id.present ? data.id.value : this.id, - name: data.name.present ? data.name.value : this.name, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - backupSelection: data.backupSelection.present - ? data.backupSelection.value - : this.backupSelection, - isIosSharedAlbum: data.isIosSharedAlbum.present - ? data.isIosSharedAlbum.value - : this.isIosSharedAlbum, - linkedRemoteAlbumId: data.linkedRemoteAlbumId.present - ? data.linkedRemoteAlbumId.value - : this.linkedRemoteAlbumId, - marker_: data.marker_.present ? data.marker_.value : this.marker_, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityData(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - name, - updatedAt, - backupSelection, - isIosSharedAlbum, - linkedRemoteAlbumId, - marker_, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumEntityData && - other.id == this.id && - other.name == this.name && - other.updatedAt == this.updatedAt && - other.backupSelection == this.backupSelection && - other.isIosSharedAlbum == this.isIosSharedAlbum && - other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && - other.marker_ == this.marker_); -} - -class LocalAlbumEntityCompanion extends UpdateCompanion { - final Value id; - final Value name; - final Value updatedAt; - final Value backupSelection; - final Value isIosSharedAlbum; - final Value linkedRemoteAlbumId; - final Value marker_; - const LocalAlbumEntityCompanion({ - this.id = const Value.absent(), - this.name = const Value.absent(), - this.updatedAt = const Value.absent(), - this.backupSelection = const Value.absent(), - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }); - LocalAlbumEntityCompanion.insert({ - required String id, - required String name, - this.updatedAt = const Value.absent(), - required int backupSelection, - this.isIosSharedAlbum = const Value.absent(), - this.linkedRemoteAlbumId = const Value.absent(), - this.marker_ = const Value.absent(), - }) : id = Value(id), - name = Value(name), - backupSelection = Value(backupSelection); - static Insertable custom({ - Expression? id, - Expression? name, - Expression? updatedAt, - Expression? backupSelection, - Expression? isIosSharedAlbum, - Expression? linkedRemoteAlbumId, - Expression? marker_, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (name != null) 'name': name, - if (updatedAt != null) 'updated_at': updatedAt, - if (backupSelection != null) 'backup_selection': backupSelection, - if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, - if (linkedRemoteAlbumId != null) - 'linked_remote_album_id': linkedRemoteAlbumId, - if (marker_ != null) 'marker': marker_, - }); - } - - LocalAlbumEntityCompanion copyWith({ - Value? id, - Value? name, - Value? updatedAt, - Value? backupSelection, - Value? isIosSharedAlbum, - Value? linkedRemoteAlbumId, - Value? marker_, - }) { - return LocalAlbumEntityCompanion( - id: id ?? this.id, - name: name ?? this.name, - updatedAt: updatedAt ?? this.updatedAt, - backupSelection: backupSelection ?? this.backupSelection, - isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, - linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, - marker_: marker_ ?? this.marker_, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (backupSelection.present) { - map['backup_selection'] = Variable(backupSelection.value); - } - if (isIosSharedAlbum.present) { - map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); - } - if (linkedRemoteAlbumId.present) { - map['linked_remote_album_id'] = Variable( - linkedRemoteAlbumId.value, - ); - } - if (marker_.present) { - map['marker'] = Variable(marker_.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumEntityCompanion(') - ..write('id: $id, ') - ..write('name: $name, ') - ..write('updatedAt: $updatedAt, ') - ..write('backupSelection: $backupSelection, ') - ..write('isIosSharedAlbum: $isIosSharedAlbum, ') - ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') - ..write('marker_: $marker_') - ..write(')')) - .toString(); - } -} - -class LocalAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES local_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'local_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - LocalAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return LocalAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - LocalAlbumAssetEntity createAlias(String alias) { - return LocalAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class LocalAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const LocalAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory LocalAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return LocalAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - LocalAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - LocalAlbumAssetEntityData copyWithCompanion( - LocalAlbumAssetEntityCompanion data, - ) { - return LocalAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is LocalAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class LocalAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const LocalAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - LocalAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - LocalAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return LocalAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('LocalAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class UserMetadataEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - UserMetadataEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn key = GeneratedColumn( - 'key', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn value = - GeneratedColumn( - 'value', - aliasedName, - false, - type: DriftSqlType.blob, - requiredDuringInsert: true, - ); - @override - List get $columns => [userId, key, value]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'user_metadata_entity'; - @override - Set get $primaryKey => {userId, key}; - @override - UserMetadataEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return UserMetadataEntityData( - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - key: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}key'], - )!, - value: attachedDatabase.typeMapping.read( - DriftSqlType.blob, - data['${effectivePrefix}value'], - )!, - ); - } - - @override - UserMetadataEntity createAlias(String alias) { - return UserMetadataEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class UserMetadataEntityData extends DataClass - implements Insertable { - final String userId; - final int key; - final i2.Uint8List value; - const UserMetadataEntityData({ - required this.userId, - required this.key, - required this.value, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['user_id'] = Variable(userId); - map['key'] = Variable(key); - map['value'] = Variable(value); - return map; - } - - factory UserMetadataEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return UserMetadataEntityData( - userId: serializer.fromJson(json['userId']), - key: serializer.fromJson(json['key']), - value: serializer.fromJson(json['value']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'userId': serializer.toJson(userId), - 'key': serializer.toJson(key), - 'value': serializer.toJson(value), - }; - } - - UserMetadataEntityData copyWith({ - String? userId, - int? key, - i2.Uint8List? value, - }) => UserMetadataEntityData( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { - return UserMetadataEntityData( - userId: data.userId.present ? data.userId.value : this.userId, - key: data.key.present ? data.key.value : this.key, - value: data.value.present ? data.value.value : this.value, - ); - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityData(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is UserMetadataEntityData && - other.userId == this.userId && - other.key == this.key && - $driftBlobEquality.equals(other.value, this.value)); -} - -class UserMetadataEntityCompanion - extends UpdateCompanion { - final Value userId; - final Value key; - final Value value; - const UserMetadataEntityCompanion({ - this.userId = const Value.absent(), - this.key = const Value.absent(), - this.value = const Value.absent(), - }); - UserMetadataEntityCompanion.insert({ - required String userId, - required int key, - required i2.Uint8List value, - }) : userId = Value(userId), - key = Value(key), - value = Value(value); - static Insertable custom({ - Expression? userId, - Expression? key, - Expression? value, - }) { - return RawValuesInsertable({ - if (userId != null) 'user_id': userId, - if (key != null) 'key': key, - if (value != null) 'value': value, - }); - } - - UserMetadataEntityCompanion copyWith({ - Value? userId, - Value? key, - Value? value, - }) { - return UserMetadataEntityCompanion( - userId: userId ?? this.userId, - key: key ?? this.key, - value: value ?? this.value, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (key.present) { - map['key'] = Variable(key.value); - } - if (value.present) { - map['value'] = Variable(value.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('UserMetadataEntityCompanion(') - ..write('userId: $userId, ') - ..write('key: $key, ') - ..write('value: $value') - ..write(')')) - .toString(); - } -} - -class PartnerEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PartnerEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn sharedById = GeneratedColumn( - 'shared_by_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn sharedWithId = GeneratedColumn( - 'shared_with_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn inTimeline = GeneratedColumn( - 'in_timeline', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("in_timeline" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - @override - List get $columns => [sharedById, sharedWithId, inTimeline]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'partner_entity'; - @override - Set get $primaryKey => {sharedById, sharedWithId}; - @override - PartnerEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PartnerEntityData( - sharedById: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_by_id'], - )!, - sharedWithId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}shared_with_id'], - )!, - inTimeline: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}in_timeline'], - )!, - ); - } - - @override - PartnerEntity createAlias(String alias) { - return PartnerEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PartnerEntityData extends DataClass - implements Insertable { - final String sharedById; - final String sharedWithId; - final bool inTimeline; - const PartnerEntityData({ - required this.sharedById, - required this.sharedWithId, - required this.inTimeline, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['shared_by_id'] = Variable(sharedById); - map['shared_with_id'] = Variable(sharedWithId); - map['in_timeline'] = Variable(inTimeline); - return map; - } - - factory PartnerEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PartnerEntityData( - sharedById: serializer.fromJson(json['sharedById']), - sharedWithId: serializer.fromJson(json['sharedWithId']), - inTimeline: serializer.fromJson(json['inTimeline']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'sharedById': serializer.toJson(sharedById), - 'sharedWithId': serializer.toJson(sharedWithId), - 'inTimeline': serializer.toJson(inTimeline), - }; - } - - PartnerEntityData copyWith({ - String? sharedById, - String? sharedWithId, - bool? inTimeline, - }) => PartnerEntityData( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { - return PartnerEntityData( - sharedById: data.sharedById.present - ? data.sharedById.value - : this.sharedById, - sharedWithId: data.sharedWithId.present - ? data.sharedWithId.value - : this.sharedWithId, - inTimeline: data.inTimeline.present - ? data.inTimeline.value - : this.inTimeline, - ); - } - - @override - String toString() { - return (StringBuffer('PartnerEntityData(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PartnerEntityData && - other.sharedById == this.sharedById && - other.sharedWithId == this.sharedWithId && - other.inTimeline == this.inTimeline); -} - -class PartnerEntityCompanion extends UpdateCompanion { - final Value sharedById; - final Value sharedWithId; - final Value inTimeline; - const PartnerEntityCompanion({ - this.sharedById = const Value.absent(), - this.sharedWithId = const Value.absent(), - this.inTimeline = const Value.absent(), - }); - PartnerEntityCompanion.insert({ - required String sharedById, - required String sharedWithId, - this.inTimeline = const Value.absent(), - }) : sharedById = Value(sharedById), - sharedWithId = Value(sharedWithId); - static Insertable custom({ - Expression? sharedById, - Expression? sharedWithId, - Expression? inTimeline, - }) { - return RawValuesInsertable({ - if (sharedById != null) 'shared_by_id': sharedById, - if (sharedWithId != null) 'shared_with_id': sharedWithId, - if (inTimeline != null) 'in_timeline': inTimeline, - }); - } - - PartnerEntityCompanion copyWith({ - Value? sharedById, - Value? sharedWithId, - Value? inTimeline, - }) { - return PartnerEntityCompanion( - sharedById: sharedById ?? this.sharedById, - sharedWithId: sharedWithId ?? this.sharedWithId, - inTimeline: inTimeline ?? this.inTimeline, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (sharedById.present) { - map['shared_by_id'] = Variable(sharedById.value); - } - if (sharedWithId.present) { - map['shared_with_id'] = Variable(sharedWithId.value); - } - if (inTimeline.present) { - map['in_timeline'] = Variable(inTimeline.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PartnerEntityCompanion(') - ..write('sharedById: $sharedById, ') - ..write('sharedWithId: $sharedWithId, ') - ..write('inTimeline: $inTimeline') - ..write(')')) - .toString(); - } -} - -class RemoteExifEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteExifEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn city = GeneratedColumn( - 'city', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn state = GeneratedColumn( - 'state', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn country = GeneratedColumn( - 'country', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn dateTimeOriginal = - GeneratedColumn( - 'date_time_original', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn description = GeneratedColumn( - 'description', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn height = GeneratedColumn( - 'height', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn width = GeneratedColumn( - 'width', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn exposureTime = GeneratedColumn( - 'exposure_time', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn fNumber = GeneratedColumn( - 'f_number', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn fileSize = GeneratedColumn( - 'file_size', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn focalLength = GeneratedColumn( - 'focal_length', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn latitude = GeneratedColumn( - 'latitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn longitude = GeneratedColumn( - 'longitude', - aliasedName, - true, - type: DriftSqlType.double, - requiredDuringInsert: false, - ); - late final GeneratedColumn iso = GeneratedColumn( - 'iso', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn make = GeneratedColumn( - 'make', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn model = GeneratedColumn( - 'model', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn lens = GeneratedColumn( - 'lens', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn orientation = GeneratedColumn( - 'orientation', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn timeZone = GeneratedColumn( - 'time_zone', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn rating = GeneratedColumn( - 'rating', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - late final GeneratedColumn projectionType = GeneratedColumn( - 'projection_type', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_exif_entity'; - @override - Set get $primaryKey => {assetId}; - @override - RemoteExifEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteExifEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - city: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}city'], - ), - state: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}state'], - ), - country: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}country'], - ), - dateTimeOriginal: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}date_time_original'], - ), - description: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}description'], - ), - height: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}height'], - ), - width: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}width'], - ), - exposureTime: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}exposure_time'], - ), - fNumber: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}f_number'], - ), - fileSize: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}file_size'], - ), - focalLength: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}focal_length'], - ), - latitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}latitude'], - ), - longitude: attachedDatabase.typeMapping.read( - DriftSqlType.double, - data['${effectivePrefix}longitude'], - ), - iso: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}iso'], - ), - make: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}make'], - ), - model: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}model'], - ), - lens: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}lens'], - ), - orientation: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}orientation'], - ), - timeZone: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}time_zone'], - ), - rating: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}rating'], - ), - projectionType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}projection_type'], - ), - ); - } - - @override - RemoteExifEntity createAlias(String alias) { - return RemoteExifEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteExifEntityData extends DataClass - implements Insertable { - final String assetId; - final String? city; - final String? state; - final String? country; - final DateTime? dateTimeOriginal; - final String? description; - final int? height; - final int? width; - final String? exposureTime; - final double? fNumber; - final int? fileSize; - final double? focalLength; - final double? latitude; - final double? longitude; - final int? iso; - final String? make; - final String? model; - final String? lens; - final String? orientation; - final String? timeZone; - final int? rating; - final String? projectionType; - const RemoteExifEntityData({ - required this.assetId, - this.city, - this.state, - this.country, - this.dateTimeOriginal, - this.description, - this.height, - this.width, - this.exposureTime, - this.fNumber, - this.fileSize, - this.focalLength, - this.latitude, - this.longitude, - this.iso, - this.make, - this.model, - this.lens, - this.orientation, - this.timeZone, - this.rating, - this.projectionType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || city != null) { - map['city'] = Variable(city); - } - if (!nullToAbsent || state != null) { - map['state'] = Variable(state); - } - if (!nullToAbsent || country != null) { - map['country'] = Variable(country); - } - if (!nullToAbsent || dateTimeOriginal != null) { - map['date_time_original'] = Variable(dateTimeOriginal); - } - if (!nullToAbsent || description != null) { - map['description'] = Variable(description); - } - if (!nullToAbsent || height != null) { - map['height'] = Variable(height); - } - if (!nullToAbsent || width != null) { - map['width'] = Variable(width); - } - if (!nullToAbsent || exposureTime != null) { - map['exposure_time'] = Variable(exposureTime); - } - if (!nullToAbsent || fNumber != null) { - map['f_number'] = Variable(fNumber); - } - if (!nullToAbsent || fileSize != null) { - map['file_size'] = Variable(fileSize); - } - if (!nullToAbsent || focalLength != null) { - map['focal_length'] = Variable(focalLength); - } - if (!nullToAbsent || latitude != null) { - map['latitude'] = Variable(latitude); - } - if (!nullToAbsent || longitude != null) { - map['longitude'] = Variable(longitude); - } - if (!nullToAbsent || iso != null) { - map['iso'] = Variable(iso); - } - if (!nullToAbsent || make != null) { - map['make'] = Variable(make); - } - if (!nullToAbsent || model != null) { - map['model'] = Variable(model); - } - if (!nullToAbsent || lens != null) { - map['lens'] = Variable(lens); - } - if (!nullToAbsent || orientation != null) { - map['orientation'] = Variable(orientation); - } - if (!nullToAbsent || timeZone != null) { - map['time_zone'] = Variable(timeZone); - } - if (!nullToAbsent || rating != null) { - map['rating'] = Variable(rating); - } - if (!nullToAbsent || projectionType != null) { - map['projection_type'] = Variable(projectionType); - } - return map; - } - - factory RemoteExifEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteExifEntityData( - assetId: serializer.fromJson(json['assetId']), - city: serializer.fromJson(json['city']), - state: serializer.fromJson(json['state']), - country: serializer.fromJson(json['country']), - dateTimeOriginal: serializer.fromJson( - json['dateTimeOriginal'], - ), - description: serializer.fromJson(json['description']), - height: serializer.fromJson(json['height']), - width: serializer.fromJson(json['width']), - exposureTime: serializer.fromJson(json['exposureTime']), - fNumber: serializer.fromJson(json['fNumber']), - fileSize: serializer.fromJson(json['fileSize']), - focalLength: serializer.fromJson(json['focalLength']), - latitude: serializer.fromJson(json['latitude']), - longitude: serializer.fromJson(json['longitude']), - iso: serializer.fromJson(json['iso']), - make: serializer.fromJson(json['make']), - model: serializer.fromJson(json['model']), - lens: serializer.fromJson(json['lens']), - orientation: serializer.fromJson(json['orientation']), - timeZone: serializer.fromJson(json['timeZone']), - rating: serializer.fromJson(json['rating']), - projectionType: serializer.fromJson(json['projectionType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'city': serializer.toJson(city), - 'state': serializer.toJson(state), - 'country': serializer.toJson(country), - 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), - 'description': serializer.toJson(description), - 'height': serializer.toJson(height), - 'width': serializer.toJson(width), - 'exposureTime': serializer.toJson(exposureTime), - 'fNumber': serializer.toJson(fNumber), - 'fileSize': serializer.toJson(fileSize), - 'focalLength': serializer.toJson(focalLength), - 'latitude': serializer.toJson(latitude), - 'longitude': serializer.toJson(longitude), - 'iso': serializer.toJson(iso), - 'make': serializer.toJson(make), - 'model': serializer.toJson(model), - 'lens': serializer.toJson(lens), - 'orientation': serializer.toJson(orientation), - 'timeZone': serializer.toJson(timeZone), - 'rating': serializer.toJson(rating), - 'projectionType': serializer.toJson(projectionType), - }; - } - - RemoteExifEntityData copyWith({ - String? assetId, - Value city = const Value.absent(), - Value state = const Value.absent(), - Value country = const Value.absent(), - Value dateTimeOriginal = const Value.absent(), - Value description = const Value.absent(), - Value height = const Value.absent(), - Value width = const Value.absent(), - Value exposureTime = const Value.absent(), - Value fNumber = const Value.absent(), - Value fileSize = const Value.absent(), - Value focalLength = const Value.absent(), - Value latitude = const Value.absent(), - Value longitude = const Value.absent(), - Value iso = const Value.absent(), - Value make = const Value.absent(), - Value model = const Value.absent(), - Value lens = const Value.absent(), - Value orientation = const Value.absent(), - Value timeZone = const Value.absent(), - Value rating = const Value.absent(), - Value projectionType = const Value.absent(), - }) => RemoteExifEntityData( - assetId: assetId ?? this.assetId, - city: city.present ? city.value : this.city, - state: state.present ? state.value : this.state, - country: country.present ? country.value : this.country, - dateTimeOriginal: dateTimeOriginal.present - ? dateTimeOriginal.value - : this.dateTimeOriginal, - description: description.present ? description.value : this.description, - height: height.present ? height.value : this.height, - width: width.present ? width.value : this.width, - exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, - fNumber: fNumber.present ? fNumber.value : this.fNumber, - fileSize: fileSize.present ? fileSize.value : this.fileSize, - focalLength: focalLength.present ? focalLength.value : this.focalLength, - latitude: latitude.present ? latitude.value : this.latitude, - longitude: longitude.present ? longitude.value : this.longitude, - iso: iso.present ? iso.value : this.iso, - make: make.present ? make.value : this.make, - model: model.present ? model.value : this.model, - lens: lens.present ? lens.value : this.lens, - orientation: orientation.present ? orientation.value : this.orientation, - timeZone: timeZone.present ? timeZone.value : this.timeZone, - rating: rating.present ? rating.value : this.rating, - projectionType: projectionType.present - ? projectionType.value - : this.projectionType, - ); - RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { - return RemoteExifEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - city: data.city.present ? data.city.value : this.city, - state: data.state.present ? data.state.value : this.state, - country: data.country.present ? data.country.value : this.country, - dateTimeOriginal: data.dateTimeOriginal.present - ? data.dateTimeOriginal.value - : this.dateTimeOriginal, - description: data.description.present - ? data.description.value - : this.description, - height: data.height.present ? data.height.value : this.height, - width: data.width.present ? data.width.value : this.width, - exposureTime: data.exposureTime.present - ? data.exposureTime.value - : this.exposureTime, - fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, - fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, - focalLength: data.focalLength.present - ? data.focalLength.value - : this.focalLength, - latitude: data.latitude.present ? data.latitude.value : this.latitude, - longitude: data.longitude.present ? data.longitude.value : this.longitude, - iso: data.iso.present ? data.iso.value : this.iso, - make: data.make.present ? data.make.value : this.make, - model: data.model.present ? data.model.value : this.model, - lens: data.lens.present ? data.lens.value : this.lens, - orientation: data.orientation.present - ? data.orientation.value - : this.orientation, - timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, - rating: data.rating.present ? data.rating.value : this.rating, - projectionType: data.projectionType.present - ? data.projectionType.value - : this.projectionType, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityData(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hashAll([ - assetId, - city, - state, - country, - dateTimeOriginal, - description, - height, - width, - exposureTime, - fNumber, - fileSize, - focalLength, - latitude, - longitude, - iso, - make, - model, - lens, - orientation, - timeZone, - rating, - projectionType, - ]); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteExifEntityData && - other.assetId == this.assetId && - other.city == this.city && - other.state == this.state && - other.country == this.country && - other.dateTimeOriginal == this.dateTimeOriginal && - other.description == this.description && - other.height == this.height && - other.width == this.width && - other.exposureTime == this.exposureTime && - other.fNumber == this.fNumber && - other.fileSize == this.fileSize && - other.focalLength == this.focalLength && - other.latitude == this.latitude && - other.longitude == this.longitude && - other.iso == this.iso && - other.make == this.make && - other.model == this.model && - other.lens == this.lens && - other.orientation == this.orientation && - other.timeZone == this.timeZone && - other.rating == this.rating && - other.projectionType == this.projectionType); -} - -class RemoteExifEntityCompanion extends UpdateCompanion { - final Value assetId; - final Value city; - final Value state; - final Value country; - final Value dateTimeOriginal; - final Value description; - final Value height; - final Value width; - final Value exposureTime; - final Value fNumber; - final Value fileSize; - final Value focalLength; - final Value latitude; - final Value longitude; - final Value iso; - final Value make; - final Value model; - final Value lens; - final Value orientation; - final Value timeZone; - final Value rating; - final Value projectionType; - const RemoteExifEntityCompanion({ - this.assetId = const Value.absent(), - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }); - RemoteExifEntityCompanion.insert({ - required String assetId, - this.city = const Value.absent(), - this.state = const Value.absent(), - this.country = const Value.absent(), - this.dateTimeOriginal = const Value.absent(), - this.description = const Value.absent(), - this.height = const Value.absent(), - this.width = const Value.absent(), - this.exposureTime = const Value.absent(), - this.fNumber = const Value.absent(), - this.fileSize = const Value.absent(), - this.focalLength = const Value.absent(), - this.latitude = const Value.absent(), - this.longitude = const Value.absent(), - this.iso = const Value.absent(), - this.make = const Value.absent(), - this.model = const Value.absent(), - this.lens = const Value.absent(), - this.orientation = const Value.absent(), - this.timeZone = const Value.absent(), - this.rating = const Value.absent(), - this.projectionType = const Value.absent(), - }) : assetId = Value(assetId); - static Insertable custom({ - Expression? assetId, - Expression? city, - Expression? state, - Expression? country, - Expression? dateTimeOriginal, - Expression? description, - Expression? height, - Expression? width, - Expression? exposureTime, - Expression? fNumber, - Expression? fileSize, - Expression? focalLength, - Expression? latitude, - Expression? longitude, - Expression? iso, - Expression? make, - Expression? model, - Expression? lens, - Expression? orientation, - Expression? timeZone, - Expression? rating, - Expression? projectionType, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (city != null) 'city': city, - if (state != null) 'state': state, - if (country != null) 'country': country, - if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, - if (description != null) 'description': description, - if (height != null) 'height': height, - if (width != null) 'width': width, - if (exposureTime != null) 'exposure_time': exposureTime, - if (fNumber != null) 'f_number': fNumber, - if (fileSize != null) 'file_size': fileSize, - if (focalLength != null) 'focal_length': focalLength, - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - if (iso != null) 'iso': iso, - if (make != null) 'make': make, - if (model != null) 'model': model, - if (lens != null) 'lens': lens, - if (orientation != null) 'orientation': orientation, - if (timeZone != null) 'time_zone': timeZone, - if (rating != null) 'rating': rating, - if (projectionType != null) 'projection_type': projectionType, - }); - } - - RemoteExifEntityCompanion copyWith({ - Value? assetId, - Value? city, - Value? state, - Value? country, - Value? dateTimeOriginal, - Value? description, - Value? height, - Value? width, - Value? exposureTime, - Value? fNumber, - Value? fileSize, - Value? focalLength, - Value? latitude, - Value? longitude, - Value? iso, - Value? make, - Value? model, - Value? lens, - Value? orientation, - Value? timeZone, - Value? rating, - Value? projectionType, - }) { - return RemoteExifEntityCompanion( - assetId: assetId ?? this.assetId, - city: city ?? this.city, - state: state ?? this.state, - country: country ?? this.country, - dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, - description: description ?? this.description, - height: height ?? this.height, - width: width ?? this.width, - exposureTime: exposureTime ?? this.exposureTime, - fNumber: fNumber ?? this.fNumber, - fileSize: fileSize ?? this.fileSize, - focalLength: focalLength ?? this.focalLength, - latitude: latitude ?? this.latitude, - longitude: longitude ?? this.longitude, - iso: iso ?? this.iso, - make: make ?? this.make, - model: model ?? this.model, - lens: lens ?? this.lens, - orientation: orientation ?? this.orientation, - timeZone: timeZone ?? this.timeZone, - rating: rating ?? this.rating, - projectionType: projectionType ?? this.projectionType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (city.present) { - map['city'] = Variable(city.value); - } - if (state.present) { - map['state'] = Variable(state.value); - } - if (country.present) { - map['country'] = Variable(country.value); - } - if (dateTimeOriginal.present) { - map['date_time_original'] = Variable(dateTimeOriginal.value); - } - if (description.present) { - map['description'] = Variable(description.value); - } - if (height.present) { - map['height'] = Variable(height.value); - } - if (width.present) { - map['width'] = Variable(width.value); - } - if (exposureTime.present) { - map['exposure_time'] = Variable(exposureTime.value); - } - if (fNumber.present) { - map['f_number'] = Variable(fNumber.value); - } - if (fileSize.present) { - map['file_size'] = Variable(fileSize.value); - } - if (focalLength.present) { - map['focal_length'] = Variable(focalLength.value); - } - if (latitude.present) { - map['latitude'] = Variable(latitude.value); - } - if (longitude.present) { - map['longitude'] = Variable(longitude.value); - } - if (iso.present) { - map['iso'] = Variable(iso.value); - } - if (make.present) { - map['make'] = Variable(make.value); - } - if (model.present) { - map['model'] = Variable(model.value); - } - if (lens.present) { - map['lens'] = Variable(lens.value); - } - if (orientation.present) { - map['orientation'] = Variable(orientation.value); - } - if (timeZone.present) { - map['time_zone'] = Variable(timeZone.value); - } - if (rating.present) { - map['rating'] = Variable(rating.value); - } - if (projectionType.present) { - map['projection_type'] = Variable(projectionType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteExifEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('city: $city, ') - ..write('state: $state, ') - ..write('country: $country, ') - ..write('dateTimeOriginal: $dateTimeOriginal, ') - ..write('description: $description, ') - ..write('height: $height, ') - ..write('width: $width, ') - ..write('exposureTime: $exposureTime, ') - ..write('fNumber: $fNumber, ') - ..write('fileSize: $fileSize, ') - ..write('focalLength: $focalLength, ') - ..write('latitude: $latitude, ') - ..write('longitude: $longitude, ') - ..write('iso: $iso, ') - ..write('make: $make, ') - ..write('model: $model, ') - ..write('lens: $lens, ') - ..write('orientation: $orientation, ') - ..write('timeZone: $timeZone, ') - ..write('rating: $rating, ') - ..write('projectionType: $projectionType') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, albumId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_asset_entity'; - @override - Set get $primaryKey => {assetId, albumId}; - @override - RemoteAlbumAssetEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - ); - } - - @override - RemoteAlbumAssetEntity createAlias(String alias) { - return RemoteAlbumAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String albumId; - const RemoteAlbumAssetEntityData({ - required this.assetId, - required this.albumId, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['album_id'] = Variable(albumId); - return map; - } - - factory RemoteAlbumAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - albumId: serializer.fromJson(json['albumId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'albumId': serializer.toJson(albumId), - }; - } - - RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => - RemoteAlbumAssetEntityData( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - RemoteAlbumAssetEntityData copyWithCompanion( - RemoteAlbumAssetEntityCompanion data, - ) { - return RemoteAlbumAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - albumId: data.albumId.present ? data.albumId.value : this.albumId, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, albumId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumAssetEntityData && - other.assetId == this.assetId && - other.albumId == this.albumId); -} - -class RemoteAlbumAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value albumId; - const RemoteAlbumAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.albumId = const Value.absent(), - }); - RemoteAlbumAssetEntityCompanion.insert({ - required String assetId, - required String albumId, - }) : assetId = Value(assetId), - albumId = Value(albumId); - static Insertable custom({ - Expression? assetId, - Expression? albumId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (albumId != null) 'album_id': albumId, - }); - } - - RemoteAlbumAssetEntityCompanion copyWith({ - Value? assetId, - Value? albumId, - }) { - return RemoteAlbumAssetEntityCompanion( - assetId: assetId ?? this.assetId, - albumId: albumId ?? this.albumId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('albumId: $albumId') - ..write(')')) - .toString(); - } -} - -class RemoteAlbumUserEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn albumId = GeneratedColumn( - 'album_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn userId = GeneratedColumn( - 'user_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn role = GeneratedColumn( - 'role', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - @override - List get $columns => [albumId, userId, role]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'remote_album_user_entity'; - @override - Set get $primaryKey => {albumId, userId}; - @override - RemoteAlbumUserEntityData map( - Map data, { - String? tablePrefix, - }) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return RemoteAlbumUserEntityData( - albumId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}album_id'], - )!, - userId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}user_id'], - )!, - role: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}role'], - )!, - ); - } - - @override - RemoteAlbumUserEntity createAlias(String alias) { - return RemoteAlbumUserEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class RemoteAlbumUserEntityData extends DataClass - implements Insertable { - final String albumId; - final String userId; - final int role; - const RemoteAlbumUserEntityData({ - required this.albumId, - required this.userId, - required this.role, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['album_id'] = Variable(albumId); - map['user_id'] = Variable(userId); - map['role'] = Variable(role); - return map; - } - - factory RemoteAlbumUserEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return RemoteAlbumUserEntityData( - albumId: serializer.fromJson(json['albumId']), - userId: serializer.fromJson(json['userId']), - role: serializer.fromJson(json['role']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'albumId': serializer.toJson(albumId), - 'userId': serializer.toJson(userId), - 'role': serializer.toJson(role), - }; - } - - RemoteAlbumUserEntityData copyWith({ - String? albumId, - String? userId, - int? role, - }) => RemoteAlbumUserEntityData( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - RemoteAlbumUserEntityData copyWithCompanion( - RemoteAlbumUserEntityCompanion data, - ) { - return RemoteAlbumUserEntityData( - albumId: data.albumId.present ? data.albumId.value : this.albumId, - userId: data.userId.present ? data.userId.value : this.userId, - role: data.role.present ? data.role.value : this.role, - ); - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityData(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(albumId, userId, role); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is RemoteAlbumUserEntityData && - other.albumId == this.albumId && - other.userId == this.userId && - other.role == this.role); -} - -class RemoteAlbumUserEntityCompanion - extends UpdateCompanion { - final Value albumId; - final Value userId; - final Value role; - const RemoteAlbumUserEntityCompanion({ - this.albumId = const Value.absent(), - this.userId = const Value.absent(), - this.role = const Value.absent(), - }); - RemoteAlbumUserEntityCompanion.insert({ - required String albumId, - required String userId, - required int role, - }) : albumId = Value(albumId), - userId = Value(userId), - role = Value(role); - static Insertable custom({ - Expression? albumId, - Expression? userId, - Expression? role, - }) { - return RawValuesInsertable({ - if (albumId != null) 'album_id': albumId, - if (userId != null) 'user_id': userId, - if (role != null) 'role': role, - }); - } - - RemoteAlbumUserEntityCompanion copyWith({ - Value? albumId, - Value? userId, - Value? role, - }) { - return RemoteAlbumUserEntityCompanion( - albumId: albumId ?? this.albumId, - userId: userId ?? this.userId, - role: role ?? this.role, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (albumId.present) { - map['album_id'] = Variable(albumId.value); - } - if (userId.present) { - map['user_id'] = Variable(userId.value); - } - if (role.present) { - map['role'] = Variable(role.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('RemoteAlbumUserEntityCompanion(') - ..write('albumId: $albumId, ') - ..write('userId: $userId, ') - ..write('role: $role') - ..write(')')) - .toString(); - } -} - -class MemoryEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn deletedAt = GeneratedColumn( - 'deleted_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn type = GeneratedColumn( - 'type', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn data = GeneratedColumn( - 'data', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn isSaved = GeneratedColumn( - 'is_saved', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_saved" IN (0, 1))', - ), - defaultValue: const CustomExpression('0'), - ); - late final GeneratedColumn memoryAt = GeneratedColumn( - 'memory_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: true, - ); - late final GeneratedColumn seenAt = GeneratedColumn( - 'seen_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn showAt = GeneratedColumn( - 'show_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - late final GeneratedColumn hideAt = GeneratedColumn( - 'hide_at', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_entity'; - @override - Set get $primaryKey => {id}; - @override - MemoryEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - deletedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}deleted_at'], - ), - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - type: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}type'], - )!, - data: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}data'], - )!, - isSaved: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_saved'], - )!, - memoryAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}memory_at'], - )!, - seenAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}seen_at'], - ), - showAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}show_at'], - ), - hideAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}hide_at'], - ), - ); - } - - @override - MemoryEntity createAlias(String alias) { - return MemoryEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final DateTime? deletedAt; - final String ownerId; - final int type; - final String data; - final bool isSaved; - final DateTime memoryAt; - final DateTime? seenAt; - final DateTime? showAt; - final DateTime? hideAt; - const MemoryEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - this.deletedAt, - required this.ownerId, - required this.type, - required this.data, - required this.isSaved, - required this.memoryAt, - this.seenAt, - this.showAt, - this.hideAt, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - if (!nullToAbsent || deletedAt != null) { - map['deleted_at'] = Variable(deletedAt); - } - map['owner_id'] = Variable(ownerId); - map['type'] = Variable(type); - map['data'] = Variable(data); - map['is_saved'] = Variable(isSaved); - map['memory_at'] = Variable(memoryAt); - if (!nullToAbsent || seenAt != null) { - map['seen_at'] = Variable(seenAt); - } - if (!nullToAbsent || showAt != null) { - map['show_at'] = Variable(showAt); - } - if (!nullToAbsent || hideAt != null) { - map['hide_at'] = Variable(hideAt); - } - return map; - } - - factory MemoryEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - deletedAt: serializer.fromJson(json['deletedAt']), - ownerId: serializer.fromJson(json['ownerId']), - type: serializer.fromJson(json['type']), - data: serializer.fromJson(json['data']), - isSaved: serializer.fromJson(json['isSaved']), - memoryAt: serializer.fromJson(json['memoryAt']), - seenAt: serializer.fromJson(json['seenAt']), - showAt: serializer.fromJson(json['showAt']), - hideAt: serializer.fromJson(json['hideAt']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'deletedAt': serializer.toJson(deletedAt), - 'ownerId': serializer.toJson(ownerId), - 'type': serializer.toJson(type), - 'data': serializer.toJson(data), - 'isSaved': serializer.toJson(isSaved), - 'memoryAt': serializer.toJson(memoryAt), - 'seenAt': serializer.toJson(seenAt), - 'showAt': serializer.toJson(showAt), - 'hideAt': serializer.toJson(hideAt), - }; - } - - MemoryEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - Value deletedAt = const Value.absent(), - String? ownerId, - int? type, - String? data, - bool? isSaved, - DateTime? memoryAt, - Value seenAt = const Value.absent(), - Value showAt = const Value.absent(), - Value hideAt = const Value.absent(), - }) => MemoryEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt.present ? seenAt.value : this.seenAt, - showAt: showAt.present ? showAt.value : this.showAt, - hideAt: hideAt.present ? hideAt.value : this.hideAt, - ); - MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { - return MemoryEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - type: data.type.present ? data.type.value : this.type, - data: data.data.present ? data.data.value : this.data, - isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, - memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, - seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, - showAt: data.showAt.present ? data.showAt.value : this.showAt, - hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - deletedAt, - ownerId, - type, - data, - isSaved, - memoryAt, - seenAt, - showAt, - hideAt, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.deletedAt == this.deletedAt && - other.ownerId == this.ownerId && - other.type == this.type && - other.data == this.data && - other.isSaved == this.isSaved && - other.memoryAt == this.memoryAt && - other.seenAt == this.seenAt && - other.showAt == this.showAt && - other.hideAt == this.hideAt); -} - -class MemoryEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value deletedAt; - final Value ownerId; - final Value type; - final Value data; - final Value isSaved; - final Value memoryAt; - final Value seenAt; - final Value showAt; - final Value hideAt; - const MemoryEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.type = const Value.absent(), - this.data = const Value.absent(), - this.isSaved = const Value.absent(), - this.memoryAt = const Value.absent(), - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }); - MemoryEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.deletedAt = const Value.absent(), - required String ownerId, - required int type, - required String data, - this.isSaved = const Value.absent(), - required DateTime memoryAt, - this.seenAt = const Value.absent(), - this.showAt = const Value.absent(), - this.hideAt = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - type = Value(type), - data = Value(data), - memoryAt = Value(memoryAt); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? deletedAt, - Expression? ownerId, - Expression? type, - Expression? data, - Expression? isSaved, - Expression? memoryAt, - Expression? seenAt, - Expression? showAt, - Expression? hideAt, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (deletedAt != null) 'deleted_at': deletedAt, - if (ownerId != null) 'owner_id': ownerId, - if (type != null) 'type': type, - if (data != null) 'data': data, - if (isSaved != null) 'is_saved': isSaved, - if (memoryAt != null) 'memory_at': memoryAt, - if (seenAt != null) 'seen_at': seenAt, - if (showAt != null) 'show_at': showAt, - if (hideAt != null) 'hide_at': hideAt, - }); - } - - MemoryEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? deletedAt, - Value? ownerId, - Value? type, - Value? data, - Value? isSaved, - Value? memoryAt, - Value? seenAt, - Value? showAt, - Value? hideAt, - }) { - return MemoryEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - deletedAt: deletedAt ?? this.deletedAt, - ownerId: ownerId ?? this.ownerId, - type: type ?? this.type, - data: data ?? this.data, - isSaved: isSaved ?? this.isSaved, - memoryAt: memoryAt ?? this.memoryAt, - seenAt: seenAt ?? this.seenAt, - showAt: showAt ?? this.showAt, - hideAt: hideAt ?? this.hideAt, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (deletedAt.present) { - map['deleted_at'] = Variable(deletedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (type.present) { - map['type'] = Variable(type.value); - } - if (data.present) { - map['data'] = Variable(data.value); - } - if (isSaved.present) { - map['is_saved'] = Variable(isSaved.value); - } - if (memoryAt.present) { - map['memory_at'] = Variable(memoryAt.value); - } - if (seenAt.present) { - map['seen_at'] = Variable(seenAt.value); - } - if (showAt.present) { - map['show_at'] = Variable(showAt.value); - } - if (hideAt.present) { - map['hide_at'] = Variable(hideAt.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('deletedAt: $deletedAt, ') - ..write('ownerId: $ownerId, ') - ..write('type: $type, ') - ..write('data: $data, ') - ..write('isSaved: $isSaved, ') - ..write('memoryAt: $memoryAt, ') - ..write('seenAt: $seenAt, ') - ..write('showAt: $showAt, ') - ..write('hideAt: $hideAt') - ..write(')')) - .toString(); - } -} - -class MemoryAssetEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - MemoryAssetEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn memoryId = GeneratedColumn( - 'memory_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES memory_entity (id) ON DELETE CASCADE', - ), - ); - @override - List get $columns => [assetId, memoryId]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'memory_asset_entity'; - @override - Set get $primaryKey => {assetId, memoryId}; - @override - MemoryAssetEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return MemoryAssetEntityData( - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - memoryId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}memory_id'], - )!, - ); - } - - @override - MemoryAssetEntity createAlias(String alias) { - return MemoryAssetEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class MemoryAssetEntityData extends DataClass - implements Insertable { - final String assetId; - final String memoryId; - const MemoryAssetEntityData({required this.assetId, required this.memoryId}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['asset_id'] = Variable(assetId); - map['memory_id'] = Variable(memoryId); - return map; - } - - factory MemoryAssetEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return MemoryAssetEntityData( - assetId: serializer.fromJson(json['assetId']), - memoryId: serializer.fromJson(json['memoryId']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'assetId': serializer.toJson(assetId), - 'memoryId': serializer.toJson(memoryId), - }; - } - - MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => - MemoryAssetEntityData( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { - return MemoryAssetEntityData( - assetId: data.assetId.present ? data.assetId.value : this.assetId, - memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, - ); - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityData(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(assetId, memoryId); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is MemoryAssetEntityData && - other.assetId == this.assetId && - other.memoryId == this.memoryId); -} - -class MemoryAssetEntityCompanion - extends UpdateCompanion { - final Value assetId; - final Value memoryId; - const MemoryAssetEntityCompanion({ - this.assetId = const Value.absent(), - this.memoryId = const Value.absent(), - }); - MemoryAssetEntityCompanion.insert({ - required String assetId, - required String memoryId, - }) : assetId = Value(assetId), - memoryId = Value(memoryId); - static Insertable custom({ - Expression? assetId, - Expression? memoryId, - }) { - return RawValuesInsertable({ - if (assetId != null) 'asset_id': assetId, - if (memoryId != null) 'memory_id': memoryId, - }); - } - - MemoryAssetEntityCompanion copyWith({ - Value? assetId, - Value? memoryId, - }) { - return MemoryAssetEntityCompanion( - assetId: assetId ?? this.assetId, - memoryId: memoryId ?? this.memoryId, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (memoryId.present) { - map['memory_id'] = Variable(memoryId.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('MemoryAssetEntityCompanion(') - ..write('assetId: $assetId, ') - ..write('memoryId: $memoryId') - ..write(')')) - .toString(); - } -} - -class PersonEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - PersonEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn createdAt = GeneratedColumn( - 'created_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn updatedAt = GeneratedColumn( - 'updated_at', - aliasedName, - false, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), - ); - late final GeneratedColumn ownerId = GeneratedColumn( - 'owner_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES user_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn name = GeneratedColumn( - 'name', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn faceAssetId = GeneratedColumn( - 'face_asset_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn isFavorite = GeneratedColumn( - 'is_favorite', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_favorite" IN (0, 1))', - ), - ); - late final GeneratedColumn isHidden = GeneratedColumn( - 'is_hidden', - aliasedName, - false, - type: DriftSqlType.bool, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("is_hidden" IN (0, 1))', - ), - ); - late final GeneratedColumn color = GeneratedColumn( - 'color', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn birthDate = GeneratedColumn( - 'birth_date', - aliasedName, - true, - type: DriftSqlType.dateTime, - requiredDuringInsert: false, - ); - @override - List get $columns => [ - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'person_entity'; - @override - Set get $primaryKey => {id}; - @override - PersonEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return PersonEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - createdAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}created_at'], - )!, - updatedAt: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}updated_at'], - )!, - ownerId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}owner_id'], - )!, - name: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}name'], - )!, - faceAssetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}face_asset_id'], - ), - isFavorite: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_favorite'], - )!, - isHidden: attachedDatabase.typeMapping.read( - DriftSqlType.bool, - data['${effectivePrefix}is_hidden'], - )!, - color: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}color'], - ), - birthDate: attachedDatabase.typeMapping.read( - DriftSqlType.dateTime, - data['${effectivePrefix}birth_date'], - ), - ); - } - - @override - PersonEntity createAlias(String alias) { - return PersonEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class PersonEntityData extends DataClass - implements Insertable { - final String id; - final DateTime createdAt; - final DateTime updatedAt; - final String ownerId; - final String name; - final String? faceAssetId; - final bool isFavorite; - final bool isHidden; - final String? color; - final DateTime? birthDate; - const PersonEntityData({ - required this.id, - required this.createdAt, - required this.updatedAt, - required this.ownerId, - required this.name, - this.faceAssetId, - required this.isFavorite, - required this.isHidden, - this.color, - this.birthDate, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['created_at'] = Variable(createdAt); - map['updated_at'] = Variable(updatedAt); - map['owner_id'] = Variable(ownerId); - map['name'] = Variable(name); - if (!nullToAbsent || faceAssetId != null) { - map['face_asset_id'] = Variable(faceAssetId); - } - map['is_favorite'] = Variable(isFavorite); - map['is_hidden'] = Variable(isHidden); - if (!nullToAbsent || color != null) { - map['color'] = Variable(color); - } - if (!nullToAbsent || birthDate != null) { - map['birth_date'] = Variable(birthDate); - } - return map; - } - - factory PersonEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return PersonEntityData( - id: serializer.fromJson(json['id']), - createdAt: serializer.fromJson(json['createdAt']), - updatedAt: serializer.fromJson(json['updatedAt']), - ownerId: serializer.fromJson(json['ownerId']), - name: serializer.fromJson(json['name']), - faceAssetId: serializer.fromJson(json['faceAssetId']), - isFavorite: serializer.fromJson(json['isFavorite']), - isHidden: serializer.fromJson(json['isHidden']), - color: serializer.fromJson(json['color']), - birthDate: serializer.fromJson(json['birthDate']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'createdAt': serializer.toJson(createdAt), - 'updatedAt': serializer.toJson(updatedAt), - 'ownerId': serializer.toJson(ownerId), - 'name': serializer.toJson(name), - 'faceAssetId': serializer.toJson(faceAssetId), - 'isFavorite': serializer.toJson(isFavorite), - 'isHidden': serializer.toJson(isHidden), - 'color': serializer.toJson(color), - 'birthDate': serializer.toJson(birthDate), - }; - } - - PersonEntityData copyWith({ - String? id, - DateTime? createdAt, - DateTime? updatedAt, - String? ownerId, - String? name, - Value faceAssetId = const Value.absent(), - bool? isFavorite, - bool? isHidden, - Value color = const Value.absent(), - Value birthDate = const Value.absent(), - }) => PersonEntityData( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color.present ? color.value : this.color, - birthDate: birthDate.present ? birthDate.value : this.birthDate, - ); - PersonEntityData copyWithCompanion(PersonEntityCompanion data) { - return PersonEntityData( - id: data.id.present ? data.id.value : this.id, - createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, - updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, - ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, - name: data.name.present ? data.name.value : this.name, - faceAssetId: data.faceAssetId.present - ? data.faceAssetId.value - : this.faceAssetId, - isFavorite: data.isFavorite.present - ? data.isFavorite.value - : this.isFavorite, - isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, - color: data.color.present ? data.color.value : this.color, - birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, - ); - } - - @override - String toString() { - return (StringBuffer('PersonEntityData(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - createdAt, - updatedAt, - ownerId, - name, - faceAssetId, - isFavorite, - isHidden, - color, - birthDate, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is PersonEntityData && - other.id == this.id && - other.createdAt == this.createdAt && - other.updatedAt == this.updatedAt && - other.ownerId == this.ownerId && - other.name == this.name && - other.faceAssetId == this.faceAssetId && - other.isFavorite == this.isFavorite && - other.isHidden == this.isHidden && - other.color == this.color && - other.birthDate == this.birthDate); -} - -class PersonEntityCompanion extends UpdateCompanion { - final Value id; - final Value createdAt; - final Value updatedAt; - final Value ownerId; - final Value name; - final Value faceAssetId; - final Value isFavorite; - final Value isHidden; - final Value color; - final Value birthDate; - const PersonEntityCompanion({ - this.id = const Value.absent(), - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - this.ownerId = const Value.absent(), - this.name = const Value.absent(), - this.faceAssetId = const Value.absent(), - this.isFavorite = const Value.absent(), - this.isHidden = const Value.absent(), - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }); - PersonEntityCompanion.insert({ - required String id, - this.createdAt = const Value.absent(), - this.updatedAt = const Value.absent(), - required String ownerId, - required String name, - this.faceAssetId = const Value.absent(), - required bool isFavorite, - required bool isHidden, - this.color = const Value.absent(), - this.birthDate = const Value.absent(), - }) : id = Value(id), - ownerId = Value(ownerId), - name = Value(name), - isFavorite = Value(isFavorite), - isHidden = Value(isHidden); - static Insertable custom({ - Expression? id, - Expression? createdAt, - Expression? updatedAt, - Expression? ownerId, - Expression? name, - Expression? faceAssetId, - Expression? isFavorite, - Expression? isHidden, - Expression? color, - Expression? birthDate, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (createdAt != null) 'created_at': createdAt, - if (updatedAt != null) 'updated_at': updatedAt, - if (ownerId != null) 'owner_id': ownerId, - if (name != null) 'name': name, - if (faceAssetId != null) 'face_asset_id': faceAssetId, - if (isFavorite != null) 'is_favorite': isFavorite, - if (isHidden != null) 'is_hidden': isHidden, - if (color != null) 'color': color, - if (birthDate != null) 'birth_date': birthDate, - }); - } - - PersonEntityCompanion copyWith({ - Value? id, - Value? createdAt, - Value? updatedAt, - Value? ownerId, - Value? name, - Value? faceAssetId, - Value? isFavorite, - Value? isHidden, - Value? color, - Value? birthDate, - }) { - return PersonEntityCompanion( - id: id ?? this.id, - createdAt: createdAt ?? this.createdAt, - updatedAt: updatedAt ?? this.updatedAt, - ownerId: ownerId ?? this.ownerId, - name: name ?? this.name, - faceAssetId: faceAssetId ?? this.faceAssetId, - isFavorite: isFavorite ?? this.isFavorite, - isHidden: isHidden ?? this.isHidden, - color: color ?? this.color, - birthDate: birthDate ?? this.birthDate, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (createdAt.present) { - map['created_at'] = Variable(createdAt.value); - } - if (updatedAt.present) { - map['updated_at'] = Variable(updatedAt.value); - } - if (ownerId.present) { - map['owner_id'] = Variable(ownerId.value); - } - if (name.present) { - map['name'] = Variable(name.value); - } - if (faceAssetId.present) { - map['face_asset_id'] = Variable(faceAssetId.value); - } - if (isFavorite.present) { - map['is_favorite'] = Variable(isFavorite.value); - } - if (isHidden.present) { - map['is_hidden'] = Variable(isHidden.value); - } - if (color.present) { - map['color'] = Variable(color.value); - } - if (birthDate.present) { - map['birth_date'] = Variable(birthDate.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('PersonEntityCompanion(') - ..write('id: $id, ') - ..write('createdAt: $createdAt, ') - ..write('updatedAt: $updatedAt, ') - ..write('ownerId: $ownerId, ') - ..write('name: $name, ') - ..write('faceAssetId: $faceAssetId, ') - ..write('isFavorite: $isFavorite, ') - ..write('isHidden: $isHidden, ') - ..write('color: $color, ') - ..write('birthDate: $birthDate') - ..write(')')) - .toString(); - } -} - -class AssetFaceEntity extends Table - with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - AssetFaceEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - late final GeneratedColumn assetId = GeneratedColumn( - 'asset_id', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', - ), - ); - late final GeneratedColumn personId = GeneratedColumn( - 'person_id', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'REFERENCES person_entity (id) ON DELETE SET NULL', - ), - ); - late final GeneratedColumn imageWidth = GeneratedColumn( - 'image_width', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn imageHeight = GeneratedColumn( - 'image_height', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX1 = GeneratedColumn( - 'bounding_box_x1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY1 = GeneratedColumn( - 'bounding_box_y1', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxX2 = GeneratedColumn( - 'bounding_box_x2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn boundingBoxY2 = GeneratedColumn( - 'bounding_box_y2', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn sourceType = GeneratedColumn( - 'source_type', - aliasedName, - false, - type: DriftSqlType.string, - requiredDuringInsert: true, - ); - @override - List get $columns => [ - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'asset_face_entity'; - @override - Set get $primaryKey => {id}; - @override - AssetFaceEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return AssetFaceEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}id'], - )!, - assetId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}asset_id'], - )!, - personId: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}person_id'], - ), - imageWidth: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_width'], - )!, - imageHeight: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}image_height'], - )!, - boundingBoxX1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x1'], - )!, - boundingBoxY1: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y1'], - )!, - boundingBoxX2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_x2'], - )!, - boundingBoxY2: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}bounding_box_y2'], - )!, - sourceType: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}source_type'], - )!, - ); - } - - @override - AssetFaceEntity createAlias(String alias) { - return AssetFaceEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class AssetFaceEntityData extends DataClass - implements Insertable { - final String id; - final String assetId; - final String? personId; - final int imageWidth; - final int imageHeight; - final int boundingBoxX1; - final int boundingBoxY1; - final int boundingBoxX2; - final int boundingBoxY2; - final String sourceType; - const AssetFaceEntityData({ - required this.id, - required this.assetId, - this.personId, - required this.imageWidth, - required this.imageHeight, - required this.boundingBoxX1, - required this.boundingBoxY1, - required this.boundingBoxX2, - required this.boundingBoxY2, - required this.sourceType, - }); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - map['asset_id'] = Variable(assetId); - if (!nullToAbsent || personId != null) { - map['person_id'] = Variable(personId); - } - map['image_width'] = Variable(imageWidth); - map['image_height'] = Variable(imageHeight); - map['bounding_box_x1'] = Variable(boundingBoxX1); - map['bounding_box_y1'] = Variable(boundingBoxY1); - map['bounding_box_x2'] = Variable(boundingBoxX2); - map['bounding_box_y2'] = Variable(boundingBoxY2); - map['source_type'] = Variable(sourceType); - return map; - } - - factory AssetFaceEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return AssetFaceEntityData( - id: serializer.fromJson(json['id']), - assetId: serializer.fromJson(json['assetId']), - personId: serializer.fromJson(json['personId']), - imageWidth: serializer.fromJson(json['imageWidth']), - imageHeight: serializer.fromJson(json['imageHeight']), - boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), - boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), - boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), - boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), - sourceType: serializer.fromJson(json['sourceType']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'assetId': serializer.toJson(assetId), - 'personId': serializer.toJson(personId), - 'imageWidth': serializer.toJson(imageWidth), - 'imageHeight': serializer.toJson(imageHeight), - 'boundingBoxX1': serializer.toJson(boundingBoxX1), - 'boundingBoxY1': serializer.toJson(boundingBoxY1), - 'boundingBoxX2': serializer.toJson(boundingBoxX2), - 'boundingBoxY2': serializer.toJson(boundingBoxY2), - 'sourceType': serializer.toJson(sourceType), - }; - } - - AssetFaceEntityData copyWith({ - String? id, - String? assetId, - Value personId = const Value.absent(), - int? imageWidth, - int? imageHeight, - int? boundingBoxX1, - int? boundingBoxY1, - int? boundingBoxX2, - int? boundingBoxY2, - String? sourceType, - }) => AssetFaceEntityData( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId.present ? personId.value : this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { - return AssetFaceEntityData( - id: data.id.present ? data.id.value : this.id, - assetId: data.assetId.present ? data.assetId.value : this.assetId, - personId: data.personId.present ? data.personId.value : this.personId, - imageWidth: data.imageWidth.present - ? data.imageWidth.value - : this.imageWidth, - imageHeight: data.imageHeight.present - ? data.imageHeight.value - : this.imageHeight, - boundingBoxX1: data.boundingBoxX1.present - ? data.boundingBoxX1.value - : this.boundingBoxX1, - boundingBoxY1: data.boundingBoxY1.present - ? data.boundingBoxY1.value - : this.boundingBoxY1, - boundingBoxX2: data.boundingBoxX2.present - ? data.boundingBoxX2.value - : this.boundingBoxX2, - boundingBoxY2: data.boundingBoxY2.present - ? data.boundingBoxY2.value - : this.boundingBoxY2, - sourceType: data.sourceType.present - ? data.sourceType.value - : this.sourceType, - ); - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityData(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash( - id, - assetId, - personId, - imageWidth, - imageHeight, - boundingBoxX1, - boundingBoxY1, - boundingBoxX2, - boundingBoxY2, - sourceType, - ); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is AssetFaceEntityData && - other.id == this.id && - other.assetId == this.assetId && - other.personId == this.personId && - other.imageWidth == this.imageWidth && - other.imageHeight == this.imageHeight && - other.boundingBoxX1 == this.boundingBoxX1 && - other.boundingBoxY1 == this.boundingBoxY1 && - other.boundingBoxX2 == this.boundingBoxX2 && - other.boundingBoxY2 == this.boundingBoxY2 && - other.sourceType == this.sourceType); -} - -class AssetFaceEntityCompanion extends UpdateCompanion { - final Value id; - final Value assetId; - final Value personId; - final Value imageWidth; - final Value imageHeight; - final Value boundingBoxX1; - final Value boundingBoxY1; - final Value boundingBoxX2; - final Value boundingBoxY2; - final Value sourceType; - const AssetFaceEntityCompanion({ - this.id = const Value.absent(), - this.assetId = const Value.absent(), - this.personId = const Value.absent(), - this.imageWidth = const Value.absent(), - this.imageHeight = const Value.absent(), - this.boundingBoxX1 = const Value.absent(), - this.boundingBoxY1 = const Value.absent(), - this.boundingBoxX2 = const Value.absent(), - this.boundingBoxY2 = const Value.absent(), - this.sourceType = const Value.absent(), - }); - AssetFaceEntityCompanion.insert({ - required String id, - required String assetId, - this.personId = const Value.absent(), - required int imageWidth, - required int imageHeight, - required int boundingBoxX1, - required int boundingBoxY1, - required int boundingBoxX2, - required int boundingBoxY2, - required String sourceType, - }) : id = Value(id), - assetId = Value(assetId), - imageWidth = Value(imageWidth), - imageHeight = Value(imageHeight), - boundingBoxX1 = Value(boundingBoxX1), - boundingBoxY1 = Value(boundingBoxY1), - boundingBoxX2 = Value(boundingBoxX2), - boundingBoxY2 = Value(boundingBoxY2), - sourceType = Value(sourceType); - static Insertable custom({ - Expression? id, - Expression? assetId, - Expression? personId, - Expression? imageWidth, - Expression? imageHeight, - Expression? boundingBoxX1, - Expression? boundingBoxY1, - Expression? boundingBoxX2, - Expression? boundingBoxY2, - Expression? sourceType, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (assetId != null) 'asset_id': assetId, - if (personId != null) 'person_id': personId, - if (imageWidth != null) 'image_width': imageWidth, - if (imageHeight != null) 'image_height': imageHeight, - if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, - if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, - if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, - if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, - if (sourceType != null) 'source_type': sourceType, - }); - } - - AssetFaceEntityCompanion copyWith({ - Value? id, - Value? assetId, - Value? personId, - Value? imageWidth, - Value? imageHeight, - Value? boundingBoxX1, - Value? boundingBoxY1, - Value? boundingBoxX2, - Value? boundingBoxY2, - Value? sourceType, - }) { - return AssetFaceEntityCompanion( - id: id ?? this.id, - assetId: assetId ?? this.assetId, - personId: personId ?? this.personId, - imageWidth: imageWidth ?? this.imageWidth, - imageHeight: imageHeight ?? this.imageHeight, - boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, - boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, - boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, - boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, - sourceType: sourceType ?? this.sourceType, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (assetId.present) { - map['asset_id'] = Variable(assetId.value); - } - if (personId.present) { - map['person_id'] = Variable(personId.value); - } - if (imageWidth.present) { - map['image_width'] = Variable(imageWidth.value); - } - if (imageHeight.present) { - map['image_height'] = Variable(imageHeight.value); - } - if (boundingBoxX1.present) { - map['bounding_box_x1'] = Variable(boundingBoxX1.value); - } - if (boundingBoxY1.present) { - map['bounding_box_y1'] = Variable(boundingBoxY1.value); - } - if (boundingBoxX2.present) { - map['bounding_box_x2'] = Variable(boundingBoxX2.value); - } - if (boundingBoxY2.present) { - map['bounding_box_y2'] = Variable(boundingBoxY2.value); - } - if (sourceType.present) { - map['source_type'] = Variable(sourceType.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('AssetFaceEntityCompanion(') - ..write('id: $id, ') - ..write('assetId: $assetId, ') - ..write('personId: $personId, ') - ..write('imageWidth: $imageWidth, ') - ..write('imageHeight: $imageHeight, ') - ..write('boundingBoxX1: $boundingBoxX1, ') - ..write('boundingBoxY1: $boundingBoxY1, ') - ..write('boundingBoxX2: $boundingBoxX2, ') - ..write('boundingBoxY2: $boundingBoxY2, ') - ..write('sourceType: $sourceType') - ..write(')')) - .toString(); - } -} - -class StoreEntity extends Table with TableInfo { - @override - final GeneratedDatabase attachedDatabase; - final String? _alias; - StoreEntity(this.attachedDatabase, [this._alias]); - late final GeneratedColumn id = GeneratedColumn( - 'id', - aliasedName, - false, - type: DriftSqlType.int, - requiredDuringInsert: true, - ); - late final GeneratedColumn stringValue = GeneratedColumn( - 'string_value', - aliasedName, - true, - type: DriftSqlType.string, - requiredDuringInsert: false, - ); - late final GeneratedColumn intValue = GeneratedColumn( - 'int_value', - aliasedName, - true, - type: DriftSqlType.int, - requiredDuringInsert: false, - ); - @override - List get $columns => [id, stringValue, intValue]; - @override - String get aliasedName => _alias ?? actualTableName; - @override - String get actualTableName => $name; - static const String $name = 'store_entity'; - @override - Set get $primaryKey => {id}; - @override - StoreEntityData map(Map data, {String? tablePrefix}) { - final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; - return StoreEntityData( - id: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}id'], - )!, - stringValue: attachedDatabase.typeMapping.read( - DriftSqlType.string, - data['${effectivePrefix}string_value'], - ), - intValue: attachedDatabase.typeMapping.read( - DriftSqlType.int, - data['${effectivePrefix}int_value'], - ), - ); - } - - @override - StoreEntity createAlias(String alias) { - return StoreEntity(attachedDatabase, alias); - } - - @override - bool get withoutRowId => true; - @override - bool get isStrict => true; -} - -class StoreEntityData extends DataClass implements Insertable { - final int id; - final String? stringValue; - final int? intValue; - const StoreEntityData({required this.id, this.stringValue, this.intValue}); - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - map['id'] = Variable(id); - if (!nullToAbsent || stringValue != null) { - map['string_value'] = Variable(stringValue); - } - if (!nullToAbsent || intValue != null) { - map['int_value'] = Variable(intValue); - } - return map; - } - - factory StoreEntityData.fromJson( - Map json, { - ValueSerializer? serializer, - }) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return StoreEntityData( - id: serializer.fromJson(json['id']), - stringValue: serializer.fromJson(json['stringValue']), - intValue: serializer.fromJson(json['intValue']), - ); - } - @override - Map toJson({ValueSerializer? serializer}) { - serializer ??= driftRuntimeOptions.defaultSerializer; - return { - 'id': serializer.toJson(id), - 'stringValue': serializer.toJson(stringValue), - 'intValue': serializer.toJson(intValue), - }; - } - - StoreEntityData copyWith({ - int? id, - Value stringValue = const Value.absent(), - Value intValue = const Value.absent(), - }) => StoreEntityData( - id: id ?? this.id, - stringValue: stringValue.present ? stringValue.value : this.stringValue, - intValue: intValue.present ? intValue.value : this.intValue, - ); - StoreEntityData copyWithCompanion(StoreEntityCompanion data) { - return StoreEntityData( - id: data.id.present ? data.id.value : this.id, - stringValue: data.stringValue.present - ? data.stringValue.value - : this.stringValue, - intValue: data.intValue.present ? data.intValue.value : this.intValue, - ); - } - - @override - String toString() { - return (StringBuffer('StoreEntityData(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } - - @override - int get hashCode => Object.hash(id, stringValue, intValue); - @override - bool operator ==(Object other) => - identical(this, other) || - (other is StoreEntityData && - other.id == this.id && - other.stringValue == this.stringValue && - other.intValue == this.intValue); -} - -class StoreEntityCompanion extends UpdateCompanion { - final Value id; - final Value stringValue; - final Value intValue; - const StoreEntityCompanion({ - this.id = const Value.absent(), - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }); - StoreEntityCompanion.insert({ - required int id, - this.stringValue = const Value.absent(), - this.intValue = const Value.absent(), - }) : id = Value(id); - static Insertable custom({ - Expression? id, - Expression? stringValue, - Expression? intValue, - }) { - return RawValuesInsertable({ - if (id != null) 'id': id, - if (stringValue != null) 'string_value': stringValue, - if (intValue != null) 'int_value': intValue, - }); - } - - StoreEntityCompanion copyWith({ - Value? id, - Value? stringValue, - Value? intValue, - }) { - return StoreEntityCompanion( - id: id ?? this.id, - stringValue: stringValue ?? this.stringValue, - intValue: intValue ?? this.intValue, - ); - } - - @override - Map toColumns(bool nullToAbsent) { - final map = {}; - if (id.present) { - map['id'] = Variable(id.value); - } - if (stringValue.present) { - map['string_value'] = Variable(stringValue.value); - } - if (intValue.present) { - map['int_value'] = Variable(intValue.value); - } - return map; - } - - @override - String toString() { - return (StringBuffer('StoreEntityCompanion(') - ..write('id: $id, ') - ..write('stringValue: $stringValue, ') - ..write('intValue: $intValue') - ..write(')')) - .toString(); - } -} - -class DatabaseAtV9 extends GeneratedDatabase { - DatabaseAtV9(QueryExecutor e) : super(e); - late final UserEntity userEntity = UserEntity(this); - late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); - late final StackEntity stackEntity = StackEntity(this); - late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); - late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); - late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); - late final LocalAlbumAssetEntity localAlbumAssetEntity = - LocalAlbumAssetEntity(this); - late final Index idxLocalAssetChecksum = Index( - 'idx_local_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', - ); - late final Index idxRemoteAssetOwnerChecksum = Index( - 'idx_remote_asset_owner_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', - ); - late final Index uQRemoteAssetsOwnerChecksum = Index( - 'UQ_remote_assets_owner_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', - ); - late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( - 'UQ_remote_assets_owner_library_checksum', - 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', - ); - late final Index idxRemoteAssetChecksum = Index( - 'idx_remote_asset_checksum', - 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', - ); - late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); - late final PartnerEntity partnerEntity = PartnerEntity(this); - late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); - late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = - RemoteAlbumAssetEntity(this); - late final RemoteAlbumUserEntity remoteAlbumUserEntity = - RemoteAlbumUserEntity(this); - late final MemoryEntity memoryEntity = MemoryEntity(this); - late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); - late final PersonEntity personEntity = PersonEntity(this); - late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); - late final StoreEntity storeEntity = StoreEntity(this); - late final Index idxLatLng = Index( - 'idx_lat_lng', - 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', - ); - @override - Iterable> get allTables => - allSchemaEntities.whereType>(); - @override - List get allSchemaEntities => [ - userEntity, - remoteAssetEntity, - stackEntity, - localAssetEntity, - remoteAlbumEntity, - localAlbumEntity, - localAlbumAssetEntity, - idxLocalAssetChecksum, - idxRemoteAssetOwnerChecksum, - uQRemoteAssetsOwnerChecksum, - uQRemoteAssetsOwnerLibraryChecksum, - idxRemoteAssetChecksum, - userMetadataEntity, - partnerEntity, - remoteExifEntity, - remoteAlbumAssetEntity, - remoteAlbumUserEntity, - memoryEntity, - memoryAssetEntity, - personEntity, - assetFaceEntity, - storeEntity, - idxLatLng, - ]; - @override - int get schemaVersion => 9; - @override - DriftDatabaseOptions get options => - const DriftDatabaseOptions(storeDateTimeAsText: true); -} From 6c01b4f5d8ed632efa901b843ef51096adbbefb4 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 29 Jul 2026 13:33:30 -0700 Subject: [PATCH 10/69] chore(mobile): remove OpenAPI generated code (#30287) * chore(mobile): remove OpenAPI generated code * Don't reference generated files for CI checks --- .gitattributes | 5 - .github/workflows/test.yml | 1 - .gitignore | 5 +- docs/docs/api.md | 2 +- mobile/analysis_options.yaml | 2 +- mobile/openapi/.gitignore | 19 - mobile/openapi/.openapi-generator-ignore | 23 - mobile/openapi/.openapi-generator/VERSION | 1 - mobile/openapi/.travis.yml | 14 - mobile/openapi/README.md | 748 ------- mobile/openapi/git_push.sh | 57 - mobile/openapi/lib/api.dart | 457 ---- mobile/openapi/lib/api/activities_api.dart | 291 --- mobile/openapi/lib/api/albums_api.dart | 858 -------- mobile/openapi/lib/api/api_keys_api.dart | 346 ---- mobile/openapi/lib/api/assets_api.dart | 1834 ----------------- .../lib/api/authentication_admin_api.dart | 59 - .../openapi/lib/api/authentication_api.dart | 888 -------- .../lib/api/database_backups_admin_api.dart | 276 --- mobile/openapi/lib/api/deprecated_api.dart | 1032 ---------- mobile/openapi/lib/api/download_api.dart | 162 -- mobile/openapi/lib/api/duplicates_api.dart | 229 -- mobile/openapi/lib/api/faces_api.dart | 247 --- mobile/openapi/lib/api/jobs_api.dart | 178 -- mobile/openapi/lib/api/libraries_api.dart | 467 ----- .../lib/api/maintenance_admin_api.dart | 514 ----- mobile/openapi/lib/api/map_api.dart | 200 -- mobile/openapi/lib/api/memories_api.dart | 586 ------ .../lib/api/notifications_admin_api.dart | 194 -- mobile/openapi/lib/api/notifications_api.dart | 375 ---- mobile/openapi/lib/api/partners_api.dart | 307 --- mobile/openapi/lib/api/people_api.dart | 699 ------- mobile/openapi/lib/api/plugins_api.dart | 363 ---- mobile/openapi/lib/api/queues_api.dart | 315 --- mobile/openapi/lib/api/search_api.dart | 953 --------- mobile/openapi/lib/api/server_api.dart | 707 ------- mobile/openapi/lib/api/sessions_api.dart | 330 --- mobile/openapi/lib/api/shared_links_api.dart | 590 ------ mobile/openapi/lib/api/stacks_api.dart | 415 ---- mobile/openapi/lib/api/sync_api.dart | 217 -- mobile/openapi/lib/api/system_config_api.dart | 222 -- .../openapi/lib/api/system_metadata_api.dart | 214 -- mobile/openapi/lib/api/tags_api.dart | 544 ----- mobile/openapi/lib/api/timeline_api.dart | 398 ---- mobile/openapi/lib/api/trash_api.dart | 173 -- mobile/openapi/lib/api/users_admin_api.dart | 739 ------- mobile/openapi/lib/api/users_api.dart | 881 -------- mobile/openapi/lib/api/views_api.dart | 132 -- mobile/openapi/lib/api/workflows_api.dart | 457 ---- mobile/openapi/lib/api_client.dart | 999 --------- mobile/openapi/lib/api_exception.dart | 33 - mobile/openapi/lib/api_helper.dart | 269 --- mobile/openapi/lib/auth/api_key_auth.dart | 40 - mobile/openapi/lib/auth/authentication.dart | 17 - mobile/openapi/lib/auth/http_basic_auth.dart | 26 - mobile/openapi/lib/auth/http_bearer_auth.dart | 49 - mobile/openapi/lib/auth/oauth.dart | 24 - .../lib/model/activity_create_dto.dart | 142 -- .../lib/model/activity_response_dto.dart | 151 -- .../activity_statistics_response_dto.dart | 115 -- mobile/openapi/lib/model/add_users_dto.dart | 100 - .../model/admin_onboarding_update_dto.dart | 100 - .../openapi/lib/model/album_response_dto.dart | 274 --- .../model/album_statistics_response_dto.dart | 127 -- .../openapi/lib/model/album_user_add_dto.dart | 116 -- .../lib/model/album_user_create_dto.dart | 108 - .../lib/model/album_user_response_dto.dart | 107 - mobile/openapi/lib/model/album_user_role.dart | 92 - .../lib/model/albums_add_assets_dto.dart | 113 - .../model/albums_add_assets_response_dto.dart | 116 -- mobile/openapi/lib/model/albums_response.dart | 99 - mobile/openapi/lib/model/albums_update.dart | 107 - .../openapi/lib/model/api_key_create_dto.dart | 117 -- .../model/api_key_create_response_dto.dart | 108 - .../lib/model/api_key_response_dto.dart | 140 -- .../openapi/lib/model/api_key_update_dto.dart | 119 -- .../lib/model/asset_bulk_delete_dto.dart | 119 -- .../lib/model/asset_bulk_update_dto.dart | 271 --- .../model/asset_bulk_upload_check_dto.dart | 100 - .../model/asset_bulk_upload_check_item.dart | 109 - .../asset_bulk_upload_check_response_dto.dart | 100 - .../model/asset_bulk_upload_check_result.dart | 158 -- mobile/openapi/lib/model/asset_copy_dto.dart | 164 -- .../openapi/lib/model/asset_edit_action.dart | 92 - .../lib/model/asset_edit_action_item_dto.dart | 107 - ...asset_edit_action_item_dto_parameters.dart | 156 -- .../asset_edit_action_item_response_dto.dart | 116 -- .../lib/model/asset_edits_create_dto.dart | 100 - .../lib/model/asset_edits_response_dto.dart | 109 - .../lib/model/asset_face_create_dto.dart | 181 -- .../lib/model/asset_face_delete_dto.dart | 100 - .../lib/model/asset_face_response_dto.dart | 200 -- .../lib/model/asset_face_update_dto.dart | 100 - .../lib/model/asset_face_update_item.dart | 109 - .../lib/model/asset_id_error_reason.dart | 92 - mobile/openapi/lib/model/asset_ids_dto.dart | 102 - .../lib/model/asset_ids_response_dto.dart | 125 -- mobile/openapi/lib/model/asset_job_name.dart | 94 - mobile/openapi/lib/model/asset_jobs_dto.dart | 110 - .../lib/model/asset_media_response_dto.dart | 108 - .../openapi/lib/model/asset_media_size.dart | 94 - .../openapi/lib/model/asset_media_status.dart | 90 - .../model/asset_metadata_bulk_delete_dto.dart | 100 - .../asset_metadata_bulk_delete_item_dto.dart | 109 - .../asset_metadata_bulk_response_dto.dart | 129 -- .../model/asset_metadata_bulk_upsert_dto.dart | 100 - .../asset_metadata_bulk_upsert_item_dto.dart | 118 -- .../model/asset_metadata_response_dto.dart | 120 -- .../lib/model/asset_metadata_upsert_dto.dart | 100 - .../model/asset_metadata_upsert_item_dto.dart | 109 - .../lib/model/asset_ocr_response_dto.dart | 206 -- mobile/openapi/lib/model/asset_order.dart | 90 - mobile/openapi/lib/model/asset_order_by.dart | 90 - .../lib/model/asset_reject_reason.dart | 90 - .../openapi/lib/model/asset_response_dto.dart | 441 ---- .../lib/model/asset_stack_response_dto.dart | 121 -- .../lib/model/asset_stats_response_dto.dart | 127 -- mobile/openapi/lib/model/asset_type_enum.dart | 94 - .../lib/model/asset_upload_action.dart | 90 - .../openapi/lib/model/asset_visibility.dart | 94 - mobile/openapi/lib/model/audio_codec.dart | 94 - .../lib/model/auth_status_response_dto.dart | 152 -- mobile/openapi/lib/model/avatar_update.dart | 107 - .../lib/model/bulk_id_error_reason.dart | 96 - .../lib/model/bulk_id_response_dto.dart | 141 -- mobile/openapi/lib/model/bulk_ids_dto.dart | 102 - .../model/calendar_heatmap_response_dto.dart | 129 -- ...dar_heatmap_response_dto_series_inner.dart | 112 - .../lib/model/calendar_heatmap_type.dart | 90 - mobile/openapi/lib/model/cast_response.dart | 100 - mobile/openapi/lib/model/cast_update.dart | 108 - .../lib/model/change_password_dto.dart | 120 -- mobile/openapi/lib/model/clip_config.dart | 109 - mobile/openapi/lib/model/colorspace.dart | 90 - .../model/contributor_count_response_dto.dart | 112 - mobile/openapi/lib/model/cq_mode.dart | 92 - .../openapi/lib/model/create_album_dto.dart | 141 -- .../openapi/lib/model/create_library_dto.dart | 143 -- .../create_profile_image_response_dto.dart | 120 -- mobile/openapi/lib/model/crop_parameters.dart | 139 -- .../lib/model/database_backup_config.dart | 121 -- .../lib/model/database_backup_delete_dto.dart | 102 - .../lib/model/database_backup_dto.dart | 121 -- .../database_backup_list_response_dto.dart | 100 - .../lib/model/download_archive_dto.dart | 119 -- .../lib/model/download_archive_info.dart | 114 - .../openapi/lib/model/download_info_dto.dart | 158 -- .../openapi/lib/model/download_response.dart | 112 - .../lib/model/download_response_dto.dart | 112 - mobile/openapi/lib/model/download_update.dart | 128 -- .../lib/model/duplicate_detection_config.dart | 112 - .../lib/model/duplicate_resolve_dto.dart | 100 - .../model/duplicate_resolve_group_dto.dart | 121 -- .../lib/model/duplicate_response_dto.dart | 120 -- .../model/email_notifications_response.dart | 118 -- .../lib/model/email_notifications_update.dart | 142 -- .../openapi/lib/model/exif_response_dto.dart | 348 ---- mobile/openapi/lib/model/face_dto.dart | 100 - .../lib/model/facial_recognition_config.dart | 145 -- .../openapi/lib/model/folders_response.dart | 109 - mobile/openapi/lib/model/folders_update.dart | 125 -- .../lib/model/hls_video_resolution.dart | 96 - mobile/openapi/lib/model/image_format.dart | 90 - .../openapi/lib/model/integrity_report.dart | 92 - .../model/integrity_report_response_dto.dart | 115 -- ...grity_report_response_dto_items_inner.dart | 117 -- ...integrity_report_summary_response_dto.dart | 121 -- mobile/openapi/lib/model/job_create_dto.dart | 99 - mobile/openapi/lib/model/job_name.dart | 218 -- .../openapi/lib/model/job_settings_dto.dart | 103 - .../lib/model/library_response_dto.dart | 189 -- .../lib/model/library_stats_response_dto.dart | 139 -- mobile/openapi/lib/model/license_key_dto.dart | 109 - mobile/openapi/lib/model/log_level.dart | 98 - .../lib/model/login_credential_dto.dart | 109 - .../openapi/lib/model/login_response_dto.dart | 163 -- .../lib/model/logout_response_dto.dart | 109 - ...hine_learning_availability_checks_dto.dart | 120 -- .../openapi/lib/model/maintenance_action.dart | 94 - .../lib/model/maintenance_auth_dto.dart | 100 - ...intenance_detect_install_response_dto.dart | 99 - ...nce_detect_install_storage_folder_dto.dart | 129 -- .../lib/model/maintenance_login_dto.dart | 108 - .../maintenance_status_response_dto.dart | 157 -- mobile/openapi/lib/model/manual_job_name.dart | 116 -- .../lib/model/map_marker_response_dto.dart | 157 -- .../map_reverse_geocode_response_dto.dart | 130 -- .../openapi/lib/model/memories_response.dart | 112 - mobile/openapi/lib/model/memories_update.dart | 128 -- .../openapi/lib/model/memory_create_dto.dart | 205 -- .../lib/model/memory_response_dto.dart | 251 --- .../lib/model/memory_search_order.dart | 92 - .../model/memory_statistics_response_dto.dart | 103 - mobile/openapi/lib/model/memory_type.dart | 88 - .../openapi/lib/model/memory_update_dto.dart | 146 -- .../openapi/lib/model/merge_person_dto.dart | 102 - .../lib/model/metadata_search_dto.dart | 767 ------- mobile/openapi/lib/model/mirror_axis.dart | 90 - .../openapi/lib/model/mirror_parameters.dart | 99 - .../lib/model/notification_create_dto.dart | 176 -- .../model/notification_delete_all_dto.dart | 102 - .../openapi/lib/model/notification_dto.dart | 183 -- .../openapi/lib/model/notification_level.dart | 94 - .../openapi/lib/model/notification_type.dart | 98 - .../model/notification_update_all_dto.dart | 115 -- .../lib/model/notification_update_dto.dart | 104 - .../model/o_auth_authorize_response_dto.dart | 100 - .../lib/model/o_auth_callback_dto.dart | 134 -- .../openapi/lib/model/o_auth_config_dto.dart | 134 -- .../o_auth_token_endpoint_auth_method.dart | 90 - mobile/openapi/lib/model/ocr_config.dart | 145 -- mobile/openapi/lib/model/on_this_day_dto.dart | 103 - mobile/openapi/lib/model/onboarding_dto.dart | 100 - .../lib/model/onboarding_response_dto.dart | 100 - .../openapi/lib/model/partner_create_dto.dart | 100 - .../openapi/lib/model/partner_direction.dart | 90 - .../lib/model/partner_response_dto.dart | 161 -- .../openapi/lib/model/partner_update_dto.dart | 100 - mobile/openapi/lib/model/people_response.dart | 129 -- .../lib/model/people_response_dto.dart | 140 -- mobile/openapi/lib/model/people_update.dart | 145 -- .../openapi/lib/model/people_update_dto.dart | 100 - .../openapi/lib/model/people_update_item.dart | 190 -- mobile/openapi/lib/model/permission.dart | 396 ---- .../openapi/lib/model/person_create_dto.dart | 164 -- .../lib/model/person_response_dto.dart | 191 -- .../model/person_statistics_response_dto.dart | 103 - .../openapi/lib/model/person_update_dto.dart | 181 -- .../lib/model/pin_code_change_dto.dart | 134 -- .../openapi/lib/model/pin_code_reset_dto.dart | 125 -- .../openapi/lib/model/pin_code_setup_dto.dart | 100 - .../lib/model/places_response_dto.dart | 152 -- .../lib/model/plugin_method_response_dto.dart | 171 -- .../lib/model/plugin_response_dto.dart | 172 -- .../model/plugin_template_response_dto.dart | 146 -- .../plugin_template_step_response_dto.dart | 130 -- .../openapi/lib/model/purchase_response.dart | 109 - mobile/openapi/lib/model/purchase_update.dart | 125 -- mobile/openapi/lib/model/queue_command.dart | 96 - .../openapi/lib/model/queue_command_dto.dart | 116 -- .../openapi/lib/model/queue_delete_dto.dart | 108 - .../lib/model/queue_job_response_dto.dart | 137 -- .../openapi/lib/model/queue_job_status.dart | 98 - mobile/openapi/lib/model/queue_name.dart | 124 -- .../openapi/lib/model/queue_response_dto.dart | 116 -- .../lib/model/queue_response_legacy_dto.dart | 107 - .../lib/model/queue_statistics_dto.dart | 163 -- .../lib/model/queue_status_legacy_dto.dart | 109 - .../openapi/lib/model/queue_update_dto.dart | 108 - .../lib/model/queues_response_legacy_dto.dart | 243 --- .../openapi/lib/model/random_search_dto.dart | 595 ------ .../openapi/lib/model/ratings_response.dart | 100 - mobile/openapi/lib/model/ratings_update.dart | 108 - mobile/openapi/lib/model/reaction_level.dart | 90 - mobile/openapi/lib/model/reaction_type.dart | 90 - .../lib/model/recently_added_response.dart | 100 - .../lib/model/recently_added_update.dart | 108 - mobile/openapi/lib/model/release_channel.dart | 90 - .../openapi/lib/model/release_event_v1.dart | 133 -- mobile/openapi/lib/model/release_type.dart | 100 - .../reverse_geocoding_state_response_dto.dart | 117 -- .../openapi/lib/model/rotate_parameters.dart | 100 - .../lib/model/search_album_response_dto.dart | 131 -- .../lib/model/search_asset_response_dto.dart | 144 -- .../lib/model/search_explore_item.dart | 108 - .../model/search_explore_response_dto.dart | 108 - .../search_facet_count_response_dto.dart | 112 - .../lib/model/search_facet_response_dto.dart | 108 - .../lib/model/search_response_dto.dart | 107 - .../model/search_statistics_response_dto.dart | 103 - .../lib/model/search_suggestion_type.dart | 98 - .../lib/model/server_about_response_dto.dart | 424 ---- .../lib/model/server_apk_links_dto.dart | 127 -- .../openapi/lib/model/server_config_dto.dart | 208 -- .../lib/model/server_features_dto.dart | 235 --- .../server_media_types_response_dto.dart | 124 -- .../lib/model/server_ping_response.dart | 99 - .../lib/model/server_stats_response_dto.dart | 160 -- .../model/server_storage_response_dto.dart | 163 -- .../server_version_history_response_dto.dart | 120 -- .../model/server_version_response_dto.dart | 143 -- .../openapi/lib/model/session_create_dto.dart | 145 -- .../model/session_create_response_dto.dart | 193 -- .../lib/model/session_response_dto.dart | 184 -- .../openapi/lib/model/session_unlock_dto.dart | 125 -- .../openapi/lib/model/session_update_dto.dart | 108 - .../lib/model/set_maintenance_mode_dto.dart | 116 -- .../lib/model/shared_link_create_dto.dart | 214 -- .../lib/model/shared_link_edit_dto.dart | 188 -- .../lib/model/shared_link_login_dto.dart | 100 - .../lib/model/shared_link_response_dto.dart | 242 --- .../openapi/lib/model/shared_link_type.dart | 90 - .../lib/model/shared_links_response.dart | 109 - .../lib/model/shared_links_update.dart | 125 -- mobile/openapi/lib/model/sign_up_dto.dart | 118 -- .../openapi/lib/model/smart_search_dto.dart | 632 ------ mobile/openapi/lib/model/source_type.dart | 92 - .../openapi/lib/model/stack_create_dto.dart | 102 - .../openapi/lib/model/stack_response_dto.dart | 117 -- .../openapi/lib/model/stack_update_dto.dart | 108 - .../lib/model/statistics_search_dto.dart | 524 ----- mobile/openapi/lib/model/storage_folder.dart | 98 - .../lib/model/sync_ack_delete_dto.dart | 102 - mobile/openapi/lib/model/sync_ack_dto.dart | 108 - .../openapi/lib/model/sync_ack_set_dto.dart | 102 - .../lib/model/sync_album_delete_v1.dart | 100 - .../model/sync_album_to_asset_delete_v1.dart | 109 - .../lib/model/sync_album_to_asset_v1.dart | 109 - .../lib/model/sync_album_user_delete_v1.dart | 109 - .../openapi/lib/model/sync_album_user_v1.dart | 117 -- mobile/openapi/lib/model/sync_album_v1.dart | 179 -- mobile/openapi/lib/model/sync_album_v2.dart | 170 -- .../lib/model/sync_asset_delete_v1.dart | 100 - .../lib/model/sync_asset_edit_delete_v1.dart | 100 - .../openapi/lib/model/sync_asset_edit_v1.dart | 138 -- .../openapi/lib/model/sync_asset_exif_v1.dart | 431 ---- .../lib/model/sync_asset_face_delete_v1.dart | 100 - .../openapi/lib/model/sync_asset_face_v1.dart | 203 -- .../openapi/lib/model/sync_asset_face_v2.dart | 227 -- .../model/sync_asset_metadata_delete_v1.dart | 109 - .../lib/model/sync_asset_metadata_v1.dart | 118 -- .../lib/model/sync_asset_ocr_delete_v1.dart | 120 -- .../openapi/lib/model/sync_asset_ocr_v1.dart | 217 -- mobile/openapi/lib/model/sync_asset_v1.dart | 333 --- mobile/openapi/lib/model/sync_asset_v2.dart | 336 --- .../openapi/lib/model/sync_auth_user_v1.dart | 235 --- .../openapi/lib/model/sync_entity_type.dart | 204 -- .../model/sync_memory_asset_delete_v1.dart | 109 - .../lib/model/sync_memory_asset_v1.dart | 109 - .../lib/model/sync_memory_delete_v1.dart | 100 - mobile/openapi/lib/model/sync_memory_v1.dart | 228 -- .../lib/model/sync_partner_delete_v1.dart | 109 - mobile/openapi/lib/model/sync_partner_v1.dart | 118 -- .../lib/model/sync_person_delete_v1.dart | 100 - mobile/openapi/lib/model/sync_person_v1.dart | 199 -- .../openapi/lib/model/sync_request_type.dart | 140 -- .../lib/model/sync_stack_delete_v1.dart | 100 - mobile/openapi/lib/model/sync_stack_v1.dart | 140 -- mobile/openapi/lib/model/sync_stream_dto.dart | 117 -- .../lib/model/sync_user_delete_v1.dart | 100 - .../model/sync_user_metadata_delete_v1.dart | 108 - .../lib/model/sync_user_metadata_v1.dart | 117 -- mobile/openapi/lib/model/sync_user_v1.dart | 163 -- .../lib/model/system_config_backups_dto.dart | 99 - .../openapi/lib/model/system_config_dto.dart | 267 --- .../lib/model/system_config_f_fmpeg_dto.dart | 297 --- .../system_config_f_fmpeg_realtime_dto.dart | 118 -- .../lib/model/system_config_faces_dto.dart | 100 - ...m_config_generated_fullsize_image_dto.dart | 137 -- .../system_config_generated_image_dto.dart | 140 -- .../lib/model/system_config_image_dto.dart | 132 -- .../model/system_config_integrity_checks.dart | 115 -- .../system_config_integrity_checksum_job.dart | 133 -- .../model/system_config_integrity_job.dart | 109 - .../lib/model/system_config_job_dto.dart | 211 -- .../lib/model/system_config_library_dto.dart | 107 - .../model/system_config_library_scan_dto.dart | 109 - .../system_config_library_watch_dto.dart | 100 - .../lib/model/system_config_logging_dto.dart | 108 - .../system_config_machine_learning_dto.dart | 151 -- .../lib/model/system_config_map_dto.dart | 118 -- .../lib/model/system_config_metadata_dto.dart | 99 - .../system_config_new_version_check_dto.dart | 108 - .../system_config_nightly_tasks_dto.dart | 145 -- .../system_config_notifications_dto.dart | 99 - .../lib/model/system_config_o_auth_dto.dart | 289 --- .../system_config_password_login_dto.dart | 100 - .../system_config_reverse_geocoding_dto.dart | 100 - .../lib/model/system_config_server_dto.dart | 118 -- .../lib/model/system_config_smtp_dto.dart | 126 -- .../system_config_smtp_transport_dto.dart | 148 -- .../system_config_storage_template_dto.dart | 118 -- .../system_config_template_emails_dto.dart | 118 -- ...em_config_template_storage_option_dto.dart | 179 -- .../model/system_config_templates_dto.dart | 99 - .../lib/model/system_config_theme_dto.dart | 100 - .../lib/model/system_config_trash_dto.dart | 112 - .../lib/model/system_config_user_dto.dart | 103 - .../lib/model/tag_bulk_assets_dto.dart | 113 - .../model/tag_bulk_assets_response_dto.dart | 103 - mobile/openapi/lib/model/tag_create_dto.dart | 122 -- .../openapi/lib/model/tag_response_dto.dart | 170 -- mobile/openapi/lib/model/tag_update_dto.dart | 102 - mobile/openapi/lib/model/tag_upsert_dto.dart | 102 - mobile/openapi/lib/model/tags_response.dart | 109 - mobile/openapi/lib/model/tags_update.dart | 125 -- mobile/openapi/lib/model/template_dto.dart | 100 - .../lib/model/template_response_dto.dart | 109 - .../lib/model/test_email_response_dto.dart | 100 - .../model/time_bucket_asset_response_dto.dart | 310 --- .../lib/model/time_buckets_response_dto.dart | 112 - mobile/openapi/lib/model/tone_mapping.dart | 94 - .../openapi/lib/model/transcode_hw_accel.dart | 96 - .../openapi/lib/model/transcode_policy.dart | 96 - .../openapi/lib/model/trash_response_dto.dart | 103 - .../openapi/lib/model/update_album_dto.dart | 175 -- .../lib/model/update_album_user_dto.dart | 99 - .../openapi/lib/model/update_asset_dto.dart | 223 -- .../openapi/lib/model/update_library_dto.dart | 134 -- .../openapi/lib/model/usage_by_user_dto.dart | 185 -- .../lib/model/user_admin_create_dto.dart | 215 -- .../lib/model/user_admin_delete_dto.dart | 108 - .../lib/model/user_admin_response_dto.dart | 273 --- .../lib/model/user_admin_update_dto.dart | 222 -- .../openapi/lib/model/user_avatar_color.dart | 106 - mobile/openapi/lib/model/user_license.dart | 120 -- .../openapi/lib/model/user_metadata_key.dart | 92 - .../model/user_preferences_response_dto.dart | 187 -- .../model/user_preferences_update_dto.dart | 299 --- .../openapi/lib/model/user_response_dto.dart | 144 -- mobile/openapi/lib/model/user_status.dart | 92 - .../openapi/lib/model/user_update_me_dto.dart | 152 -- .../validate_access_token_response_dto.dart | 100 - .../lib/model/validate_library_dto.dart | 117 -- ...date_library_import_path_response_dto.dart | 126 -- .../model/validate_library_response_dto.dart | 102 - .../version_check_state_response_dto.dart | 117 -- mobile/openapi/lib/model/video_codec.dart | 94 - mobile/openapi/lib/model/video_container.dart | 94 - .../lib/model/workflow_create_dto.dart | 148 -- .../lib/model/workflow_response_dto.dart | 170 -- .../model/workflow_share_response_dto.dart | 134 -- .../lib/model/workflow_share_step_dto.dart | 130 -- .../openapi/lib/model/workflow_step_dto.dart | 130 -- .../openapi/lib/model/workflow_trigger.dart | 90 - .../model/workflow_trigger_response_dto.dart | 108 - mobile/openapi/lib/model/workflow_type.dart | 88 - .../lib/model/workflow_update_dto.dart | 156 -- mobile/openapi/lib/optional.dart | 119 -- mobile/openapi/pubspec.yaml | 17 - mobile/pubspec.lock | 2 +- mobile/pubspec.yaml | 4 +- open-api/bin/generate-dart-sdk.sh | 16 +- renovate.json | 1 - 434 files changed, 14 insertions(+), 71478 deletions(-) delete mode 100644 mobile/openapi/.gitignore delete mode 100644 mobile/openapi/.openapi-generator-ignore delete mode 100644 mobile/openapi/.openapi-generator/VERSION delete mode 100644 mobile/openapi/.travis.yml delete mode 100644 mobile/openapi/README.md delete mode 100644 mobile/openapi/git_push.sh delete mode 100644 mobile/openapi/lib/api.dart delete mode 100644 mobile/openapi/lib/api/activities_api.dart delete mode 100644 mobile/openapi/lib/api/albums_api.dart delete mode 100644 mobile/openapi/lib/api/api_keys_api.dart delete mode 100644 mobile/openapi/lib/api/assets_api.dart delete mode 100644 mobile/openapi/lib/api/authentication_admin_api.dart delete mode 100644 mobile/openapi/lib/api/authentication_api.dart delete mode 100644 mobile/openapi/lib/api/database_backups_admin_api.dart delete mode 100644 mobile/openapi/lib/api/deprecated_api.dart delete mode 100644 mobile/openapi/lib/api/download_api.dart delete mode 100644 mobile/openapi/lib/api/duplicates_api.dart delete mode 100644 mobile/openapi/lib/api/faces_api.dart delete mode 100644 mobile/openapi/lib/api/jobs_api.dart delete mode 100644 mobile/openapi/lib/api/libraries_api.dart delete mode 100644 mobile/openapi/lib/api/maintenance_admin_api.dart delete mode 100644 mobile/openapi/lib/api/map_api.dart delete mode 100644 mobile/openapi/lib/api/memories_api.dart delete mode 100644 mobile/openapi/lib/api/notifications_admin_api.dart delete mode 100644 mobile/openapi/lib/api/notifications_api.dart delete mode 100644 mobile/openapi/lib/api/partners_api.dart delete mode 100644 mobile/openapi/lib/api/people_api.dart delete mode 100644 mobile/openapi/lib/api/plugins_api.dart delete mode 100644 mobile/openapi/lib/api/queues_api.dart delete mode 100644 mobile/openapi/lib/api/search_api.dart delete mode 100644 mobile/openapi/lib/api/server_api.dart delete mode 100644 mobile/openapi/lib/api/sessions_api.dart delete mode 100644 mobile/openapi/lib/api/shared_links_api.dart delete mode 100644 mobile/openapi/lib/api/stacks_api.dart delete mode 100644 mobile/openapi/lib/api/sync_api.dart delete mode 100644 mobile/openapi/lib/api/system_config_api.dart delete mode 100644 mobile/openapi/lib/api/system_metadata_api.dart delete mode 100644 mobile/openapi/lib/api/tags_api.dart delete mode 100644 mobile/openapi/lib/api/timeline_api.dart delete mode 100644 mobile/openapi/lib/api/trash_api.dart delete mode 100644 mobile/openapi/lib/api/users_admin_api.dart delete mode 100644 mobile/openapi/lib/api/users_api.dart delete mode 100644 mobile/openapi/lib/api/views_api.dart delete mode 100644 mobile/openapi/lib/api/workflows_api.dart delete mode 100644 mobile/openapi/lib/api_client.dart delete mode 100644 mobile/openapi/lib/api_exception.dart delete mode 100644 mobile/openapi/lib/api_helper.dart delete mode 100644 mobile/openapi/lib/auth/api_key_auth.dart delete mode 100644 mobile/openapi/lib/auth/authentication.dart delete mode 100644 mobile/openapi/lib/auth/http_basic_auth.dart delete mode 100644 mobile/openapi/lib/auth/http_bearer_auth.dart delete mode 100644 mobile/openapi/lib/auth/oauth.dart delete mode 100644 mobile/openapi/lib/model/activity_create_dto.dart delete mode 100644 mobile/openapi/lib/model/activity_response_dto.dart delete mode 100644 mobile/openapi/lib/model/activity_statistics_response_dto.dart delete mode 100644 mobile/openapi/lib/model/add_users_dto.dart delete mode 100644 mobile/openapi/lib/model/admin_onboarding_update_dto.dart delete mode 100644 mobile/openapi/lib/model/album_response_dto.dart delete mode 100644 mobile/openapi/lib/model/album_statistics_response_dto.dart delete mode 100644 mobile/openapi/lib/model/album_user_add_dto.dart delete mode 100644 mobile/openapi/lib/model/album_user_create_dto.dart delete mode 100644 mobile/openapi/lib/model/album_user_response_dto.dart delete mode 100644 mobile/openapi/lib/model/album_user_role.dart delete mode 100644 mobile/openapi/lib/model/albums_add_assets_dto.dart delete mode 100644 mobile/openapi/lib/model/albums_add_assets_response_dto.dart delete mode 100644 mobile/openapi/lib/model/albums_response.dart delete mode 100644 mobile/openapi/lib/model/albums_update.dart delete mode 100644 mobile/openapi/lib/model/api_key_create_dto.dart delete mode 100644 mobile/openapi/lib/model/api_key_create_response_dto.dart delete mode 100644 mobile/openapi/lib/model/api_key_response_dto.dart delete mode 100644 mobile/openapi/lib/model/api_key_update_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_bulk_delete_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_bulk_update_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_bulk_upload_check_item.dart delete mode 100644 mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_bulk_upload_check_result.dart delete mode 100644 mobile/openapi/lib/model/asset_copy_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_edit_action.dart delete mode 100644 mobile/openapi/lib/model/asset_edit_action_item_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart delete mode 100644 mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_edits_create_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_edits_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_face_create_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_face_delete_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_face_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_face_update_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_face_update_item.dart delete mode 100644 mobile/openapi/lib/model/asset_id_error_reason.dart delete mode 100644 mobile/openapi/lib/model/asset_ids_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_ids_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_job_name.dart delete mode 100644 mobile/openapi/lib/model/asset_jobs_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_media_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_media_size.dart delete mode 100644 mobile/openapi/lib/model/asset_media_status.dart delete mode 100644 mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_metadata_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_metadata_upsert_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_ocr_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_order.dart delete mode 100644 mobile/openapi/lib/model/asset_order_by.dart delete mode 100644 mobile/openapi/lib/model/asset_reject_reason.dart delete mode 100644 mobile/openapi/lib/model/asset_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_stack_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_stats_response_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_type_enum.dart delete mode 100644 mobile/openapi/lib/model/asset_upload_action.dart delete mode 100644 mobile/openapi/lib/model/asset_visibility.dart delete mode 100644 mobile/openapi/lib/model/audio_codec.dart delete mode 100644 mobile/openapi/lib/model/auth_status_response_dto.dart delete mode 100644 mobile/openapi/lib/model/avatar_update.dart delete mode 100644 mobile/openapi/lib/model/bulk_id_error_reason.dart delete mode 100644 mobile/openapi/lib/model/bulk_id_response_dto.dart delete mode 100644 mobile/openapi/lib/model/bulk_ids_dto.dart delete mode 100644 mobile/openapi/lib/model/calendar_heatmap_response_dto.dart delete mode 100644 mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart delete mode 100644 mobile/openapi/lib/model/calendar_heatmap_type.dart delete mode 100644 mobile/openapi/lib/model/cast_response.dart delete mode 100644 mobile/openapi/lib/model/cast_update.dart delete mode 100644 mobile/openapi/lib/model/change_password_dto.dart delete mode 100644 mobile/openapi/lib/model/clip_config.dart delete mode 100644 mobile/openapi/lib/model/colorspace.dart delete mode 100644 mobile/openapi/lib/model/contributor_count_response_dto.dart delete mode 100644 mobile/openapi/lib/model/cq_mode.dart delete mode 100644 mobile/openapi/lib/model/create_album_dto.dart delete mode 100644 mobile/openapi/lib/model/create_library_dto.dart delete mode 100644 mobile/openapi/lib/model/create_profile_image_response_dto.dart delete mode 100644 mobile/openapi/lib/model/crop_parameters.dart delete mode 100644 mobile/openapi/lib/model/database_backup_config.dart delete mode 100644 mobile/openapi/lib/model/database_backup_delete_dto.dart delete mode 100644 mobile/openapi/lib/model/database_backup_dto.dart delete mode 100644 mobile/openapi/lib/model/database_backup_list_response_dto.dart delete mode 100644 mobile/openapi/lib/model/download_archive_dto.dart delete mode 100644 mobile/openapi/lib/model/download_archive_info.dart delete mode 100644 mobile/openapi/lib/model/download_info_dto.dart delete mode 100644 mobile/openapi/lib/model/download_response.dart delete mode 100644 mobile/openapi/lib/model/download_response_dto.dart delete mode 100644 mobile/openapi/lib/model/download_update.dart delete mode 100644 mobile/openapi/lib/model/duplicate_detection_config.dart delete mode 100644 mobile/openapi/lib/model/duplicate_resolve_dto.dart delete mode 100644 mobile/openapi/lib/model/duplicate_resolve_group_dto.dart delete mode 100644 mobile/openapi/lib/model/duplicate_response_dto.dart delete mode 100644 mobile/openapi/lib/model/email_notifications_response.dart delete mode 100644 mobile/openapi/lib/model/email_notifications_update.dart delete mode 100644 mobile/openapi/lib/model/exif_response_dto.dart delete mode 100644 mobile/openapi/lib/model/face_dto.dart delete mode 100644 mobile/openapi/lib/model/facial_recognition_config.dart delete mode 100644 mobile/openapi/lib/model/folders_response.dart delete mode 100644 mobile/openapi/lib/model/folders_update.dart delete mode 100644 mobile/openapi/lib/model/hls_video_resolution.dart delete mode 100644 mobile/openapi/lib/model/image_format.dart delete mode 100644 mobile/openapi/lib/model/integrity_report.dart delete mode 100644 mobile/openapi/lib/model/integrity_report_response_dto.dart delete mode 100644 mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart delete mode 100644 mobile/openapi/lib/model/integrity_report_summary_response_dto.dart delete mode 100644 mobile/openapi/lib/model/job_create_dto.dart delete mode 100644 mobile/openapi/lib/model/job_name.dart delete mode 100644 mobile/openapi/lib/model/job_settings_dto.dart delete mode 100644 mobile/openapi/lib/model/library_response_dto.dart delete mode 100644 mobile/openapi/lib/model/library_stats_response_dto.dart delete mode 100644 mobile/openapi/lib/model/license_key_dto.dart delete mode 100644 mobile/openapi/lib/model/log_level.dart delete mode 100644 mobile/openapi/lib/model/login_credential_dto.dart delete mode 100644 mobile/openapi/lib/model/login_response_dto.dart delete mode 100644 mobile/openapi/lib/model/logout_response_dto.dart delete mode 100644 mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart delete mode 100644 mobile/openapi/lib/model/maintenance_action.dart delete mode 100644 mobile/openapi/lib/model/maintenance_auth_dto.dart delete mode 100644 mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart delete mode 100644 mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart delete mode 100644 mobile/openapi/lib/model/maintenance_login_dto.dart delete mode 100644 mobile/openapi/lib/model/maintenance_status_response_dto.dart delete mode 100644 mobile/openapi/lib/model/manual_job_name.dart delete mode 100644 mobile/openapi/lib/model/map_marker_response_dto.dart delete mode 100644 mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart delete mode 100644 mobile/openapi/lib/model/memories_response.dart delete mode 100644 mobile/openapi/lib/model/memories_update.dart delete mode 100644 mobile/openapi/lib/model/memory_create_dto.dart delete mode 100644 mobile/openapi/lib/model/memory_response_dto.dart delete mode 100644 mobile/openapi/lib/model/memory_search_order.dart delete mode 100644 mobile/openapi/lib/model/memory_statistics_response_dto.dart delete mode 100644 mobile/openapi/lib/model/memory_type.dart delete mode 100644 mobile/openapi/lib/model/memory_update_dto.dart delete mode 100644 mobile/openapi/lib/model/merge_person_dto.dart delete mode 100644 mobile/openapi/lib/model/metadata_search_dto.dart delete mode 100644 mobile/openapi/lib/model/mirror_axis.dart delete mode 100644 mobile/openapi/lib/model/mirror_parameters.dart delete mode 100644 mobile/openapi/lib/model/notification_create_dto.dart delete mode 100644 mobile/openapi/lib/model/notification_delete_all_dto.dart delete mode 100644 mobile/openapi/lib/model/notification_dto.dart delete mode 100644 mobile/openapi/lib/model/notification_level.dart delete mode 100644 mobile/openapi/lib/model/notification_type.dart delete mode 100644 mobile/openapi/lib/model/notification_update_all_dto.dart delete mode 100644 mobile/openapi/lib/model/notification_update_dto.dart delete mode 100644 mobile/openapi/lib/model/o_auth_authorize_response_dto.dart delete mode 100644 mobile/openapi/lib/model/o_auth_callback_dto.dart delete mode 100644 mobile/openapi/lib/model/o_auth_config_dto.dart delete mode 100644 mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart delete mode 100644 mobile/openapi/lib/model/ocr_config.dart delete mode 100644 mobile/openapi/lib/model/on_this_day_dto.dart delete mode 100644 mobile/openapi/lib/model/onboarding_dto.dart delete mode 100644 mobile/openapi/lib/model/onboarding_response_dto.dart delete mode 100644 mobile/openapi/lib/model/partner_create_dto.dart delete mode 100644 mobile/openapi/lib/model/partner_direction.dart delete mode 100644 mobile/openapi/lib/model/partner_response_dto.dart delete mode 100644 mobile/openapi/lib/model/partner_update_dto.dart delete mode 100644 mobile/openapi/lib/model/people_response.dart delete mode 100644 mobile/openapi/lib/model/people_response_dto.dart delete mode 100644 mobile/openapi/lib/model/people_update.dart delete mode 100644 mobile/openapi/lib/model/people_update_dto.dart delete mode 100644 mobile/openapi/lib/model/people_update_item.dart delete mode 100644 mobile/openapi/lib/model/permission.dart delete mode 100644 mobile/openapi/lib/model/person_create_dto.dart delete mode 100644 mobile/openapi/lib/model/person_response_dto.dart delete mode 100644 mobile/openapi/lib/model/person_statistics_response_dto.dart delete mode 100644 mobile/openapi/lib/model/person_update_dto.dart delete mode 100644 mobile/openapi/lib/model/pin_code_change_dto.dart delete mode 100644 mobile/openapi/lib/model/pin_code_reset_dto.dart delete mode 100644 mobile/openapi/lib/model/pin_code_setup_dto.dart delete mode 100644 mobile/openapi/lib/model/places_response_dto.dart delete mode 100644 mobile/openapi/lib/model/plugin_method_response_dto.dart delete mode 100644 mobile/openapi/lib/model/plugin_response_dto.dart delete mode 100644 mobile/openapi/lib/model/plugin_template_response_dto.dart delete mode 100644 mobile/openapi/lib/model/plugin_template_step_response_dto.dart delete mode 100644 mobile/openapi/lib/model/purchase_response.dart delete mode 100644 mobile/openapi/lib/model/purchase_update.dart delete mode 100644 mobile/openapi/lib/model/queue_command.dart delete mode 100644 mobile/openapi/lib/model/queue_command_dto.dart delete mode 100644 mobile/openapi/lib/model/queue_delete_dto.dart delete mode 100644 mobile/openapi/lib/model/queue_job_response_dto.dart delete mode 100644 mobile/openapi/lib/model/queue_job_status.dart delete mode 100644 mobile/openapi/lib/model/queue_name.dart delete mode 100644 mobile/openapi/lib/model/queue_response_dto.dart delete mode 100644 mobile/openapi/lib/model/queue_response_legacy_dto.dart delete mode 100644 mobile/openapi/lib/model/queue_statistics_dto.dart delete mode 100644 mobile/openapi/lib/model/queue_status_legacy_dto.dart delete mode 100644 mobile/openapi/lib/model/queue_update_dto.dart delete mode 100644 mobile/openapi/lib/model/queues_response_legacy_dto.dart delete mode 100644 mobile/openapi/lib/model/random_search_dto.dart delete mode 100644 mobile/openapi/lib/model/ratings_response.dart delete mode 100644 mobile/openapi/lib/model/ratings_update.dart delete mode 100644 mobile/openapi/lib/model/reaction_level.dart delete mode 100644 mobile/openapi/lib/model/reaction_type.dart delete mode 100644 mobile/openapi/lib/model/recently_added_response.dart delete mode 100644 mobile/openapi/lib/model/recently_added_update.dart delete mode 100644 mobile/openapi/lib/model/release_channel.dart delete mode 100644 mobile/openapi/lib/model/release_event_v1.dart delete mode 100644 mobile/openapi/lib/model/release_type.dart delete mode 100644 mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart delete mode 100644 mobile/openapi/lib/model/rotate_parameters.dart delete mode 100644 mobile/openapi/lib/model/search_album_response_dto.dart delete mode 100644 mobile/openapi/lib/model/search_asset_response_dto.dart delete mode 100644 mobile/openapi/lib/model/search_explore_item.dart delete mode 100644 mobile/openapi/lib/model/search_explore_response_dto.dart delete mode 100644 mobile/openapi/lib/model/search_facet_count_response_dto.dart delete mode 100644 mobile/openapi/lib/model/search_facet_response_dto.dart delete mode 100644 mobile/openapi/lib/model/search_response_dto.dart delete mode 100644 mobile/openapi/lib/model/search_statistics_response_dto.dart delete mode 100644 mobile/openapi/lib/model/search_suggestion_type.dart delete mode 100644 mobile/openapi/lib/model/server_about_response_dto.dart delete mode 100644 mobile/openapi/lib/model/server_apk_links_dto.dart delete mode 100644 mobile/openapi/lib/model/server_config_dto.dart delete mode 100644 mobile/openapi/lib/model/server_features_dto.dart delete mode 100644 mobile/openapi/lib/model/server_media_types_response_dto.dart delete mode 100644 mobile/openapi/lib/model/server_ping_response.dart delete mode 100644 mobile/openapi/lib/model/server_stats_response_dto.dart delete mode 100644 mobile/openapi/lib/model/server_storage_response_dto.dart delete mode 100644 mobile/openapi/lib/model/server_version_history_response_dto.dart delete mode 100644 mobile/openapi/lib/model/server_version_response_dto.dart delete mode 100644 mobile/openapi/lib/model/session_create_dto.dart delete mode 100644 mobile/openapi/lib/model/session_create_response_dto.dart delete mode 100644 mobile/openapi/lib/model/session_response_dto.dart delete mode 100644 mobile/openapi/lib/model/session_unlock_dto.dart delete mode 100644 mobile/openapi/lib/model/session_update_dto.dart delete mode 100644 mobile/openapi/lib/model/set_maintenance_mode_dto.dart delete mode 100644 mobile/openapi/lib/model/shared_link_create_dto.dart delete mode 100644 mobile/openapi/lib/model/shared_link_edit_dto.dart delete mode 100644 mobile/openapi/lib/model/shared_link_login_dto.dart delete mode 100644 mobile/openapi/lib/model/shared_link_response_dto.dart delete mode 100644 mobile/openapi/lib/model/shared_link_type.dart delete mode 100644 mobile/openapi/lib/model/shared_links_response.dart delete mode 100644 mobile/openapi/lib/model/shared_links_update.dart delete mode 100644 mobile/openapi/lib/model/sign_up_dto.dart delete mode 100644 mobile/openapi/lib/model/smart_search_dto.dart delete mode 100644 mobile/openapi/lib/model/source_type.dart delete mode 100644 mobile/openapi/lib/model/stack_create_dto.dart delete mode 100644 mobile/openapi/lib/model/stack_response_dto.dart delete mode 100644 mobile/openapi/lib/model/stack_update_dto.dart delete mode 100644 mobile/openapi/lib/model/statistics_search_dto.dart delete mode 100644 mobile/openapi/lib/model/storage_folder.dart delete mode 100644 mobile/openapi/lib/model/sync_ack_delete_dto.dart delete mode 100644 mobile/openapi/lib/model/sync_ack_dto.dart delete mode 100644 mobile/openapi/lib/model/sync_ack_set_dto.dart delete mode 100644 mobile/openapi/lib/model/sync_album_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_album_to_asset_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_album_user_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_album_user_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_album_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_album_v2.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_edit_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_exif_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_face_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_face_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_face_v2.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_metadata_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_ocr_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_asset_v2.dart delete mode 100644 mobile/openapi/lib/model/sync_auth_user_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_entity_type.dart delete mode 100644 mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_memory_asset_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_memory_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_memory_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_partner_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_partner_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_person_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_person_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_request_type.dart delete mode 100644 mobile/openapi/lib/model/sync_stack_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_stack_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_stream_dto.dart delete mode 100644 mobile/openapi/lib/model/sync_user_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_user_metadata_v1.dart delete mode 100644 mobile/openapi/lib/model/sync_user_v1.dart delete mode 100644 mobile/openapi/lib/model/system_config_backups_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_faces_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_generated_image_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_image_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_integrity_checks.dart delete mode 100644 mobile/openapi/lib/model/system_config_integrity_checksum_job.dart delete mode 100644 mobile/openapi/lib/model/system_config_integrity_job.dart delete mode 100644 mobile/openapi/lib/model/system_config_job_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_library_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_library_scan_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_library_watch_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_logging_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_machine_learning_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_map_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_metadata_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_new_version_check_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_notifications_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_o_auth_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_password_login_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_server_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_smtp_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_smtp_transport_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_storage_template_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_template_emails_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_template_storage_option_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_templates_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_theme_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_trash_dto.dart delete mode 100644 mobile/openapi/lib/model/system_config_user_dto.dart delete mode 100644 mobile/openapi/lib/model/tag_bulk_assets_dto.dart delete mode 100644 mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart delete mode 100644 mobile/openapi/lib/model/tag_create_dto.dart delete mode 100644 mobile/openapi/lib/model/tag_response_dto.dart delete mode 100644 mobile/openapi/lib/model/tag_update_dto.dart delete mode 100644 mobile/openapi/lib/model/tag_upsert_dto.dart delete mode 100644 mobile/openapi/lib/model/tags_response.dart delete mode 100644 mobile/openapi/lib/model/tags_update.dart delete mode 100644 mobile/openapi/lib/model/template_dto.dart delete mode 100644 mobile/openapi/lib/model/template_response_dto.dart delete mode 100644 mobile/openapi/lib/model/test_email_response_dto.dart delete mode 100644 mobile/openapi/lib/model/time_bucket_asset_response_dto.dart delete mode 100644 mobile/openapi/lib/model/time_buckets_response_dto.dart delete mode 100644 mobile/openapi/lib/model/tone_mapping.dart delete mode 100644 mobile/openapi/lib/model/transcode_hw_accel.dart delete mode 100644 mobile/openapi/lib/model/transcode_policy.dart delete mode 100644 mobile/openapi/lib/model/trash_response_dto.dart delete mode 100644 mobile/openapi/lib/model/update_album_dto.dart delete mode 100644 mobile/openapi/lib/model/update_album_user_dto.dart delete mode 100644 mobile/openapi/lib/model/update_asset_dto.dart delete mode 100644 mobile/openapi/lib/model/update_library_dto.dart delete mode 100644 mobile/openapi/lib/model/usage_by_user_dto.dart delete mode 100644 mobile/openapi/lib/model/user_admin_create_dto.dart delete mode 100644 mobile/openapi/lib/model/user_admin_delete_dto.dart delete mode 100644 mobile/openapi/lib/model/user_admin_response_dto.dart delete mode 100644 mobile/openapi/lib/model/user_admin_update_dto.dart delete mode 100644 mobile/openapi/lib/model/user_avatar_color.dart delete mode 100644 mobile/openapi/lib/model/user_license.dart delete mode 100644 mobile/openapi/lib/model/user_metadata_key.dart delete mode 100644 mobile/openapi/lib/model/user_preferences_response_dto.dart delete mode 100644 mobile/openapi/lib/model/user_preferences_update_dto.dart delete mode 100644 mobile/openapi/lib/model/user_response_dto.dart delete mode 100644 mobile/openapi/lib/model/user_status.dart delete mode 100644 mobile/openapi/lib/model/user_update_me_dto.dart delete mode 100644 mobile/openapi/lib/model/validate_access_token_response_dto.dart delete mode 100644 mobile/openapi/lib/model/validate_library_dto.dart delete mode 100644 mobile/openapi/lib/model/validate_library_import_path_response_dto.dart delete mode 100644 mobile/openapi/lib/model/validate_library_response_dto.dart delete mode 100644 mobile/openapi/lib/model/version_check_state_response_dto.dart delete mode 100644 mobile/openapi/lib/model/video_codec.dart delete mode 100644 mobile/openapi/lib/model/video_container.dart delete mode 100644 mobile/openapi/lib/model/workflow_create_dto.dart delete mode 100644 mobile/openapi/lib/model/workflow_response_dto.dart delete mode 100644 mobile/openapi/lib/model/workflow_share_response_dto.dart delete mode 100644 mobile/openapi/lib/model/workflow_share_step_dto.dart delete mode 100644 mobile/openapi/lib/model/workflow_step_dto.dart delete mode 100644 mobile/openapi/lib/model/workflow_trigger.dart delete mode 100644 mobile/openapi/lib/model/workflow_trigger_response_dto.dart delete mode 100644 mobile/openapi/lib/model/workflow_type.dart delete mode 100644 mobile/openapi/lib/model/workflow_update_dto.dart delete mode 100644 mobile/openapi/lib/optional.dart delete mode 100644 mobile/openapi/pubspec.yaml diff --git a/.gitattributes b/.gitattributes index 935698a983..14bba0a3eb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,8 +1,3 @@ -mobile/openapi/**/*.md -diff -merge -mobile/openapi/**/*.md linguist-generated=true -mobile/openapi/**/*.dart -diff -merge -mobile/openapi/**/*.dart linguist-generated=true - mobile/lib/**/*.g.dart -diff -merge mobile/lib/**/*.g.dart linguist-generated=true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e01d28ed9d..b9fb652f59 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -742,7 +742,6 @@ jobs: id: verify-changed-files with: files: | - mobile/openapi packages/sdk open-api/immich-openapi-specs.json diff --git a/.gitignore b/.gitignore index 8beeeedfe3..9acfc8a879 100644 --- a/.gitignore +++ b/.gitignore @@ -11,13 +11,10 @@ docker/library uploads coverage +mobile/generated mobile/gradle.properties -mobile/openapi/pubspec.lock mobile/*.jks mobile/libisar.dylib -mobile/openapi/test -mobile/openapi/doc -mobile/openapi/.openapi-generator/FILES mobile/ios/build packages/**/build diff --git a/docs/docs/api.md b/docs/docs/api.md index 2e8ab5eb1b..debd75e4d4 100644 --- a/docs/docs/api.md +++ b/docs/docs/api.md @@ -10,4 +10,4 @@ OpenAPI is used to generate the client (Typescript, Dart) SDK. `openapi-generato mise open-api ``` -You can find the generated client SDK in the `packages/sdk/client` for Typescript SDK and `mobile/openapi` for Dart SDK. +You can find the generated client SDK in the `packages/sdk/client` for Typescript SDK and `mobile/generated/openapi` for Dart SDK. diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml index 7c49052fc2..f5ead8de2e 100644 --- a/mobile/analysis_options.yaml +++ b/mobile/analysis_options.yaml @@ -40,7 +40,7 @@ linter: # https://dart.dev/guides/language/analysis-options analyzer: exclude: - - openapi/** + - generated/openapi/** - build/** - lib/generated_plugin_registrant.dart - lib/**/*.g.dart diff --git a/mobile/openapi/.gitignore b/mobile/openapi/.gitignore deleted file mode 100644 index 0f74d293b9..0000000000 --- a/mobile/openapi/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# See https://dart.dev/guides/libraries/private-files - -.dart_tool/ -.packages -build/ - -# Except for application packages -pubspec.lock - -doc/api/ - -# IntelliJ -*.iml -*.ipr -*.iws -.idea/ - -# Mac -.DS_Store diff --git a/mobile/openapi/.openapi-generator-ignore b/mobile/openapi/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a..0000000000 --- a/mobile/openapi/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/mobile/openapi/.openapi-generator/VERSION b/mobile/openapi/.openapi-generator/VERSION deleted file mode 100644 index 07832195c5..0000000000 --- a/mobile/openapi/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.24.0 diff --git a/mobile/openapi/.travis.yml b/mobile/openapi/.travis.yml deleted file mode 100644 index 2774ccbba0..0000000000 --- a/mobile/openapi/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -# -# AUTO-GENERATED FILE, DO NOT MODIFY! -# -# https://docs.travis-ci.com/user/languages/dart/ -# -language: dart -dart: -# Install a specific stable release -- "2.12" -install: -- pub get - -script: -- pub run test diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md deleted file mode 100644 index d5653d4e2d..0000000000 --- a/mobile/openapi/README.md +++ /dev/null @@ -1,748 +0,0 @@ -# openapi -Immich API - -This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 3.1.0 -- Generator version: 7.24.0 -- Build package: org.openapitools.codegen.languages.DartClientCodegen - -## Requirements - -Dart 2.17 or later - -## Installation & Usage - -### Github -If this Dart package is published to Github, add the following dependency to your pubspec.yaml -``` -dependencies: - openapi: - git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` - -### Local -To use the package in your local drive, add the following dependency to your pubspec.yaml -``` -dependencies: - openapi: - path: /path/to/openapi -``` - -## Tests - -TODO - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```dart -import 'package:openapi/api.dart'; - -// TODO Configure API key authorization: cookie -//defaultApiClient.getAuthentication('cookie').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('cookie').apiKeyPrefix = 'Bearer'; -// TODO Configure API key authorization: api_key -//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; -// TODO Configure HTTP Bearer authorization: bearer -// Case 1. Use String Token -//defaultApiClient.getAuthentication('bearer').setAccessToken('YOUR_ACCESS_TOKEN'); -// Case 2. Use Function which generate token. -// String yourTokenGeneratorFunction() { ... } -//defaultApiClient.getAuthentication('bearer').setAccessToken(yourTokenGeneratorFunction); - -final api_instance = APIKeysApi(); -final apiKeyCreateDto = ApiKeyCreateDto(); // ApiKeyCreateDto | - -try { - final result = api_instance.createApiKey(apiKeyCreateDto); - print(result); -} catch (e) { - print('Exception when calling APIKeysApi->createApiKey: $e\n'); -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to */api* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*APIKeysApi* | [**createApiKey**](doc//APIKeysApi.md#createapikey) | **POST** /api-keys | Create an API key -*APIKeysApi* | [**deleteApiKey**](doc//APIKeysApi.md#deleteapikey) | **DELETE** /api-keys/{id} | Delete an API key -*APIKeysApi* | [**getApiKey**](doc//APIKeysApi.md#getapikey) | **GET** /api-keys/{id} | Retrieve an API key -*APIKeysApi* | [**getApiKeys**](doc//APIKeysApi.md#getapikeys) | **GET** /api-keys | List all API keys -*APIKeysApi* | [**getMyApiKey**](doc//APIKeysApi.md#getmyapikey) | **GET** /api-keys/me | Retrieve the current API key -*APIKeysApi* | [**updateApiKey**](doc//APIKeysApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key -*ActivitiesApi* | [**createActivity**](doc//ActivitiesApi.md#createactivity) | **POST** /activities | Create an activity -*ActivitiesApi* | [**deleteActivity**](doc//ActivitiesApi.md#deleteactivity) | **DELETE** /activities/{id} | Delete an activity -*ActivitiesApi* | [**getActivities**](doc//ActivitiesApi.md#getactivities) | **GET** /activities | List all activities -*ActivitiesApi* | [**getActivityStatistics**](doc//ActivitiesApi.md#getactivitystatistics) | **GET** /activities/statistics | Retrieve activity statistics -*AlbumsApi* | [**addAssetsToAlbum**](doc//AlbumsApi.md#addassetstoalbum) | **PUT** /albums/{id}/assets | Add assets to an album -*AlbumsApi* | [**addAssetsToAlbums**](doc//AlbumsApi.md#addassetstoalbums) | **PUT** /albums/assets | Add assets to albums -*AlbumsApi* | [**addUsersToAlbum**](doc//AlbumsApi.md#adduserstoalbum) | **PUT** /albums/{id}/users | Share album with users -*AlbumsApi* | [**createAlbum**](doc//AlbumsApi.md#createalbum) | **POST** /albums | Create an album -*AlbumsApi* | [**deleteAlbum**](doc//AlbumsApi.md#deletealbum) | **DELETE** /albums/{id} | Delete an album -*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} | Retrieve an album -*AlbumsApi* | [**getAlbumMapMarkers**](doc//AlbumsApi.md#getalbummapmarkers) | **GET** /albums/{id}/map-markers | Retrieve album map markers -*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics | Retrieve album statistics -*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums | List all albums -*AlbumsApi* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets | Remove assets from an album -*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} | Remove user from album -*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} | Update an album -*AlbumsApi* | [**updateAlbumUser**](doc//AlbumsApi.md#updatealbumuser) | **PUT** /albums/{id}/user/{userId} | Update user role -*AssetsApi* | [**checkBulkUpload**](doc//AssetsApi.md#checkbulkupload) | **POST** /assets/bulk-upload-check | Check bulk upload -*AssetsApi* | [**copyAsset**](doc//AssetsApi.md#copyasset) | **PUT** /assets/copy | Copy asset -*AssetsApi* | [**deleteAssetMetadata**](doc//AssetsApi.md#deleteassetmetadata) | **DELETE** /assets/{id}/metadata/{key} | Delete asset metadata by key -*AssetsApi* | [**deleteAssets**](doc//AssetsApi.md#deleteassets) | **DELETE** /assets | Delete assets -*AssetsApi* | [**deleteBulkAssetMetadata**](doc//AssetsApi.md#deletebulkassetmetadata) | **DELETE** /assets/metadata | Delete asset metadata -*AssetsApi* | [**downloadAsset**](doc//AssetsApi.md#downloadasset) | **GET** /assets/{id}/original | Download original asset -*AssetsApi* | [**editAsset**](doc//AssetsApi.md#editasset) | **PUT** /assets/{id}/edits | Apply edits to an existing asset -*AssetsApi* | [**endSession**](doc//AssetsApi.md#endsession) | **DELETE** /assets/{id}/video/stream/{sessionId} | End HLS streaming session -*AssetsApi* | [**getAssetEdits**](doc//AssetsApi.md#getassetedits) | **GET** /assets/{id}/edits | Retrieve edits for an existing asset -*AssetsApi* | [**getAssetInfo**](doc//AssetsApi.md#getassetinfo) | **GET** /assets/{id} | Retrieve an asset -*AssetsApi* | [**getAssetMetadata**](doc//AssetsApi.md#getassetmetadata) | **GET** /assets/{id}/metadata | Get asset metadata -*AssetsApi* | [**getAssetMetadataByKey**](doc//AssetsApi.md#getassetmetadatabykey) | **GET** /assets/{id}/metadata/{key} | Retrieve asset metadata by key -*AssetsApi* | [**getAssetOcr**](doc//AssetsApi.md#getassetocr) | **GET** /assets/{id}/ocr | Retrieve asset OCR data -*AssetsApi* | [**getAssetStatistics**](doc//AssetsApi.md#getassetstatistics) | **GET** /assets/statistics | Get asset statistics -*AssetsApi* | [**getMainPlaylist**](doc//AssetsApi.md#getmainplaylist) | **GET** /assets/{id}/video/stream/main.m3u8 | Get HLS main playlist -*AssetsApi* | [**getMediaPlaylist**](doc//AssetsApi.md#getmediaplaylist) | **GET** /assets/{id}/video/stream/{sessionId}/{variantIndex}/playlist.m3u8 | Get HLS media playlist -*AssetsApi* | [**getSegment**](doc//AssetsApi.md#getsegment) | **GET** /assets/{id}/video/stream/{sessionId}/{variantIndex}/{filename} | Get HLS segment or init file -*AssetsApi* | [**playAssetVideo**](doc//AssetsApi.md#playassetvideo) | **GET** /assets/{id}/video/playback | Play asset video -*AssetsApi* | [**removeAssetEdits**](doc//AssetsApi.md#removeassetedits) | **DELETE** /assets/{id}/edits | Remove edits from an existing asset -*AssetsApi* | [**runAssetJobs**](doc//AssetsApi.md#runassetjobs) | **POST** /assets/jobs | Run an asset job -*AssetsApi* | [**updateAsset**](doc//AssetsApi.md#updateasset) | **PUT** /assets/{id} | Update an asset -*AssetsApi* | [**updateAssetMetadata**](doc//AssetsApi.md#updateassetmetadata) | **PUT** /assets/{id}/metadata | Update asset metadata -*AssetsApi* | [**updateAssets**](doc//AssetsApi.md#updateassets) | **PUT** /assets | Update assets -*AssetsApi* | [**updateBulkAssetMetadata**](doc//AssetsApi.md#updatebulkassetmetadata) | **PUT** /assets/metadata | Upsert asset metadata -*AssetsApi* | [**uploadAsset**](doc//AssetsApi.md#uploadasset) | **POST** /assets | Upload asset -*AssetsApi* | [**viewAsset**](doc//AssetsApi.md#viewasset) | **GET** /assets/{id}/thumbnail | View asset thumbnail -*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password | Change password -*AuthenticationApi* | [**changePinCode**](doc//AuthenticationApi.md#changepincode) | **PUT** /auth/pin-code | Change pin code -*AuthenticationApi* | [**finishOAuth**](doc//AuthenticationApi.md#finishoauth) | **POST** /oauth/callback | Finish OAuth -*AuthenticationApi* | [**getAuthStatus**](doc//AuthenticationApi.md#getauthstatus) | **GET** /auth/status | Retrieve auth status -*AuthenticationApi* | [**linkOAuthAccount**](doc//AuthenticationApi.md#linkoauthaccount) | **POST** /oauth/link | Link OAuth account -*AuthenticationApi* | [**lockAuthSession**](doc//AuthenticationApi.md#lockauthsession) | **POST** /auth/session/lock | Lock auth session -*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login | Login -*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout | Logout -*AuthenticationApi* | [**logoutOAuth**](doc//AuthenticationApi.md#logoutoauth) | **POST** /oauth/backchannel-logout | Backchannel OAuth logout -*AuthenticationApi* | [**redirectOAuthToMobile**](doc//AuthenticationApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect | Redirect OAuth to mobile -*AuthenticationApi* | [**resetPinCode**](doc//AuthenticationApi.md#resetpincode) | **DELETE** /auth/pin-code | Reset pin code -*AuthenticationApi* | [**setupPinCode**](doc//AuthenticationApi.md#setuppincode) | **POST** /auth/pin-code | Setup pin code -*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | Register admin -*AuthenticationApi* | [**startOAuth**](doc//AuthenticationApi.md#startoauth) | **POST** /oauth/authorize | Start OAuth -*AuthenticationApi* | [**unlinkOAuthAccount**](doc//AuthenticationApi.md#unlinkoauthaccount) | **POST** /oauth/unlink | Unlink OAuth account -*AuthenticationApi* | [**unlockAuthSession**](doc//AuthenticationApi.md#unlockauthsession) | **POST** /auth/session/unlock | Unlock auth session -*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | Validate access token -*AuthenticationAdminApi* | [**unlinkAllOAuthAccountsAdmin**](doc//AuthenticationAdminApi.md#unlinkalloauthaccountsadmin) | **POST** /admin/auth/unlink-all | Unlink all OAuth accounts -*DatabaseBackupsAdminApi* | [**deleteDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#deletedatabasebackup) | **DELETE** /admin/database-backups | Delete database backup -*DatabaseBackupsAdminApi* | [**downloadDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#downloaddatabasebackup) | **GET** /admin/database-backups/{filename} | Download database backup -*DatabaseBackupsAdminApi* | [**listDatabaseBackups**](doc//DatabaseBackupsAdminApi.md#listdatabasebackups) | **GET** /admin/database-backups | List database backups -*DatabaseBackupsAdminApi* | [**startDatabaseRestoreFlow**](doc//DatabaseBackupsAdminApi.md#startdatabaserestoreflow) | **POST** /admin/database-backups/start-restore | Start database backup restore flow -*DatabaseBackupsAdminApi* | [**uploadDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#uploaddatabasebackup) | **POST** /admin/database-backups/upload | Upload database backup -*DeprecatedApi* | [**createPartnerDeprecated**](doc//DeprecatedApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner -*DeprecatedApi* | [**getQueuesLegacy**](doc//DeprecatedApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status -*DeprecatedApi* | [**runQueueCommandLegacy**](doc//DeprecatedApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs -*DeprecatedApi* | [**updateApiKey**](doc//DeprecatedApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key -*DeprecatedApi* | [**updateAsset**](doc//DeprecatedApi.md#updateasset) | **PUT** /assets/{id} | Update an asset -*DeprecatedApi* | [**updateAssets**](doc//DeprecatedApi.md#updateassets) | **PUT** /assets | Update assets -*DeprecatedApi* | [**updateLibrary**](doc//DeprecatedApi.md#updatelibrary) | **PUT** /libraries/{id} | Update a library -*DeprecatedApi* | [**updateMemory**](doc//DeprecatedApi.md#updatememory) | **PUT** /memories/{id} | Update a memory -*DeprecatedApi* | [**updateMyPreferences**](doc//DeprecatedApi.md#updatemypreferences) | **PUT** /users/me/preferences | Update my preferences -*DeprecatedApi* | [**updateMyUser**](doc//DeprecatedApi.md#updatemyuser) | **PUT** /users/me | Update current user -*DeprecatedApi* | [**updatePerson**](doc//DeprecatedApi.md#updateperson) | **PUT** /people/{id} | Update person -*DeprecatedApi* | [**updateSession**](doc//DeprecatedApi.md#updatesession) | **PUT** /sessions/{id} | Update a session -*DeprecatedApi* | [**updateStack**](doc//DeprecatedApi.md#updatestack) | **PUT** /stacks/{id} | Update a stack -*DeprecatedApi* | [**updateTag**](doc//DeprecatedApi.md#updatetag) | **PUT** /tags/{id} | Update a tag -*DeprecatedApi* | [**updateUserAdmin**](doc//DeprecatedApi.md#updateuseradmin) | **PUT** /admin/users/{id} | Update a user -*DeprecatedApi* | [**updateUserPreferencesAdmin**](doc//DeprecatedApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | Update user preferences -*DeprecatedApi* | [**updateWorkflow**](doc//DeprecatedApi.md#updateworkflow) | **PUT** /workflows/{id} | Update a workflow -*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | Download asset archive -*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | Retrieve download information -*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | Dismiss a duplicate group -*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | Delete duplicates -*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | Retrieve duplicates -*DuplicatesApi* | [**resolveDuplicates**](doc//DuplicatesApi.md#resolveduplicates) | **POST** /duplicates/resolve | Resolve duplicate groups -*FacesApi* | [**createFace**](doc//FacesApi.md#createface) | **POST** /faces | Create a face -*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} | Delete a face -*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces | Retrieve faces for asset -*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} | Re-assign a face to another person -*JobsApi* | [**createJob**](doc//JobsApi.md#createjob) | **POST** /jobs | Create a manual job -*JobsApi* | [**getQueuesLegacy**](doc//JobsApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status -*JobsApi* | [**runQueueCommandLegacy**](doc//JobsApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs -*LibrariesApi* | [**createLibrary**](doc//LibrariesApi.md#createlibrary) | **POST** /libraries | Create a library -*LibrariesApi* | [**deleteLibrary**](doc//LibrariesApi.md#deletelibrary) | **DELETE** /libraries/{id} | Delete a library -*LibrariesApi* | [**getAllLibraries**](doc//LibrariesApi.md#getalllibraries) | **GET** /libraries | Retrieve libraries -*LibrariesApi* | [**getLibrary**](doc//LibrariesApi.md#getlibrary) | **GET** /libraries/{id} | Retrieve a library -*LibrariesApi* | [**getLibraryStatistics**](doc//LibrariesApi.md#getlibrarystatistics) | **GET** /libraries/{id}/statistics | Retrieve library statistics -*LibrariesApi* | [**scanLibrary**](doc//LibrariesApi.md#scanlibrary) | **POST** /libraries/{id}/scan | Scan a library -*LibrariesApi* | [**updateLibrary**](doc//LibrariesApi.md#updatelibrary) | **PUT** /libraries/{id} | Update a library -*LibrariesApi* | [**validate**](doc//LibrariesApi.md#validate) | **POST** /libraries/{id}/validate | Validate library settings -*MaintenanceAdminApi* | [**deleteIntegrityReport**](doc//MaintenanceAdminApi.md#deleteintegrityreport) | **DELETE** /admin/integrity/report/{id} | Delete integrity report item -*MaintenanceAdminApi* | [**detectPriorInstall**](doc//MaintenanceAdminApi.md#detectpriorinstall) | **GET** /admin/maintenance/detect-install | Detect existing install -*MaintenanceAdminApi* | [**getIntegrityReport**](doc//MaintenanceAdminApi.md#getintegrityreport) | **GET** /admin/integrity/report | Get integrity report by type -*MaintenanceAdminApi* | [**getIntegrityReportCsv**](doc//MaintenanceAdminApi.md#getintegrityreportcsv) | **GET** /admin/integrity/report/{type}/csv | Export integrity report by type as CSV -*MaintenanceAdminApi* | [**getIntegrityReportFile**](doc//MaintenanceAdminApi.md#getintegrityreportfile) | **GET** /admin/integrity/report/{id}/file | Download flagged file -*MaintenanceAdminApi* | [**getIntegrityReportSummary**](doc//MaintenanceAdminApi.md#getintegrityreportsummary) | **GET** /admin/integrity/summary | Get integrity report summary -*MaintenanceAdminApi* | [**getMaintenanceStatus**](doc//MaintenanceAdminApi.md#getmaintenancestatus) | **GET** /admin/maintenance/status | Get maintenance mode status -*MaintenanceAdminApi* | [**maintenanceLogin**](doc//MaintenanceAdminApi.md#maintenancelogin) | **POST** /admin/maintenance/login | Log into maintenance mode -*MaintenanceAdminApi* | [**setMaintenanceMode**](doc//MaintenanceAdminApi.md#setmaintenancemode) | **POST** /admin/maintenance | Set maintenance mode -*MapApi* | [**getMapMarkers**](doc//MapApi.md#getmapmarkers) | **GET** /map/markers | Retrieve map markers -*MapApi* | [**reverseGeocode**](doc//MapApi.md#reversegeocode) | **GET** /map/reverse-geocode | Reverse geocode coordinates -*MemoriesApi* | [**addMemoryAssets**](doc//MemoriesApi.md#addmemoryassets) | **PUT** /memories/{id}/assets | Add assets to a memory -*MemoriesApi* | [**createMemory**](doc//MemoriesApi.md#creatememory) | **POST** /memories | Create a memory -*MemoriesApi* | [**deleteMemory**](doc//MemoriesApi.md#deletememory) | **DELETE** /memories/{id} | Delete a memory -*MemoriesApi* | [**getMemory**](doc//MemoriesApi.md#getmemory) | **GET** /memories/{id} | Retrieve a memory -*MemoriesApi* | [**memoriesStatistics**](doc//MemoriesApi.md#memoriesstatistics) | **GET** /memories/statistics | Retrieve memories statistics -*MemoriesApi* | [**removeMemoryAssets**](doc//MemoriesApi.md#removememoryassets) | **DELETE** /memories/{id}/assets | Remove assets from a memory -*MemoriesApi* | [**searchMemories**](doc//MemoriesApi.md#searchmemories) | **GET** /memories | Retrieve memories -*MemoriesApi* | [**updateMemory**](doc//MemoriesApi.md#updatememory) | **PUT** /memories/{id} | Update a memory -*NotificationsApi* | [**deleteNotification**](doc//NotificationsApi.md#deletenotification) | **DELETE** /notifications/{id} | Delete a notification -*NotificationsApi* | [**deleteNotifications**](doc//NotificationsApi.md#deletenotifications) | **DELETE** /notifications | Delete notifications -*NotificationsApi* | [**getNotification**](doc//NotificationsApi.md#getnotification) | **GET** /notifications/{id} | Get a notification -*NotificationsApi* | [**getNotifications**](doc//NotificationsApi.md#getnotifications) | **GET** /notifications | Retrieve notifications -*NotificationsApi* | [**updateNotification**](doc//NotificationsApi.md#updatenotification) | **PUT** /notifications/{id} | Update a notification -*NotificationsApi* | [**updateNotifications**](doc//NotificationsApi.md#updatenotifications) | **PUT** /notifications | Update notifications -*NotificationsAdminApi* | [**createNotification**](doc//NotificationsAdminApi.md#createnotification) | **POST** /admin/notifications | Create a notification -*NotificationsAdminApi* | [**getNotificationTemplateAdmin**](doc//NotificationsAdminApi.md#getnotificationtemplateadmin) | **POST** /admin/notifications/templates/{name} | Render email template -*NotificationsAdminApi* | [**sendTestEmailAdmin**](doc//NotificationsAdminApi.md#sendtestemailadmin) | **POST** /admin/notifications/test-email | Send test email -*PartnersApi* | [**createPartner**](doc//PartnersApi.md#createpartner) | **POST** /partners | Create a partner -*PartnersApi* | [**createPartnerDeprecated**](doc//PartnersApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner -*PartnersApi* | [**getPartners**](doc//PartnersApi.md#getpartners) | **GET** /partners | Retrieve partners -*PartnersApi* | [**removePartner**](doc//PartnersApi.md#removepartner) | **DELETE** /partners/{id} | Remove a partner -*PartnersApi* | [**updatePartner**](doc//PartnersApi.md#updatepartner) | **PUT** /partners/{id} | Update a partner -*PeopleApi* | [**createPerson**](doc//PeopleApi.md#createperson) | **POST** /people | Create a person -*PeopleApi* | [**deletePeople**](doc//PeopleApi.md#deletepeople) | **DELETE** /people | Delete people -*PeopleApi* | [**deletePerson**](doc//PeopleApi.md#deleteperson) | **DELETE** /people/{id} | Delete person -*PeopleApi* | [**getAllPeople**](doc//PeopleApi.md#getallpeople) | **GET** /people | Get all people -*PeopleApi* | [**getPerson**](doc//PeopleApi.md#getperson) | **GET** /people/{id} | Get a person -*PeopleApi* | [**getPersonStatistics**](doc//PeopleApi.md#getpersonstatistics) | **GET** /people/{id}/statistics | Get person statistics -*PeopleApi* | [**getPersonThumbnail**](doc//PeopleApi.md#getpersonthumbnail) | **GET** /people/{id}/thumbnail | Get person thumbnail -*PeopleApi* | [**mergePerson**](doc//PeopleApi.md#mergeperson) | **POST** /people/{id}/merge | Merge people -*PeopleApi* | [**reassignFaces**](doc//PeopleApi.md#reassignfaces) | **PUT** /people/{id}/reassign | Reassign faces -*PeopleApi* | [**updatePeople**](doc//PeopleApi.md#updatepeople) | **PUT** /people | Update people -*PeopleApi* | [**updatePerson**](doc//PeopleApi.md#updateperson) | **PUT** /people/{id} | Update person -*PluginsApi* | [**getPlugin**](doc//PluginsApi.md#getplugin) | **GET** /plugins/{id} | Retrieve a plugin -*PluginsApi* | [**searchPluginMethods**](doc//PluginsApi.md#searchpluginmethods) | **GET** /plugins/methods | Retrieve plugin methods -*PluginsApi* | [**searchPluginTemplates**](doc//PluginsApi.md#searchplugintemplates) | **GET** /plugins/templates | Retrieve workflow templates -*PluginsApi* | [**searchPlugins**](doc//PluginsApi.md#searchplugins) | **GET** /plugins | List all plugins -*QueuesApi* | [**emptyQueue**](doc//QueuesApi.md#emptyqueue) | **DELETE** /queues/{name}/jobs | Empty a queue -*QueuesApi* | [**getQueue**](doc//QueuesApi.md#getqueue) | **GET** /queues/{name} | Retrieve a queue -*QueuesApi* | [**getQueueJobs**](doc//QueuesApi.md#getqueuejobs) | **GET** /queues/{name}/jobs | Retrieve queue jobs -*QueuesApi* | [**getQueues**](doc//QueuesApi.md#getqueues) | **GET** /queues | List all queues -*QueuesApi* | [**updateQueue**](doc//QueuesApi.md#updatequeue) | **PUT** /queues/{name} | Update a queue -*SearchApi* | [**getAssetsByCity**](doc//SearchApi.md#getassetsbycity) | **GET** /search/cities | Retrieve assets by city -*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore | Retrieve explore data -*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions | Retrieve search suggestions -*SearchApi* | [**searchAssetStatistics**](doc//SearchApi.md#searchassetstatistics) | **POST** /search/statistics | Search asset statistics -*SearchApi* | [**searchAssets**](doc//SearchApi.md#searchassets) | **POST** /search/metadata | Search assets by metadata -*SearchApi* | [**searchLargeAssets**](doc//SearchApi.md#searchlargeassets) | **POST** /search/large-assets | Search large assets -*SearchApi* | [**searchPerson**](doc//SearchApi.md#searchperson) | **GET** /search/person | Search people -*SearchApi* | [**searchPlaces**](doc//SearchApi.md#searchplaces) | **GET** /search/places | Search places -*SearchApi* | [**searchRandom**](doc//SearchApi.md#searchrandom) | **POST** /search/random | Search random assets -*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart | Smart asset search -*ServerApi* | [**deleteServerLicense**](doc//ServerApi.md#deleteserverlicense) | **DELETE** /server/license | Delete server product key -*ServerApi* | [**getAboutInfo**](doc//ServerApi.md#getaboutinfo) | **GET** /server/about | Get server information -*ServerApi* | [**getApkLinks**](doc//ServerApi.md#getapklinks) | **GET** /server/apk-links | Get APK links -*ServerApi* | [**getServerConfig**](doc//ServerApi.md#getserverconfig) | **GET** /server/config | Get config -*ServerApi* | [**getServerFeatures**](doc//ServerApi.md#getserverfeatures) | **GET** /server/features | Get features -*ServerApi* | [**getServerLicense**](doc//ServerApi.md#getserverlicense) | **GET** /server/license | Get product key -*ServerApi* | [**getServerStatistics**](doc//ServerApi.md#getserverstatistics) | **GET** /server/statistics | Get statistics -*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version | Get server version -*ServerApi* | [**getStorage**](doc//ServerApi.md#getstorage) | **GET** /server/storage | Get storage -*ServerApi* | [**getSupportedMediaTypes**](doc//ServerApi.md#getsupportedmediatypes) | **GET** /server/media-types | Get supported media types -*ServerApi* | [**getVersionCheck**](doc//ServerApi.md#getversioncheck) | **GET** /server/version-check | Get version check status -*ServerApi* | [**getVersionHistory**](doc//ServerApi.md#getversionhistory) | **GET** /server/version-history | Get version history -*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping | Ping -*ServerApi* | [**setServerLicense**](doc//ServerApi.md#setserverlicense) | **PUT** /server/license | Set server product key -*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /sessions | Create a session -*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions | Delete all sessions -*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} | Delete a session -*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions | Retrieve sessions -*SessionsApi* | [**lockSession**](doc//SessionsApi.md#locksession) | **POST** /sessions/{id}/lock | Lock a session -*SessionsApi* | [**updateSession**](doc//SessionsApi.md#updatesession) | **PUT** /sessions/{id} | Update a session -*SharedLinksApi* | [**addSharedLinkAssets**](doc//SharedLinksApi.md#addsharedlinkassets) | **PUT** /shared-links/{id}/assets | Add assets to a shared link -*SharedLinksApi* | [**createSharedLink**](doc//SharedLinksApi.md#createsharedlink) | **POST** /shared-links | Create a shared link -*SharedLinksApi* | [**getAllSharedLinks**](doc//SharedLinksApi.md#getallsharedlinks) | **GET** /shared-links | Retrieve all shared links -*SharedLinksApi* | [**getMySharedLink**](doc//SharedLinksApi.md#getmysharedlink) | **GET** /shared-links/me | Retrieve current shared link -*SharedLinksApi* | [**getSharedLinkById**](doc//SharedLinksApi.md#getsharedlinkbyid) | **GET** /shared-links/{id} | Retrieve a shared link -*SharedLinksApi* | [**removeSharedLink**](doc//SharedLinksApi.md#removesharedlink) | **DELETE** /shared-links/{id} | Delete a shared link -*SharedLinksApi* | [**removeSharedLinkAssets**](doc//SharedLinksApi.md#removesharedlinkassets) | **DELETE** /shared-links/{id}/assets | Remove assets from a shared link -*SharedLinksApi* | [**sharedLinkLogin**](doc//SharedLinksApi.md#sharedlinklogin) | **POST** /shared-links/login | Shared link login -*SharedLinksApi* | [**updateSharedLink**](doc//SharedLinksApi.md#updatesharedlink) | **PATCH** /shared-links/{id} | Update a shared link -*StacksApi* | [**createStack**](doc//StacksApi.md#createstack) | **POST** /stacks | Create a stack -*StacksApi* | [**deleteStack**](doc//StacksApi.md#deletestack) | **DELETE** /stacks/{id} | Delete a stack -*StacksApi* | [**deleteStacks**](doc//StacksApi.md#deletestacks) | **DELETE** /stacks | Delete stacks -*StacksApi* | [**getStack**](doc//StacksApi.md#getstack) | **GET** /stacks/{id} | Retrieve a stack -*StacksApi* | [**removeAssetFromStack**](doc//StacksApi.md#removeassetfromstack) | **DELETE** /stacks/{id}/assets/{assetId} | Remove an asset from a stack -*StacksApi* | [**searchStacks**](doc//StacksApi.md#searchstacks) | **GET** /stacks | Retrieve stacks -*StacksApi* | [**updateStack**](doc//StacksApi.md#updatestack) | **PUT** /stacks/{id} | Update a stack -*SyncApi* | [**deleteSyncAck**](doc//SyncApi.md#deletesyncack) | **DELETE** /sync/ack | Delete acknowledgements -*SyncApi* | [**getSyncAck**](doc//SyncApi.md#getsyncack) | **GET** /sync/ack | Retrieve acknowledgements -*SyncApi* | [**getSyncStream**](doc//SyncApi.md#getsyncstream) | **POST** /sync/stream | Stream sync changes -*SyncApi* | [**sendSyncAck**](doc//SyncApi.md#sendsyncack) | **POST** /sync/ack | Acknowledge changes -*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config | Get system configuration -*SystemConfigApi* | [**getConfigDefaults**](doc//SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults | Get system configuration defaults -*SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options | Get storage template options -*SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config | Update system configuration -*SystemMetadataApi* | [**getAdminOnboarding**](doc//SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding | Retrieve admin onboarding -*SystemMetadataApi* | [**getReverseGeocodingState**](doc//SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state | Retrieve reverse geocoding state -*SystemMetadataApi* | [**getVersionCheckState**](doc//SystemMetadataApi.md#getversioncheckstate) | **GET** /system-metadata/version-check-state | Retrieve version check state -*SystemMetadataApi* | [**updateAdminOnboarding**](doc//SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding | Update admin onboarding -*TagsApi* | [**bulkTagAssets**](doc//TagsApi.md#bulktagassets) | **PUT** /tags/assets | Tag assets -*TagsApi* | [**createTag**](doc//TagsApi.md#createtag) | **POST** /tags | Create a tag -*TagsApi* | [**deleteTag**](doc//TagsApi.md#deletetag) | **DELETE** /tags/{id} | Delete a tag -*TagsApi* | [**getAllTags**](doc//TagsApi.md#getalltags) | **GET** /tags | Retrieve tags -*TagsApi* | [**getTagById**](doc//TagsApi.md#gettagbyid) | **GET** /tags/{id} | Retrieve a tag -*TagsApi* | [**tagAssets**](doc//TagsApi.md#tagassets) | **PUT** /tags/{id}/assets | Tag assets -*TagsApi* | [**untagAssets**](doc//TagsApi.md#untagassets) | **DELETE** /tags/{id}/assets | Untag assets -*TagsApi* | [**updateTag**](doc//TagsApi.md#updatetag) | **PUT** /tags/{id} | Update a tag -*TagsApi* | [**upsertTags**](doc//TagsApi.md#upserttags) | **PUT** /tags | Upsert tags -*TimelineApi* | [**getTimeBucket**](doc//TimelineApi.md#gettimebucket) | **GET** /timeline/bucket | Get time bucket -*TimelineApi* | [**getTimeBuckets**](doc//TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets | Get time buckets -*TrashApi* | [**emptyTrash**](doc//TrashApi.md#emptytrash) | **POST** /trash/empty | Empty trash -*TrashApi* | [**restoreAssets**](doc//TrashApi.md#restoreassets) | **POST** /trash/restore/assets | Restore assets -*TrashApi* | [**restoreTrash**](doc//TrashApi.md#restoretrash) | **POST** /trash/restore | Restore trash -*UsersApi* | [**createProfileImage**](doc//UsersApi.md#createprofileimage) | **POST** /users/profile-image | Create user profile image -*UsersApi* | [**deleteProfileImage**](doc//UsersApi.md#deleteprofileimage) | **DELETE** /users/profile-image | Delete user profile image -*UsersApi* | [**deleteUserLicense**](doc//UsersApi.md#deleteuserlicense) | **DELETE** /users/me/license | Delete user product key -*UsersApi* | [**deleteUserOnboarding**](doc//UsersApi.md#deleteuseronboarding) | **DELETE** /users/me/onboarding | Delete user onboarding -*UsersApi* | [**getMyCalendarHeatmap**](doc//UsersApi.md#getmycalendarheatmap) | **GET** /users/me/calendar-heatmap | Retrieve calendar heatmap activity -*UsersApi* | [**getMyPreferences**](doc//UsersApi.md#getmypreferences) | **GET** /users/me/preferences | Get my preferences -*UsersApi* | [**getMyUser**](doc//UsersApi.md#getmyuser) | **GET** /users/me | Get current user -*UsersApi* | [**getProfileImage**](doc//UsersApi.md#getprofileimage) | **GET** /users/{id}/profile-image | Retrieve user profile image -*UsersApi* | [**getUser**](doc//UsersApi.md#getuser) | **GET** /users/{id} | Retrieve a user -*UsersApi* | [**getUserLicense**](doc//UsersApi.md#getuserlicense) | **GET** /users/me/license | Retrieve user product key -*UsersApi* | [**getUserOnboarding**](doc//UsersApi.md#getuseronboarding) | **GET** /users/me/onboarding | Retrieve user onboarding -*UsersApi* | [**searchUsers**](doc//UsersApi.md#searchusers) | **GET** /users | Get all users -*UsersApi* | [**setUserLicense**](doc//UsersApi.md#setuserlicense) | **PUT** /users/me/license | Set user product key -*UsersApi* | [**setUserOnboarding**](doc//UsersApi.md#setuseronboarding) | **PUT** /users/me/onboarding | Update user onboarding -*UsersApi* | [**updateMyPreferences**](doc//UsersApi.md#updatemypreferences) | **PUT** /users/me/preferences | Update my preferences -*UsersApi* | [**updateMyUser**](doc//UsersApi.md#updatemyuser) | **PUT** /users/me | Update current user -*UsersAdminApi* | [**createUserAdmin**](doc//UsersAdminApi.md#createuseradmin) | **POST** /admin/users | Create a user -*UsersAdminApi* | [**deleteUserAdmin**](doc//UsersAdminApi.md#deleteuseradmin) | **DELETE** /admin/users/{id} | Delete a user -*UsersAdminApi* | [**getUserAdmin**](doc//UsersAdminApi.md#getuseradmin) | **GET** /admin/users/{id} | Retrieve a user -*UsersAdminApi* | [**getUserCalendarHeatmapAdmin**](doc//UsersAdminApi.md#getusercalendarheatmapadmin) | **GET** /admin/users/{id}/calendar-heatmap | Retrieve calendar heatmap activity -*UsersAdminApi* | [**getUserPreferencesAdmin**](doc//UsersAdminApi.md#getuserpreferencesadmin) | **GET** /admin/users/{id}/preferences | Retrieve user preferences -*UsersAdminApi* | [**getUserSessionsAdmin**](doc//UsersAdminApi.md#getusersessionsadmin) | **GET** /admin/users/{id}/sessions | Retrieve user sessions -*UsersAdminApi* | [**getUserStatisticsAdmin**](doc//UsersAdminApi.md#getuserstatisticsadmin) | **GET** /admin/users/{id}/statistics | Retrieve user statistics -*UsersAdminApi* | [**restoreUserAdmin**](doc//UsersAdminApi.md#restoreuseradmin) | **POST** /admin/users/{id}/restore | Restore a deleted user -*UsersAdminApi* | [**searchUsersAdmin**](doc//UsersAdminApi.md#searchusersadmin) | **GET** /admin/users | Search users -*UsersAdminApi* | [**updateUserAdmin**](doc//UsersAdminApi.md#updateuseradmin) | **PUT** /admin/users/{id} | Update a user -*UsersAdminApi* | [**updateUserPreferencesAdmin**](doc//UsersAdminApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | Update user preferences -*ViewsApi* | [**getAssetsByOriginalPath**](doc//ViewsApi.md#getassetsbyoriginalpath) | **GET** /view/folder | Retrieve assets by original path -*ViewsApi* | [**getUniqueOriginalPaths**](doc//ViewsApi.md#getuniqueoriginalpaths) | **GET** /view/folder/unique-paths | Retrieve unique paths -*WorkflowsApi* | [**createWorkflow**](doc//WorkflowsApi.md#createworkflow) | **POST** /workflows | Create a workflow -*WorkflowsApi* | [**deleteWorkflow**](doc//WorkflowsApi.md#deleteworkflow) | **DELETE** /workflows/{id} | Delete a workflow -*WorkflowsApi* | [**getWorkflow**](doc//WorkflowsApi.md#getworkflow) | **GET** /workflows/{id} | Retrieve a workflow -*WorkflowsApi* | [**getWorkflowForShare**](doc//WorkflowsApi.md#getworkflowforshare) | **GET** /workflows/{id}/share | Retrieve a workflow -*WorkflowsApi* | [**getWorkflowTriggers**](doc//WorkflowsApi.md#getworkflowtriggers) | **GET** /workflows/triggers | List all workflow triggers -*WorkflowsApi* | [**searchWorkflows**](doc//WorkflowsApi.md#searchworkflows) | **GET** /workflows | List all workflows -*WorkflowsApi* | [**updateWorkflow**](doc//WorkflowsApi.md#updateworkflow) | **PUT** /workflows/{id} | Update a workflow - - -## Documentation For Models - - - [ActivityCreateDto](doc//ActivityCreateDto.md) - - [ActivityResponseDto](doc//ActivityResponseDto.md) - - [ActivityStatisticsResponseDto](doc//ActivityStatisticsResponseDto.md) - - [AddUsersDto](doc//AddUsersDto.md) - - [AdminOnboardingUpdateDto](doc//AdminOnboardingUpdateDto.md) - - [AlbumResponseDto](doc//AlbumResponseDto.md) - - [AlbumStatisticsResponseDto](doc//AlbumStatisticsResponseDto.md) - - [AlbumUserAddDto](doc//AlbumUserAddDto.md) - - [AlbumUserCreateDto](doc//AlbumUserCreateDto.md) - - [AlbumUserResponseDto](doc//AlbumUserResponseDto.md) - - [AlbumUserRole](doc//AlbumUserRole.md) - - [AlbumsAddAssetsDto](doc//AlbumsAddAssetsDto.md) - - [AlbumsAddAssetsResponseDto](doc//AlbumsAddAssetsResponseDto.md) - - [AlbumsResponse](doc//AlbumsResponse.md) - - [AlbumsUpdate](doc//AlbumsUpdate.md) - - [ApiKeyCreateDto](doc//ApiKeyCreateDto.md) - - [ApiKeyCreateResponseDto](doc//ApiKeyCreateResponseDto.md) - - [ApiKeyResponseDto](doc//ApiKeyResponseDto.md) - - [ApiKeyUpdateDto](doc//ApiKeyUpdateDto.md) - - [AssetBulkDeleteDto](doc//AssetBulkDeleteDto.md) - - [AssetBulkUpdateDto](doc//AssetBulkUpdateDto.md) - - [AssetBulkUploadCheckDto](doc//AssetBulkUploadCheckDto.md) - - [AssetBulkUploadCheckItem](doc//AssetBulkUploadCheckItem.md) - - [AssetBulkUploadCheckResponseDto](doc//AssetBulkUploadCheckResponseDto.md) - - [AssetBulkUploadCheckResult](doc//AssetBulkUploadCheckResult.md) - - [AssetCopyDto](doc//AssetCopyDto.md) - - [AssetEditAction](doc//AssetEditAction.md) - - [AssetEditActionItemDto](doc//AssetEditActionItemDto.md) - - [AssetEditActionItemDtoParameters](doc//AssetEditActionItemDtoParameters.md) - - [AssetEditActionItemResponseDto](doc//AssetEditActionItemResponseDto.md) - - [AssetEditsCreateDto](doc//AssetEditsCreateDto.md) - - [AssetEditsResponseDto](doc//AssetEditsResponseDto.md) - - [AssetFaceCreateDto](doc//AssetFaceCreateDto.md) - - [AssetFaceDeleteDto](doc//AssetFaceDeleteDto.md) - - [AssetFaceResponseDto](doc//AssetFaceResponseDto.md) - - [AssetFaceUpdateDto](doc//AssetFaceUpdateDto.md) - - [AssetFaceUpdateItem](doc//AssetFaceUpdateItem.md) - - [AssetIdErrorReason](doc//AssetIdErrorReason.md) - - [AssetIdsDto](doc//AssetIdsDto.md) - - [AssetIdsResponseDto](doc//AssetIdsResponseDto.md) - - [AssetJobName](doc//AssetJobName.md) - - [AssetJobsDto](doc//AssetJobsDto.md) - - [AssetMediaResponseDto](doc//AssetMediaResponseDto.md) - - [AssetMediaSize](doc//AssetMediaSize.md) - - [AssetMediaStatus](doc//AssetMediaStatus.md) - - [AssetMetadataBulkDeleteDto](doc//AssetMetadataBulkDeleteDto.md) - - [AssetMetadataBulkDeleteItemDto](doc//AssetMetadataBulkDeleteItemDto.md) - - [AssetMetadataBulkResponseDto](doc//AssetMetadataBulkResponseDto.md) - - [AssetMetadataBulkUpsertDto](doc//AssetMetadataBulkUpsertDto.md) - - [AssetMetadataBulkUpsertItemDto](doc//AssetMetadataBulkUpsertItemDto.md) - - [AssetMetadataResponseDto](doc//AssetMetadataResponseDto.md) - - [AssetMetadataUpsertDto](doc//AssetMetadataUpsertDto.md) - - [AssetMetadataUpsertItemDto](doc//AssetMetadataUpsertItemDto.md) - - [AssetOcrResponseDto](doc//AssetOcrResponseDto.md) - - [AssetOrder](doc//AssetOrder.md) - - [AssetOrderBy](doc//AssetOrderBy.md) - - [AssetRejectReason](doc//AssetRejectReason.md) - - [AssetResponseDto](doc//AssetResponseDto.md) - - [AssetStackResponseDto](doc//AssetStackResponseDto.md) - - [AssetStatsResponseDto](doc//AssetStatsResponseDto.md) - - [AssetTypeEnum](doc//AssetTypeEnum.md) - - [AssetUploadAction](doc//AssetUploadAction.md) - - [AssetVisibility](doc//AssetVisibility.md) - - [AudioCodec](doc//AudioCodec.md) - - [AuthStatusResponseDto](doc//AuthStatusResponseDto.md) - - [AvatarUpdate](doc//AvatarUpdate.md) - - [BulkIdErrorReason](doc//BulkIdErrorReason.md) - - [BulkIdResponseDto](doc//BulkIdResponseDto.md) - - [BulkIdsDto](doc//BulkIdsDto.md) - - [CLIPConfig](doc//CLIPConfig.md) - - [CQMode](doc//CQMode.md) - - [CalendarHeatmapResponseDto](doc//CalendarHeatmapResponseDto.md) - - [CalendarHeatmapResponseDtoSeriesInner](doc//CalendarHeatmapResponseDtoSeriesInner.md) - - [CalendarHeatmapType](doc//CalendarHeatmapType.md) - - [CastResponse](doc//CastResponse.md) - - [CastUpdate](doc//CastUpdate.md) - - [ChangePasswordDto](doc//ChangePasswordDto.md) - - [Colorspace](doc//Colorspace.md) - - [ContributorCountResponseDto](doc//ContributorCountResponseDto.md) - - [CreateAlbumDto](doc//CreateAlbumDto.md) - - [CreateLibraryDto](doc//CreateLibraryDto.md) - - [CreateProfileImageResponseDto](doc//CreateProfileImageResponseDto.md) - - [CropParameters](doc//CropParameters.md) - - [DatabaseBackupConfig](doc//DatabaseBackupConfig.md) - - [DatabaseBackupDeleteDto](doc//DatabaseBackupDeleteDto.md) - - [DatabaseBackupDto](doc//DatabaseBackupDto.md) - - [DatabaseBackupListResponseDto](doc//DatabaseBackupListResponseDto.md) - - [DownloadArchiveDto](doc//DownloadArchiveDto.md) - - [DownloadArchiveInfo](doc//DownloadArchiveInfo.md) - - [DownloadInfoDto](doc//DownloadInfoDto.md) - - [DownloadResponse](doc//DownloadResponse.md) - - [DownloadResponseDto](doc//DownloadResponseDto.md) - - [DownloadUpdate](doc//DownloadUpdate.md) - - [DuplicateDetectionConfig](doc//DuplicateDetectionConfig.md) - - [DuplicateResolveDto](doc//DuplicateResolveDto.md) - - [DuplicateResolveGroupDto](doc//DuplicateResolveGroupDto.md) - - [DuplicateResponseDto](doc//DuplicateResponseDto.md) - - [EmailNotificationsResponse](doc//EmailNotificationsResponse.md) - - [EmailNotificationsUpdate](doc//EmailNotificationsUpdate.md) - - [ExifResponseDto](doc//ExifResponseDto.md) - - [FaceDto](doc//FaceDto.md) - - [FacialRecognitionConfig](doc//FacialRecognitionConfig.md) - - [FoldersResponse](doc//FoldersResponse.md) - - [FoldersUpdate](doc//FoldersUpdate.md) - - [HlsVideoResolution](doc//HlsVideoResolution.md) - - [ImageFormat](doc//ImageFormat.md) - - [IntegrityReport](doc//IntegrityReport.md) - - [IntegrityReportResponseDto](doc//IntegrityReportResponseDto.md) - - [IntegrityReportResponseDtoItemsInner](doc//IntegrityReportResponseDtoItemsInner.md) - - [IntegrityReportSummaryResponseDto](doc//IntegrityReportSummaryResponseDto.md) - - [JobCreateDto](doc//JobCreateDto.md) - - [JobName](doc//JobName.md) - - [JobSettingsDto](doc//JobSettingsDto.md) - - [LibraryResponseDto](doc//LibraryResponseDto.md) - - [LibraryStatsResponseDto](doc//LibraryStatsResponseDto.md) - - [LicenseKeyDto](doc//LicenseKeyDto.md) - - [LogLevel](doc//LogLevel.md) - - [LoginCredentialDto](doc//LoginCredentialDto.md) - - [LoginResponseDto](doc//LoginResponseDto.md) - - [LogoutResponseDto](doc//LogoutResponseDto.md) - - [MachineLearningAvailabilityChecksDto](doc//MachineLearningAvailabilityChecksDto.md) - - [MaintenanceAction](doc//MaintenanceAction.md) - - [MaintenanceAuthDto](doc//MaintenanceAuthDto.md) - - [MaintenanceDetectInstallResponseDto](doc//MaintenanceDetectInstallResponseDto.md) - - [MaintenanceDetectInstallStorageFolderDto](doc//MaintenanceDetectInstallStorageFolderDto.md) - - [MaintenanceLoginDto](doc//MaintenanceLoginDto.md) - - [MaintenanceStatusResponseDto](doc//MaintenanceStatusResponseDto.md) - - [ManualJobName](doc//ManualJobName.md) - - [MapMarkerResponseDto](doc//MapMarkerResponseDto.md) - - [MapReverseGeocodeResponseDto](doc//MapReverseGeocodeResponseDto.md) - - [MemoriesResponse](doc//MemoriesResponse.md) - - [MemoriesUpdate](doc//MemoriesUpdate.md) - - [MemoryCreateDto](doc//MemoryCreateDto.md) - - [MemoryResponseDto](doc//MemoryResponseDto.md) - - [MemorySearchOrder](doc//MemorySearchOrder.md) - - [MemoryStatisticsResponseDto](doc//MemoryStatisticsResponseDto.md) - - [MemoryType](doc//MemoryType.md) - - [MemoryUpdateDto](doc//MemoryUpdateDto.md) - - [MergePersonDto](doc//MergePersonDto.md) - - [MetadataSearchDto](doc//MetadataSearchDto.md) - - [MirrorAxis](doc//MirrorAxis.md) - - [MirrorParameters](doc//MirrorParameters.md) - - [NotificationCreateDto](doc//NotificationCreateDto.md) - - [NotificationDeleteAllDto](doc//NotificationDeleteAllDto.md) - - [NotificationDto](doc//NotificationDto.md) - - [NotificationLevel](doc//NotificationLevel.md) - - [NotificationType](doc//NotificationType.md) - - [NotificationUpdateAllDto](doc//NotificationUpdateAllDto.md) - - [NotificationUpdateDto](doc//NotificationUpdateDto.md) - - [OAuthAuthorizeResponseDto](doc//OAuthAuthorizeResponseDto.md) - - [OAuthCallbackDto](doc//OAuthCallbackDto.md) - - [OAuthConfigDto](doc//OAuthConfigDto.md) - - [OAuthTokenEndpointAuthMethod](doc//OAuthTokenEndpointAuthMethod.md) - - [OcrConfig](doc//OcrConfig.md) - - [OnThisDayDto](doc//OnThisDayDto.md) - - [OnboardingDto](doc//OnboardingDto.md) - - [OnboardingResponseDto](doc//OnboardingResponseDto.md) - - [PartnerCreateDto](doc//PartnerCreateDto.md) - - [PartnerDirection](doc//PartnerDirection.md) - - [PartnerResponseDto](doc//PartnerResponseDto.md) - - [PartnerUpdateDto](doc//PartnerUpdateDto.md) - - [PeopleResponse](doc//PeopleResponse.md) - - [PeopleResponseDto](doc//PeopleResponseDto.md) - - [PeopleUpdate](doc//PeopleUpdate.md) - - [PeopleUpdateDto](doc//PeopleUpdateDto.md) - - [PeopleUpdateItem](doc//PeopleUpdateItem.md) - - [Permission](doc//Permission.md) - - [PersonCreateDto](doc//PersonCreateDto.md) - - [PersonResponseDto](doc//PersonResponseDto.md) - - [PersonStatisticsResponseDto](doc//PersonStatisticsResponseDto.md) - - [PersonUpdateDto](doc//PersonUpdateDto.md) - - [PinCodeChangeDto](doc//PinCodeChangeDto.md) - - [PinCodeResetDto](doc//PinCodeResetDto.md) - - [PinCodeSetupDto](doc//PinCodeSetupDto.md) - - [PlacesResponseDto](doc//PlacesResponseDto.md) - - [PluginMethodResponseDto](doc//PluginMethodResponseDto.md) - - [PluginResponseDto](doc//PluginResponseDto.md) - - [PluginTemplateResponseDto](doc//PluginTemplateResponseDto.md) - - [PluginTemplateStepResponseDto](doc//PluginTemplateStepResponseDto.md) - - [PurchaseResponse](doc//PurchaseResponse.md) - - [PurchaseUpdate](doc//PurchaseUpdate.md) - - [QueueCommand](doc//QueueCommand.md) - - [QueueCommandDto](doc//QueueCommandDto.md) - - [QueueDeleteDto](doc//QueueDeleteDto.md) - - [QueueJobResponseDto](doc//QueueJobResponseDto.md) - - [QueueJobStatus](doc//QueueJobStatus.md) - - [QueueName](doc//QueueName.md) - - [QueueResponseDto](doc//QueueResponseDto.md) - - [QueueResponseLegacyDto](doc//QueueResponseLegacyDto.md) - - [QueueStatisticsDto](doc//QueueStatisticsDto.md) - - [QueueStatusLegacyDto](doc//QueueStatusLegacyDto.md) - - [QueueUpdateDto](doc//QueueUpdateDto.md) - - [QueuesResponseLegacyDto](doc//QueuesResponseLegacyDto.md) - - [RandomSearchDto](doc//RandomSearchDto.md) - - [RatingsResponse](doc//RatingsResponse.md) - - [RatingsUpdate](doc//RatingsUpdate.md) - - [ReactionLevel](doc//ReactionLevel.md) - - [ReactionType](doc//ReactionType.md) - - [RecentlyAddedResponse](doc//RecentlyAddedResponse.md) - - [RecentlyAddedUpdate](doc//RecentlyAddedUpdate.md) - - [ReleaseChannel](doc//ReleaseChannel.md) - - [ReleaseEventV1](doc//ReleaseEventV1.md) - - [ReleaseType](doc//ReleaseType.md) - - [ReverseGeocodingStateResponseDto](doc//ReverseGeocodingStateResponseDto.md) - - [RotateParameters](doc//RotateParameters.md) - - [SearchAlbumResponseDto](doc//SearchAlbumResponseDto.md) - - [SearchAssetResponseDto](doc//SearchAssetResponseDto.md) - - [SearchExploreItem](doc//SearchExploreItem.md) - - [SearchExploreResponseDto](doc//SearchExploreResponseDto.md) - - [SearchFacetCountResponseDto](doc//SearchFacetCountResponseDto.md) - - [SearchFacetResponseDto](doc//SearchFacetResponseDto.md) - - [SearchResponseDto](doc//SearchResponseDto.md) - - [SearchStatisticsResponseDto](doc//SearchStatisticsResponseDto.md) - - [SearchSuggestionType](doc//SearchSuggestionType.md) - - [ServerAboutResponseDto](doc//ServerAboutResponseDto.md) - - [ServerApkLinksDto](doc//ServerApkLinksDto.md) - - [ServerConfigDto](doc//ServerConfigDto.md) - - [ServerFeaturesDto](doc//ServerFeaturesDto.md) - - [ServerMediaTypesResponseDto](doc//ServerMediaTypesResponseDto.md) - - [ServerPingResponse](doc//ServerPingResponse.md) - - [ServerStatsResponseDto](doc//ServerStatsResponseDto.md) - - [ServerStorageResponseDto](doc//ServerStorageResponseDto.md) - - [ServerVersionHistoryResponseDto](doc//ServerVersionHistoryResponseDto.md) - - [ServerVersionResponseDto](doc//ServerVersionResponseDto.md) - - [SessionCreateDto](doc//SessionCreateDto.md) - - [SessionCreateResponseDto](doc//SessionCreateResponseDto.md) - - [SessionResponseDto](doc//SessionResponseDto.md) - - [SessionUnlockDto](doc//SessionUnlockDto.md) - - [SessionUpdateDto](doc//SessionUpdateDto.md) - - [SetMaintenanceModeDto](doc//SetMaintenanceModeDto.md) - - [SharedLinkCreateDto](doc//SharedLinkCreateDto.md) - - [SharedLinkEditDto](doc//SharedLinkEditDto.md) - - [SharedLinkLoginDto](doc//SharedLinkLoginDto.md) - - [SharedLinkResponseDto](doc//SharedLinkResponseDto.md) - - [SharedLinkType](doc//SharedLinkType.md) - - [SharedLinksResponse](doc//SharedLinksResponse.md) - - [SharedLinksUpdate](doc//SharedLinksUpdate.md) - - [SignUpDto](doc//SignUpDto.md) - - [SmartSearchDto](doc//SmartSearchDto.md) - - [SourceType](doc//SourceType.md) - - [StackCreateDto](doc//StackCreateDto.md) - - [StackResponseDto](doc//StackResponseDto.md) - - [StackUpdateDto](doc//StackUpdateDto.md) - - [StatisticsSearchDto](doc//StatisticsSearchDto.md) - - [StorageFolder](doc//StorageFolder.md) - - [SyncAckDeleteDto](doc//SyncAckDeleteDto.md) - - [SyncAckDto](doc//SyncAckDto.md) - - [SyncAckSetDto](doc//SyncAckSetDto.md) - - [SyncAlbumDeleteV1](doc//SyncAlbumDeleteV1.md) - - [SyncAlbumToAssetDeleteV1](doc//SyncAlbumToAssetDeleteV1.md) - - [SyncAlbumToAssetV1](doc//SyncAlbumToAssetV1.md) - - [SyncAlbumUserDeleteV1](doc//SyncAlbumUserDeleteV1.md) - - [SyncAlbumUserV1](doc//SyncAlbumUserV1.md) - - [SyncAlbumV1](doc//SyncAlbumV1.md) - - [SyncAlbumV2](doc//SyncAlbumV2.md) - - [SyncAssetDeleteV1](doc//SyncAssetDeleteV1.md) - - [SyncAssetEditDeleteV1](doc//SyncAssetEditDeleteV1.md) - - [SyncAssetEditV1](doc//SyncAssetEditV1.md) - - [SyncAssetExifV1](doc//SyncAssetExifV1.md) - - [SyncAssetFaceDeleteV1](doc//SyncAssetFaceDeleteV1.md) - - [SyncAssetFaceV1](doc//SyncAssetFaceV1.md) - - [SyncAssetFaceV2](doc//SyncAssetFaceV2.md) - - [SyncAssetMetadataDeleteV1](doc//SyncAssetMetadataDeleteV1.md) - - [SyncAssetMetadataV1](doc//SyncAssetMetadataV1.md) - - [SyncAssetOcrDeleteV1](doc//SyncAssetOcrDeleteV1.md) - - [SyncAssetOcrV1](doc//SyncAssetOcrV1.md) - - [SyncAssetV1](doc//SyncAssetV1.md) - - [SyncAssetV2](doc//SyncAssetV2.md) - - [SyncAuthUserV1](doc//SyncAuthUserV1.md) - - [SyncEntityType](doc//SyncEntityType.md) - - [SyncMemoryAssetDeleteV1](doc//SyncMemoryAssetDeleteV1.md) - - [SyncMemoryAssetV1](doc//SyncMemoryAssetV1.md) - - [SyncMemoryDeleteV1](doc//SyncMemoryDeleteV1.md) - - [SyncMemoryV1](doc//SyncMemoryV1.md) - - [SyncPartnerDeleteV1](doc//SyncPartnerDeleteV1.md) - - [SyncPartnerV1](doc//SyncPartnerV1.md) - - [SyncPersonDeleteV1](doc//SyncPersonDeleteV1.md) - - [SyncPersonV1](doc//SyncPersonV1.md) - - [SyncRequestType](doc//SyncRequestType.md) - - [SyncStackDeleteV1](doc//SyncStackDeleteV1.md) - - [SyncStackV1](doc//SyncStackV1.md) - - [SyncStreamDto](doc//SyncStreamDto.md) - - [SyncUserDeleteV1](doc//SyncUserDeleteV1.md) - - [SyncUserMetadataDeleteV1](doc//SyncUserMetadataDeleteV1.md) - - [SyncUserMetadataV1](doc//SyncUserMetadataV1.md) - - [SyncUserV1](doc//SyncUserV1.md) - - [SystemConfigBackupsDto](doc//SystemConfigBackupsDto.md) - - [SystemConfigDto](doc//SystemConfigDto.md) - - [SystemConfigFFmpegDto](doc//SystemConfigFFmpegDto.md) - - [SystemConfigFFmpegRealtimeDto](doc//SystemConfigFFmpegRealtimeDto.md) - - [SystemConfigFacesDto](doc//SystemConfigFacesDto.md) - - [SystemConfigGeneratedFullsizeImageDto](doc//SystemConfigGeneratedFullsizeImageDto.md) - - [SystemConfigGeneratedImageDto](doc//SystemConfigGeneratedImageDto.md) - - [SystemConfigImageDto](doc//SystemConfigImageDto.md) - - [SystemConfigIntegrityChecks](doc//SystemConfigIntegrityChecks.md) - - [SystemConfigIntegrityChecksumJob](doc//SystemConfigIntegrityChecksumJob.md) - - [SystemConfigIntegrityJob](doc//SystemConfigIntegrityJob.md) - - [SystemConfigJobDto](doc//SystemConfigJobDto.md) - - [SystemConfigLibraryDto](doc//SystemConfigLibraryDto.md) - - [SystemConfigLibraryScanDto](doc//SystemConfigLibraryScanDto.md) - - [SystemConfigLibraryWatchDto](doc//SystemConfigLibraryWatchDto.md) - - [SystemConfigLoggingDto](doc//SystemConfigLoggingDto.md) - - [SystemConfigMachineLearningDto](doc//SystemConfigMachineLearningDto.md) - - [SystemConfigMapDto](doc//SystemConfigMapDto.md) - - [SystemConfigMetadataDto](doc//SystemConfigMetadataDto.md) - - [SystemConfigNewVersionCheckDto](doc//SystemConfigNewVersionCheckDto.md) - - [SystemConfigNightlyTasksDto](doc//SystemConfigNightlyTasksDto.md) - - [SystemConfigNotificationsDto](doc//SystemConfigNotificationsDto.md) - - [SystemConfigOAuthDto](doc//SystemConfigOAuthDto.md) - - [SystemConfigPasswordLoginDto](doc//SystemConfigPasswordLoginDto.md) - - [SystemConfigReverseGeocodingDto](doc//SystemConfigReverseGeocodingDto.md) - - [SystemConfigServerDto](doc//SystemConfigServerDto.md) - - [SystemConfigSmtpDto](doc//SystemConfigSmtpDto.md) - - [SystemConfigSmtpTransportDto](doc//SystemConfigSmtpTransportDto.md) - - [SystemConfigStorageTemplateDto](doc//SystemConfigStorageTemplateDto.md) - - [SystemConfigTemplateEmailsDto](doc//SystemConfigTemplateEmailsDto.md) - - [SystemConfigTemplateStorageOptionDto](doc//SystemConfigTemplateStorageOptionDto.md) - - [SystemConfigTemplatesDto](doc//SystemConfigTemplatesDto.md) - - [SystemConfigThemeDto](doc//SystemConfigThemeDto.md) - - [SystemConfigTrashDto](doc//SystemConfigTrashDto.md) - - [SystemConfigUserDto](doc//SystemConfigUserDto.md) - - [TagBulkAssetsDto](doc//TagBulkAssetsDto.md) - - [TagBulkAssetsResponseDto](doc//TagBulkAssetsResponseDto.md) - - [TagCreateDto](doc//TagCreateDto.md) - - [TagResponseDto](doc//TagResponseDto.md) - - [TagUpdateDto](doc//TagUpdateDto.md) - - [TagUpsertDto](doc//TagUpsertDto.md) - - [TagsResponse](doc//TagsResponse.md) - - [TagsUpdate](doc//TagsUpdate.md) - - [TemplateDto](doc//TemplateDto.md) - - [TemplateResponseDto](doc//TemplateResponseDto.md) - - [TestEmailResponseDto](doc//TestEmailResponseDto.md) - - [TimeBucketAssetResponseDto](doc//TimeBucketAssetResponseDto.md) - - [TimeBucketsResponseDto](doc//TimeBucketsResponseDto.md) - - [ToneMapping](doc//ToneMapping.md) - - [TranscodeHWAccel](doc//TranscodeHWAccel.md) - - [TranscodePolicy](doc//TranscodePolicy.md) - - [TrashResponseDto](doc//TrashResponseDto.md) - - [UpdateAlbumDto](doc//UpdateAlbumDto.md) - - [UpdateAlbumUserDto](doc//UpdateAlbumUserDto.md) - - [UpdateAssetDto](doc//UpdateAssetDto.md) - - [UpdateLibraryDto](doc//UpdateLibraryDto.md) - - [UsageByUserDto](doc//UsageByUserDto.md) - - [UserAdminCreateDto](doc//UserAdminCreateDto.md) - - [UserAdminDeleteDto](doc//UserAdminDeleteDto.md) - - [UserAdminResponseDto](doc//UserAdminResponseDto.md) - - [UserAdminUpdateDto](doc//UserAdminUpdateDto.md) - - [UserAvatarColor](doc//UserAvatarColor.md) - - [UserLicense](doc//UserLicense.md) - - [UserMetadataKey](doc//UserMetadataKey.md) - - [UserPreferencesResponseDto](doc//UserPreferencesResponseDto.md) - - [UserPreferencesUpdateDto](doc//UserPreferencesUpdateDto.md) - - [UserResponseDto](doc//UserResponseDto.md) - - [UserStatus](doc//UserStatus.md) - - [UserUpdateMeDto](doc//UserUpdateMeDto.md) - - [ValidateAccessTokenResponseDto](doc//ValidateAccessTokenResponseDto.md) - - [ValidateLibraryDto](doc//ValidateLibraryDto.md) - - [ValidateLibraryImportPathResponseDto](doc//ValidateLibraryImportPathResponseDto.md) - - [ValidateLibraryResponseDto](doc//ValidateLibraryResponseDto.md) - - [VersionCheckStateResponseDto](doc//VersionCheckStateResponseDto.md) - - [VideoCodec](doc//VideoCodec.md) - - [VideoContainer](doc//VideoContainer.md) - - [WorkflowCreateDto](doc//WorkflowCreateDto.md) - - [WorkflowResponseDto](doc//WorkflowResponseDto.md) - - [WorkflowShareResponseDto](doc//WorkflowShareResponseDto.md) - - [WorkflowShareStepDto](doc//WorkflowShareStepDto.md) - - [WorkflowStepDto](doc//WorkflowStepDto.md) - - [WorkflowTrigger](doc//WorkflowTrigger.md) - - [WorkflowTriggerResponseDto](doc//WorkflowTriggerResponseDto.md) - - [WorkflowType](doc//WorkflowType.md) - - [WorkflowUpdateDto](doc//WorkflowUpdateDto.md) - - -## Documentation For Authorization - - -Authentication schemes defined for the API: -### bearer - -- **Type**: HTTP Bearer authentication - -### cookie - -- **Type**: API key -- **API key parameter name**: immich_access_token -- **Location**: - -### api_key - -- **Type**: API key -- **API key parameter name**: x-api-key -- **Location**: HTTP header - - -## Author - - - diff --git a/mobile/openapi/git_push.sh b/mobile/openapi/git_push.sh deleted file mode 100644 index f53a75d4fa..0000000000 --- a/mobile/openapi/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart deleted file mode 100644 index 47425b56fe..0000000000 --- a/mobile/openapi/lib/api.dart +++ /dev/null @@ -1,457 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -library openapi.api; - -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:collection/collection.dart'; -import 'package:flutter/foundation.dart'; -import 'package:immich_mobile/utils/openapi_patching.dart'; -import 'package:http/http.dart'; -import 'package:intl/intl.dart'; -import 'package:meta/meta.dart'; - -part 'api_client.dart'; -part 'api_helper.dart'; -part 'api_exception.dart'; -part 'auth/authentication.dart'; -part 'auth/api_key_auth.dart'; -part 'auth/oauth.dart'; -part 'auth/http_basic_auth.dart'; -part 'auth/http_bearer_auth.dart'; -part 'optional.dart'; - -part 'api/api_keys_api.dart'; -part 'api/activities_api.dart'; -part 'api/albums_api.dart'; -part 'api/assets_api.dart'; -part 'api/authentication_api.dart'; -part 'api/authentication_admin_api.dart'; -part 'api/database_backups_admin_api.dart'; -part 'api/deprecated_api.dart'; -part 'api/download_api.dart'; -part 'api/duplicates_api.dart'; -part 'api/faces_api.dart'; -part 'api/jobs_api.dart'; -part 'api/libraries_api.dart'; -part 'api/maintenance_admin_api.dart'; -part 'api/map_api.dart'; -part 'api/memories_api.dart'; -part 'api/notifications_api.dart'; -part 'api/notifications_admin_api.dart'; -part 'api/partners_api.dart'; -part 'api/people_api.dart'; -part 'api/plugins_api.dart'; -part 'api/queues_api.dart'; -part 'api/search_api.dart'; -part 'api/server_api.dart'; -part 'api/sessions_api.dart'; -part 'api/shared_links_api.dart'; -part 'api/stacks_api.dart'; -part 'api/sync_api.dart'; -part 'api/system_config_api.dart'; -part 'api/system_metadata_api.dart'; -part 'api/tags_api.dart'; -part 'api/timeline_api.dart'; -part 'api/trash_api.dart'; -part 'api/users_api.dart'; -part 'api/users_admin_api.dart'; -part 'api/views_api.dart'; -part 'api/workflows_api.dart'; - -part 'model/activity_create_dto.dart'; -part 'model/activity_response_dto.dart'; -part 'model/activity_statistics_response_dto.dart'; -part 'model/add_users_dto.dart'; -part 'model/admin_onboarding_update_dto.dart'; -part 'model/album_response_dto.dart'; -part 'model/album_statistics_response_dto.dart'; -part 'model/album_user_add_dto.dart'; -part 'model/album_user_create_dto.dart'; -part 'model/album_user_response_dto.dart'; -part 'model/album_user_role.dart'; -part 'model/albums_add_assets_dto.dart'; -part 'model/albums_add_assets_response_dto.dart'; -part 'model/albums_response.dart'; -part 'model/albums_update.dart'; -part 'model/api_key_create_dto.dart'; -part 'model/api_key_create_response_dto.dart'; -part 'model/api_key_response_dto.dart'; -part 'model/api_key_update_dto.dart'; -part 'model/asset_bulk_delete_dto.dart'; -part 'model/asset_bulk_update_dto.dart'; -part 'model/asset_bulk_upload_check_dto.dart'; -part 'model/asset_bulk_upload_check_item.dart'; -part 'model/asset_bulk_upload_check_response_dto.dart'; -part 'model/asset_bulk_upload_check_result.dart'; -part 'model/asset_copy_dto.dart'; -part 'model/asset_edit_action.dart'; -part 'model/asset_edit_action_item_dto.dart'; -part 'model/asset_edit_action_item_dto_parameters.dart'; -part 'model/asset_edit_action_item_response_dto.dart'; -part 'model/asset_edits_create_dto.dart'; -part 'model/asset_edits_response_dto.dart'; -part 'model/asset_face_create_dto.dart'; -part 'model/asset_face_delete_dto.dart'; -part 'model/asset_face_response_dto.dart'; -part 'model/asset_face_update_dto.dart'; -part 'model/asset_face_update_item.dart'; -part 'model/asset_id_error_reason.dart'; -part 'model/asset_ids_dto.dart'; -part 'model/asset_ids_response_dto.dart'; -part 'model/asset_job_name.dart'; -part 'model/asset_jobs_dto.dart'; -part 'model/asset_media_response_dto.dart'; -part 'model/asset_media_size.dart'; -part 'model/asset_media_status.dart'; -part 'model/asset_metadata_bulk_delete_dto.dart'; -part 'model/asset_metadata_bulk_delete_item_dto.dart'; -part 'model/asset_metadata_bulk_response_dto.dart'; -part 'model/asset_metadata_bulk_upsert_dto.dart'; -part 'model/asset_metadata_bulk_upsert_item_dto.dart'; -part 'model/asset_metadata_response_dto.dart'; -part 'model/asset_metadata_upsert_dto.dart'; -part 'model/asset_metadata_upsert_item_dto.dart'; -part 'model/asset_ocr_response_dto.dart'; -part 'model/asset_order.dart'; -part 'model/asset_order_by.dart'; -part 'model/asset_reject_reason.dart'; -part 'model/asset_response_dto.dart'; -part 'model/asset_stack_response_dto.dart'; -part 'model/asset_stats_response_dto.dart'; -part 'model/asset_type_enum.dart'; -part 'model/asset_upload_action.dart'; -part 'model/asset_visibility.dart'; -part 'model/audio_codec.dart'; -part 'model/auth_status_response_dto.dart'; -part 'model/avatar_update.dart'; -part 'model/bulk_id_error_reason.dart'; -part 'model/bulk_id_response_dto.dart'; -part 'model/bulk_ids_dto.dart'; -part 'model/clip_config.dart'; -part 'model/cq_mode.dart'; -part 'model/calendar_heatmap_response_dto.dart'; -part 'model/calendar_heatmap_response_dto_series_inner.dart'; -part 'model/calendar_heatmap_type.dart'; -part 'model/cast_response.dart'; -part 'model/cast_update.dart'; -part 'model/change_password_dto.dart'; -part 'model/colorspace.dart'; -part 'model/contributor_count_response_dto.dart'; -part 'model/create_album_dto.dart'; -part 'model/create_library_dto.dart'; -part 'model/create_profile_image_response_dto.dart'; -part 'model/crop_parameters.dart'; -part 'model/database_backup_config.dart'; -part 'model/database_backup_delete_dto.dart'; -part 'model/database_backup_dto.dart'; -part 'model/database_backup_list_response_dto.dart'; -part 'model/download_archive_dto.dart'; -part 'model/download_archive_info.dart'; -part 'model/download_info_dto.dart'; -part 'model/download_response.dart'; -part 'model/download_response_dto.dart'; -part 'model/download_update.dart'; -part 'model/duplicate_detection_config.dart'; -part 'model/duplicate_resolve_dto.dart'; -part 'model/duplicate_resolve_group_dto.dart'; -part 'model/duplicate_response_dto.dart'; -part 'model/email_notifications_response.dart'; -part 'model/email_notifications_update.dart'; -part 'model/exif_response_dto.dart'; -part 'model/face_dto.dart'; -part 'model/facial_recognition_config.dart'; -part 'model/folders_response.dart'; -part 'model/folders_update.dart'; -part 'model/hls_video_resolution.dart'; -part 'model/image_format.dart'; -part 'model/integrity_report.dart'; -part 'model/integrity_report_response_dto.dart'; -part 'model/integrity_report_response_dto_items_inner.dart'; -part 'model/integrity_report_summary_response_dto.dart'; -part 'model/job_create_dto.dart'; -part 'model/job_name.dart'; -part 'model/job_settings_dto.dart'; -part 'model/library_response_dto.dart'; -part 'model/library_stats_response_dto.dart'; -part 'model/license_key_dto.dart'; -part 'model/log_level.dart'; -part 'model/login_credential_dto.dart'; -part 'model/login_response_dto.dart'; -part 'model/logout_response_dto.dart'; -part 'model/machine_learning_availability_checks_dto.dart'; -part 'model/maintenance_action.dart'; -part 'model/maintenance_auth_dto.dart'; -part 'model/maintenance_detect_install_response_dto.dart'; -part 'model/maintenance_detect_install_storage_folder_dto.dart'; -part 'model/maintenance_login_dto.dart'; -part 'model/maintenance_status_response_dto.dart'; -part 'model/manual_job_name.dart'; -part 'model/map_marker_response_dto.dart'; -part 'model/map_reverse_geocode_response_dto.dart'; -part 'model/memories_response.dart'; -part 'model/memories_update.dart'; -part 'model/memory_create_dto.dart'; -part 'model/memory_response_dto.dart'; -part 'model/memory_search_order.dart'; -part 'model/memory_statistics_response_dto.dart'; -part 'model/memory_type.dart'; -part 'model/memory_update_dto.dart'; -part 'model/merge_person_dto.dart'; -part 'model/metadata_search_dto.dart'; -part 'model/mirror_axis.dart'; -part 'model/mirror_parameters.dart'; -part 'model/notification_create_dto.dart'; -part 'model/notification_delete_all_dto.dart'; -part 'model/notification_dto.dart'; -part 'model/notification_level.dart'; -part 'model/notification_type.dart'; -part 'model/notification_update_all_dto.dart'; -part 'model/notification_update_dto.dart'; -part 'model/o_auth_authorize_response_dto.dart'; -part 'model/o_auth_callback_dto.dart'; -part 'model/o_auth_config_dto.dart'; -part 'model/o_auth_token_endpoint_auth_method.dart'; -part 'model/ocr_config.dart'; -part 'model/on_this_day_dto.dart'; -part 'model/onboarding_dto.dart'; -part 'model/onboarding_response_dto.dart'; -part 'model/partner_create_dto.dart'; -part 'model/partner_direction.dart'; -part 'model/partner_response_dto.dart'; -part 'model/partner_update_dto.dart'; -part 'model/people_response.dart'; -part 'model/people_response_dto.dart'; -part 'model/people_update.dart'; -part 'model/people_update_dto.dart'; -part 'model/people_update_item.dart'; -part 'model/permission.dart'; -part 'model/person_create_dto.dart'; -part 'model/person_response_dto.dart'; -part 'model/person_statistics_response_dto.dart'; -part 'model/person_update_dto.dart'; -part 'model/pin_code_change_dto.dart'; -part 'model/pin_code_reset_dto.dart'; -part 'model/pin_code_setup_dto.dart'; -part 'model/places_response_dto.dart'; -part 'model/plugin_method_response_dto.dart'; -part 'model/plugin_response_dto.dart'; -part 'model/plugin_template_response_dto.dart'; -part 'model/plugin_template_step_response_dto.dart'; -part 'model/purchase_response.dart'; -part 'model/purchase_update.dart'; -part 'model/queue_command.dart'; -part 'model/queue_command_dto.dart'; -part 'model/queue_delete_dto.dart'; -part 'model/queue_job_response_dto.dart'; -part 'model/queue_job_status.dart'; -part 'model/queue_name.dart'; -part 'model/queue_response_dto.dart'; -part 'model/queue_response_legacy_dto.dart'; -part 'model/queue_statistics_dto.dart'; -part 'model/queue_status_legacy_dto.dart'; -part 'model/queue_update_dto.dart'; -part 'model/queues_response_legacy_dto.dart'; -part 'model/random_search_dto.dart'; -part 'model/ratings_response.dart'; -part 'model/ratings_update.dart'; -part 'model/reaction_level.dart'; -part 'model/reaction_type.dart'; -part 'model/recently_added_response.dart'; -part 'model/recently_added_update.dart'; -part 'model/release_channel.dart'; -part 'model/release_event_v1.dart'; -part 'model/release_type.dart'; -part 'model/reverse_geocoding_state_response_dto.dart'; -part 'model/rotate_parameters.dart'; -part 'model/search_album_response_dto.dart'; -part 'model/search_asset_response_dto.dart'; -part 'model/search_explore_item.dart'; -part 'model/search_explore_response_dto.dart'; -part 'model/search_facet_count_response_dto.dart'; -part 'model/search_facet_response_dto.dart'; -part 'model/search_response_dto.dart'; -part 'model/search_statistics_response_dto.dart'; -part 'model/search_suggestion_type.dart'; -part 'model/server_about_response_dto.dart'; -part 'model/server_apk_links_dto.dart'; -part 'model/server_config_dto.dart'; -part 'model/server_features_dto.dart'; -part 'model/server_media_types_response_dto.dart'; -part 'model/server_ping_response.dart'; -part 'model/server_stats_response_dto.dart'; -part 'model/server_storage_response_dto.dart'; -part 'model/server_version_history_response_dto.dart'; -part 'model/server_version_response_dto.dart'; -part 'model/session_create_dto.dart'; -part 'model/session_create_response_dto.dart'; -part 'model/session_response_dto.dart'; -part 'model/session_unlock_dto.dart'; -part 'model/session_update_dto.dart'; -part 'model/set_maintenance_mode_dto.dart'; -part 'model/shared_link_create_dto.dart'; -part 'model/shared_link_edit_dto.dart'; -part 'model/shared_link_login_dto.dart'; -part 'model/shared_link_response_dto.dart'; -part 'model/shared_link_type.dart'; -part 'model/shared_links_response.dart'; -part 'model/shared_links_update.dart'; -part 'model/sign_up_dto.dart'; -part 'model/smart_search_dto.dart'; -part 'model/source_type.dart'; -part 'model/stack_create_dto.dart'; -part 'model/stack_response_dto.dart'; -part 'model/stack_update_dto.dart'; -part 'model/statistics_search_dto.dart'; -part 'model/storage_folder.dart'; -part 'model/sync_ack_delete_dto.dart'; -part 'model/sync_ack_dto.dart'; -part 'model/sync_ack_set_dto.dart'; -part 'model/sync_album_delete_v1.dart'; -part 'model/sync_album_to_asset_delete_v1.dart'; -part 'model/sync_album_to_asset_v1.dart'; -part 'model/sync_album_user_delete_v1.dart'; -part 'model/sync_album_user_v1.dart'; -part 'model/sync_album_v1.dart'; -part 'model/sync_album_v2.dart'; -part 'model/sync_asset_delete_v1.dart'; -part 'model/sync_asset_edit_delete_v1.dart'; -part 'model/sync_asset_edit_v1.dart'; -part 'model/sync_asset_exif_v1.dart'; -part 'model/sync_asset_face_delete_v1.dart'; -part 'model/sync_asset_face_v1.dart'; -part 'model/sync_asset_face_v2.dart'; -part 'model/sync_asset_metadata_delete_v1.dart'; -part 'model/sync_asset_metadata_v1.dart'; -part 'model/sync_asset_ocr_delete_v1.dart'; -part 'model/sync_asset_ocr_v1.dart'; -part 'model/sync_asset_v1.dart'; -part 'model/sync_asset_v2.dart'; -part 'model/sync_auth_user_v1.dart'; -part 'model/sync_entity_type.dart'; -part 'model/sync_memory_asset_delete_v1.dart'; -part 'model/sync_memory_asset_v1.dart'; -part 'model/sync_memory_delete_v1.dart'; -part 'model/sync_memory_v1.dart'; -part 'model/sync_partner_delete_v1.dart'; -part 'model/sync_partner_v1.dart'; -part 'model/sync_person_delete_v1.dart'; -part 'model/sync_person_v1.dart'; -part 'model/sync_request_type.dart'; -part 'model/sync_stack_delete_v1.dart'; -part 'model/sync_stack_v1.dart'; -part 'model/sync_stream_dto.dart'; -part 'model/sync_user_delete_v1.dart'; -part 'model/sync_user_metadata_delete_v1.dart'; -part 'model/sync_user_metadata_v1.dart'; -part 'model/sync_user_v1.dart'; -part 'model/system_config_backups_dto.dart'; -part 'model/system_config_dto.dart'; -part 'model/system_config_f_fmpeg_dto.dart'; -part 'model/system_config_f_fmpeg_realtime_dto.dart'; -part 'model/system_config_faces_dto.dart'; -part 'model/system_config_generated_fullsize_image_dto.dart'; -part 'model/system_config_generated_image_dto.dart'; -part 'model/system_config_image_dto.dart'; -part 'model/system_config_integrity_checks.dart'; -part 'model/system_config_integrity_checksum_job.dart'; -part 'model/system_config_integrity_job.dart'; -part 'model/system_config_job_dto.dart'; -part 'model/system_config_library_dto.dart'; -part 'model/system_config_library_scan_dto.dart'; -part 'model/system_config_library_watch_dto.dart'; -part 'model/system_config_logging_dto.dart'; -part 'model/system_config_machine_learning_dto.dart'; -part 'model/system_config_map_dto.dart'; -part 'model/system_config_metadata_dto.dart'; -part 'model/system_config_new_version_check_dto.dart'; -part 'model/system_config_nightly_tasks_dto.dart'; -part 'model/system_config_notifications_dto.dart'; -part 'model/system_config_o_auth_dto.dart'; -part 'model/system_config_password_login_dto.dart'; -part 'model/system_config_reverse_geocoding_dto.dart'; -part 'model/system_config_server_dto.dart'; -part 'model/system_config_smtp_dto.dart'; -part 'model/system_config_smtp_transport_dto.dart'; -part 'model/system_config_storage_template_dto.dart'; -part 'model/system_config_template_emails_dto.dart'; -part 'model/system_config_template_storage_option_dto.dart'; -part 'model/system_config_templates_dto.dart'; -part 'model/system_config_theme_dto.dart'; -part 'model/system_config_trash_dto.dart'; -part 'model/system_config_user_dto.dart'; -part 'model/tag_bulk_assets_dto.dart'; -part 'model/tag_bulk_assets_response_dto.dart'; -part 'model/tag_create_dto.dart'; -part 'model/tag_response_dto.dart'; -part 'model/tag_update_dto.dart'; -part 'model/tag_upsert_dto.dart'; -part 'model/tags_response.dart'; -part 'model/tags_update.dart'; -part 'model/template_dto.dart'; -part 'model/template_response_dto.dart'; -part 'model/test_email_response_dto.dart'; -part 'model/time_bucket_asset_response_dto.dart'; -part 'model/time_buckets_response_dto.dart'; -part 'model/tone_mapping.dart'; -part 'model/transcode_hw_accel.dart'; -part 'model/transcode_policy.dart'; -part 'model/trash_response_dto.dart'; -part 'model/update_album_dto.dart'; -part 'model/update_album_user_dto.dart'; -part 'model/update_asset_dto.dart'; -part 'model/update_library_dto.dart'; -part 'model/usage_by_user_dto.dart'; -part 'model/user_admin_create_dto.dart'; -part 'model/user_admin_delete_dto.dart'; -part 'model/user_admin_response_dto.dart'; -part 'model/user_admin_update_dto.dart'; -part 'model/user_avatar_color.dart'; -part 'model/user_license.dart'; -part 'model/user_metadata_key.dart'; -part 'model/user_preferences_response_dto.dart'; -part 'model/user_preferences_update_dto.dart'; -part 'model/user_response_dto.dart'; -part 'model/user_status.dart'; -part 'model/user_update_me_dto.dart'; -part 'model/validate_access_token_response_dto.dart'; -part 'model/validate_library_dto.dart'; -part 'model/validate_library_import_path_response_dto.dart'; -part 'model/validate_library_response_dto.dart'; -part 'model/version_check_state_response_dto.dart'; -part 'model/video_codec.dart'; -part 'model/video_container.dart'; -part 'model/workflow_create_dto.dart'; -part 'model/workflow_response_dto.dart'; -part 'model/workflow_share_response_dto.dart'; -part 'model/workflow_share_step_dto.dart'; -part 'model/workflow_step_dto.dart'; -part 'model/workflow_trigger.dart'; -part 'model/workflow_trigger_response_dto.dart'; -part 'model/workflow_type.dart'; -part 'model/workflow_update_dto.dart'; - - -/// An [ApiClient] instance that uses the default values obtained from -/// the OpenAPI specification file. -var defaultApiClient = ApiClient(); - -const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; -const _dateEpochMarker = 'epoch'; -const _deepEquality = DeepCollectionEquality(); -final _dateFormatter = DateFormat('yyyy-MM-dd'); -final _regList = RegExp(r'^List<(.*)>$'); -final _regSet = RegExp(r'^Set<(.*)>$'); -final _regMap = RegExp(r'^Map$'); - -bool _isEpochMarker(String? pattern) => pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/mobile/openapi/lib/api/activities_api.dart b/mobile/openapi/lib/api/activities_api.dart deleted file mode 100644 index 490c418785..0000000000 --- a/mobile/openapi/lib/api/activities_api.dart +++ /dev/null @@ -1,291 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class ActivitiesApi { - ActivitiesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create an activity - /// - /// Create a like or a comment for an album, or an asset in an album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [ActivityCreateDto] activityCreateDto (required): - Future createActivityWithHttpInfo(ActivityCreateDto activityCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities'; - - // ignore: prefer_final_locals - Object? postBody = activityCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create an activity - /// - /// Create a like or a comment for an album, or an asset in an album. - /// - /// Parameters: - /// - /// * [ActivityCreateDto] activityCreateDto (required): - Future createActivity(ActivityCreateDto activityCreateDto, { Future? abortTrigger, }) async { - final response = await createActivityWithHttpInfo(activityCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ActivityResponseDto',) as ActivityResponseDto; - - } - return null; - } - - /// Delete an activity - /// - /// Removes a like or comment from a given album or asset in an album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteActivityWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete an activity - /// - /// Removes a like or comment from a given album or asset in an album. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteActivity(String id, { Future? abortTrigger, }) async { - final response = await deleteActivityWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// List all activities - /// - /// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - /// - /// * [ReactionLevel] level: - /// - /// * [ReactionType] type: - /// - /// * [String] userId: - /// Filter by user ID - Future getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'albumId', albumId)); - if (assetId != null) { - queryParams.addAll(_queryParams('', 'assetId', assetId)); - } - if (level != null) { - queryParams.addAll(_queryParams('', 'level', level)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - if (userId != null) { - queryParams.addAll(_queryParams('', 'userId', userId)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all activities - /// - /// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - /// - /// * [ReactionLevel] level: - /// - /// * [ReactionType] type: - /// - /// * [String] userId: - /// Filter by user ID - Future?> getActivities(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, Future? abortTrigger, }) async { - final response = await getActivitiesWithHttpInfo(albumId, assetId: assetId, level: level, type: type, userId: userId, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve activity statistics - /// - /// Returns the number of likes and comments for a given album or asset in an album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - Future getActivityStatisticsWithHttpInfo(String albumId, { String? assetId, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'albumId', albumId)); - if (assetId != null) { - queryParams.addAll(_queryParams('', 'assetId', assetId)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve activity statistics - /// - /// Returns the number of likes and comments for a given album or asset in an album. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - Future getActivityStatistics(String albumId, { String? assetId, Future? abortTrigger, }) async { - final response = await getActivityStatisticsWithHttpInfo(albumId, assetId: assetId, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ActivityStatisticsResponseDto',) as ActivityStatisticsResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/albums_api.dart b/mobile/openapi/lib/api/albums_api.dart deleted file mode 100644 index 6ac978f701..0000000000 --- a/mobile/openapi/lib/api/albums_api.dart +++ /dev/null @@ -1,858 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class AlbumsApi { - AlbumsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Add assets to an album - /// - /// Add multiple assets to a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future addAssetsToAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to an album - /// - /// Add multiple assets to a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> addAssetsToAlbum(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await addAssetsToAlbumWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Add assets to albums - /// - /// Send a list of asset IDs and album IDs to add each asset to each album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AlbumsAddAssetsDto] albumsAddAssetsDto (required): - Future addAssetsToAlbumsWithHttpInfo(AlbumsAddAssetsDto albumsAddAssetsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/assets'; - - // ignore: prefer_final_locals - Object? postBody = albumsAddAssetsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to albums - /// - /// Send a list of asset IDs and album IDs to add each asset to each album. - /// - /// Parameters: - /// - /// * [AlbumsAddAssetsDto] albumsAddAssetsDto (required): - Future addAssetsToAlbums(AlbumsAddAssetsDto albumsAddAssetsDto, { Future? abortTrigger, }) async { - final response = await addAssetsToAlbumsWithHttpInfo(albumsAddAssetsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumsAddAssetsResponseDto',) as AlbumsAddAssetsResponseDto; - - } - return null; - } - - /// Share album with users - /// - /// Share an album with multiple users. Each user can be given a specific role in the album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AddUsersDto] addUsersDto (required): - Future addUsersToAlbumWithHttpInfo(String id, AddUsersDto addUsersDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/users' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = addUsersDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Share album with users - /// - /// Share an album with multiple users. Each user can be given a specific role in the album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AddUsersDto] addUsersDto (required): - Future addUsersToAlbum(String id, AddUsersDto addUsersDto, { Future? abortTrigger, }) async { - final response = await addUsersToAlbumWithHttpInfo(id, addUsersDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Create an album - /// - /// Create a new album. The album can also be created with initial users and assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [CreateAlbumDto] createAlbumDto (required): - Future createAlbumWithHttpInfo(CreateAlbumDto createAlbumDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums'; - - // ignore: prefer_final_locals - Object? postBody = createAlbumDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create an album - /// - /// Create a new album. The album can also be created with initial users and assets. - /// - /// Parameters: - /// - /// * [CreateAlbumDto] createAlbumDto (required): - Future createAlbum(CreateAlbumDto createAlbumDto, { Future? abortTrigger, }) async { - final response = await createAlbumWithHttpInfo(createAlbumDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Delete an album - /// - /// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteAlbumWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete an album - /// - /// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteAlbum(String id, { Future? abortTrigger, }) async { - final response = await deleteAlbumWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve an album - /// - /// Retrieve information about a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAlbumInfoWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve an album - /// - /// Retrieve information about a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAlbumInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getAlbumInfoWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Retrieve album map markers - /// - /// Retrieve map marker information for a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAlbumMapMarkersWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/map-markers' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve album map markers - /// - /// Retrieve map marker information for a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future?> getAlbumMapMarkers(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getAlbumMapMarkersWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve album statistics - /// - /// Returns statistics about the albums available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - Future getAlbumStatisticsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve album statistics - /// - /// Returns statistics about the albums available to the authenticated user. - Future getAlbumStatistics({ Future? abortTrigger, }) async { - final response = await getAlbumStatisticsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumStatisticsResponseDto',) as AlbumStatisticsResponseDto; - - } - return null; - } - - /// List all albums - /// - /// Retrieve a list of albums available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] assetId: - /// Filter albums containing this asset ID (ignores other parameters) - /// - /// * [String] id: - /// Album ID - /// - /// * [bool] isOwned: - /// Filter by ownership: true = only owned, false = only shared-with-me, undefined = no filter - /// - /// * [bool] isShared: - /// Filter by shared status: true = only shared, false = not shared, undefined = no filter - /// - /// * [String] name: - /// Album name (exact match) - Future getAllAlbumsWithHttpInfo({ String? assetId, String? id, bool? isOwned, bool? isShared, String? name, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (assetId != null) { - queryParams.addAll(_queryParams('', 'assetId', assetId)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (isOwned != null) { - queryParams.addAll(_queryParams('', 'isOwned', isOwned)); - } - if (isShared != null) { - queryParams.addAll(_queryParams('', 'isShared', isShared)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all albums - /// - /// Retrieve a list of albums available to the authenticated user. - /// - /// Parameters: - /// - /// * [String] assetId: - /// Filter albums containing this asset ID (ignores other parameters) - /// - /// * [String] id: - /// Album ID - /// - /// * [bool] isOwned: - /// Filter by ownership: true = only owned, false = only shared-with-me, undefined = no filter - /// - /// * [bool] isShared: - /// Filter by shared status: true = only shared, false = not shared, undefined = no filter - /// - /// * [String] name: - /// Album name (exact match) - Future?> getAllAlbums({ String? assetId, String? id, bool? isOwned, bool? isShared, String? name, Future? abortTrigger, }) async { - final response = await getAllAlbumsWithHttpInfo(assetId: assetId, id: id, isOwned: isOwned, isShared: isShared, name: name, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Remove assets from an album - /// - /// Remove multiple assets from a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future removeAssetFromAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove assets from an album - /// - /// Remove multiple assets from a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> removeAssetFromAlbum(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await removeAssetFromAlbumWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Remove user from album - /// - /// Remove a user from an album. Use an ID of \"me\" to leave a shared album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Album ID - /// - /// * [String] userId (required): - /// Album user ID, or \"me\" to reference the current user. - Future removeUserFromAlbumWithHttpInfo(String id, String userId, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/user/{userId}' - .replaceAll('{id}', id) - .replaceAll('{userId}', userId); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove user from album - /// - /// Remove a user from an album. Use an ID of \"me\" to leave a shared album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Album ID - /// - /// * [String] userId (required): - /// Album user ID, or \"me\" to reference the current user. - Future removeUserFromAlbum(String id, String userId, { Future? abortTrigger, }) async { - final response = await removeUserFromAlbumWithHttpInfo(id, userId, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update an album - /// - /// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAlbumDto] updateAlbumDto (required): - Future updateAlbumInfoWithHttpInfo(String id, UpdateAlbumDto updateAlbumDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateAlbumDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PATCH', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an album - /// - /// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAlbumDto] updateAlbumDto (required): - Future updateAlbumInfo(String id, UpdateAlbumDto updateAlbumDto, { Future? abortTrigger, }) async { - final response = await updateAlbumInfoWithHttpInfo(id, updateAlbumDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Update user role - /// - /// Change the role for a specific user in a specific album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Album ID - /// - /// * [String] userId (required): - /// Album user ID, or \"me\" to reference the current user. - /// - /// * [UpdateAlbumUserDto] updateAlbumUserDto (required): - Future updateAlbumUserWithHttpInfo(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/user/{userId}' - .replaceAll('{id}', id) - .replaceAll('{userId}', userId); - - // ignore: prefer_final_locals - Object? postBody = updateAlbumUserDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user role - /// - /// Change the role for a specific user in a specific album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Album ID - /// - /// * [String] userId (required): - /// Album user ID, or \"me\" to reference the current user. - /// - /// * [UpdateAlbumUserDto] updateAlbumUserDto (required): - Future updateAlbumUser(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto, { Future? abortTrigger, }) async { - final response = await updateAlbumUserWithHttpInfo(id, userId, updateAlbumUserDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/api_keys_api.dart b/mobile/openapi/lib/api/api_keys_api.dart deleted file mode 100644 index c26ddc263d..0000000000 --- a/mobile/openapi/lib/api/api_keys_api.dart +++ /dev/null @@ -1,346 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class APIKeysApi { - APIKeysApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create an API key - /// - /// Creates a new API key. It will be limited to the permissions specified. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [ApiKeyCreateDto] apiKeyCreateDto (required): - Future createApiKeyWithHttpInfo(ApiKeyCreateDto apiKeyCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys'; - - // ignore: prefer_final_locals - Object? postBody = apiKeyCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create an API key - /// - /// Creates a new API key. It will be limited to the permissions specified. - /// - /// Parameters: - /// - /// * [ApiKeyCreateDto] apiKeyCreateDto (required): - Future createApiKey(ApiKeyCreateDto apiKeyCreateDto, { Future? abortTrigger, }) async { - final response = await createApiKeyWithHttpInfo(apiKeyCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyCreateResponseDto',) as ApiKeyCreateResponseDto; - - } - return null; - } - - /// Delete an API key - /// - /// Deletes an API key identified by its ID. The current user must own this API key. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteApiKeyWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete an API key - /// - /// Deletes an API key identified by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteApiKey(String id, { Future? abortTrigger, }) async { - final response = await deleteApiKeyWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve an API key - /// - /// Retrieve an API key by its ID. The current user must own this API key. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getApiKeyWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve an API key - /// - /// Retrieve an API key by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getApiKey(String id, { Future? abortTrigger, }) async { - final response = await getApiKeyWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } - - /// List all API keys - /// - /// Retrieve all API keys of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future getApiKeysWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all API keys - /// - /// Retrieve all API keys of the current user. - Future?> getApiKeys({ Future? abortTrigger, }) async { - final response = await getApiKeysWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve the current API key - /// - /// Retrieve the API key that is used to access this endpoint. - /// - /// Note: This method returns the HTTP [Response]. - Future getMyApiKeyWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/me'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve the current API key - /// - /// Retrieve the API key that is used to access this endpoint. - Future getMyApiKey({ Future? abortTrigger, }) async { - final response = await getMyApiKeyWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } - - /// Update an API key - /// - /// Updates the name and permissions of an API key by its ID. The current user must own this API key. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKeyWithHttpInfo(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = apiKeyUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an API key - /// - /// Updates the name and permissions of an API key by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKey(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - final response = await updateApiKeyWithHttpInfo(id, apiKeyUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/assets_api.dart b/mobile/openapi/lib/api/assets_api.dart deleted file mode 100644 index fa49d382b9..0000000000 --- a/mobile/openapi/lib/api/assets_api.dart +++ /dev/null @@ -1,1834 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class AssetsApi { - AssetsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Check bulk upload - /// - /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required): - Future checkBulkUploadWithHttpInfo(AssetBulkUploadCheckDto assetBulkUploadCheckDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/bulk-upload-check'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkUploadCheckDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Check bulk upload - /// - /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. - /// - /// Parameters: - /// - /// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required): - Future checkBulkUpload(AssetBulkUploadCheckDto assetBulkUploadCheckDto, { Future? abortTrigger, }) async { - final response = await checkBulkUploadWithHttpInfo(assetBulkUploadCheckDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetBulkUploadCheckResponseDto',) as AssetBulkUploadCheckResponseDto; - - } - return null; - } - - /// Copy asset - /// - /// Copy asset information like albums, tags, etc. from one asset to another. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetCopyDto] assetCopyDto (required): - Future copyAssetWithHttpInfo(AssetCopyDto assetCopyDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/copy'; - - // ignore: prefer_final_locals - Object? postBody = assetCopyDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Copy asset - /// - /// Copy asset information like albums, tags, etc. from one asset to another. - /// - /// Parameters: - /// - /// * [AssetCopyDto] assetCopyDto (required): - Future copyAsset(AssetCopyDto assetCopyDto, { Future? abortTrigger, }) async { - final response = await copyAssetWithHttpInfo(assetCopyDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete asset metadata by key - /// - /// Delete a specific metadata key-value pair associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future deleteAssetMetadataWithHttpInfo(String id, String key, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata/{key}' - .replaceAll('{id}', id) - .replaceAll('{key}', key); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete asset metadata by key - /// - /// Delete a specific metadata key-value pair associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future deleteAssetMetadata(String id, String key, { Future? abortTrigger, }) async { - final response = await deleteAssetMetadataWithHttpInfo(id, key, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete assets - /// - /// Deletes multiple assets at the same time. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkDeleteDto] assetBulkDeleteDto (required): - Future deleteAssetsWithHttpInfo(AssetBulkDeleteDto assetBulkDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete assets - /// - /// Deletes multiple assets at the same time. - /// - /// Parameters: - /// - /// * [AssetBulkDeleteDto] assetBulkDeleteDto (required): - Future deleteAssets(AssetBulkDeleteDto assetBulkDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteAssetsWithHttpInfo(assetBulkDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete asset metadata - /// - /// Delete metadata key-value pairs for multiple assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkDeleteDto] assetMetadataBulkDeleteDto (required): - Future deleteBulkAssetMetadataWithHttpInfo(AssetMetadataBulkDeleteDto assetMetadataBulkDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/metadata'; - - // ignore: prefer_final_locals - Object? postBody = assetMetadataBulkDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete asset metadata - /// - /// Delete metadata key-value pairs for multiple assets. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkDeleteDto] assetMetadataBulkDeleteDto (required): - Future deleteBulkAssetMetadata(AssetMetadataBulkDeleteDto assetMetadataBulkDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteBulkAssetMetadataWithHttpInfo(assetMetadataBulkDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Download original asset - /// - /// Downloads the original file of the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadAssetWithHttpInfo(String id, { bool? edited, String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/original' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (edited != null) { - queryParams.addAll(_queryParams('', 'edited', edited)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download original asset - /// - /// Downloads the original file of the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadAsset(String id, { bool? edited, String? key, String? slug, Future? abortTrigger, }) async { - final response = await downloadAssetWithHttpInfo(id, edited: edited, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Apply edits to an existing asset - /// - /// Apply a series of edit actions (crop, rotate, mirror) to the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetEditsCreateDto] assetEditsCreateDto (required): - Future editAssetWithHttpInfo(String id, AssetEditsCreateDto assetEditsCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/edits' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetEditsCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Apply edits to an existing asset - /// - /// Apply a series of edit actions (crop, rotate, mirror) to the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetEditsCreateDto] assetEditsCreateDto (required): - Future editAsset(String id, AssetEditsCreateDto assetEditsCreateDto, { Future? abortTrigger, }) async { - final response = await editAssetWithHttpInfo(id, assetEditsCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetEditsResponseDto',) as AssetEditsResponseDto; - - } - return null; - } - - /// End HLS streaming session - /// - /// Releases server resources for the streaming session. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future endSessionWithHttpInfo(String id, String sessionId, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/{sessionId}' - .replaceAll('{id}', id) - .replaceAll('{sessionId}', sessionId); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// End HLS streaming session - /// - /// Releases server resources for the streaming session. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future endSession(String id, String sessionId, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await endSessionWithHttpInfo(id, sessionId, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve edits for an existing asset - /// - /// Retrieve a series of edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetEditsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/edits' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve edits for an existing asset - /// - /// Retrieve a series of edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetEdits(String id, { Future? abortTrigger, }) async { - final response = await getAssetEditsWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetEditsResponseDto',) as AssetEditsResponseDto; - - } - return null; - } - - /// Retrieve an asset - /// - /// Retrieve detailed information about a specific asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAssetInfoWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve an asset - /// - /// Retrieve detailed information about a specific asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAssetInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getAssetInfoWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetResponseDto',) as AssetResponseDto; - - } - return null; - } - - /// Get asset metadata - /// - /// Retrieve all metadata key-value pairs associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetMetadataWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get asset metadata - /// - /// Retrieve all metadata key-value pairs associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future?> getAssetMetadata(String id, { Future? abortTrigger, }) async { - final response = await getAssetMetadataWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve asset metadata by key - /// - /// Retrieve the value of a specific metadata key associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future getAssetMetadataByKeyWithHttpInfo(String id, String key, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata/{key}' - .replaceAll('{id}', id) - .replaceAll('{key}', key); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve asset metadata by key - /// - /// Retrieve the value of a specific metadata key associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future getAssetMetadataByKey(String id, String key, { Future? abortTrigger, }) async { - final response = await getAssetMetadataByKeyWithHttpInfo(id, key, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetMetadataResponseDto',) as AssetMetadataResponseDto; - - } - return null; - } - - /// Retrieve asset OCR data - /// - /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetOcrWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/ocr' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve asset OCR data - /// - /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future?> getAssetOcr(String id, { Future? abortTrigger, }) async { - final response = await getAssetOcrWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Get asset statistics - /// - /// Retrieve various statistics about the assets owned by the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getAssetStatisticsWithHttpInfo({ bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get asset statistics - /// - /// Retrieve various statistics about the assets owned by the authenticated user. - /// - /// Parameters: - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getAssetStatistics({ bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - final response = await getAssetStatisticsWithHttpInfo(isFavorite: isFavorite, isTrashed: isTrashed, visibility: visibility, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetStatsResponseDto',) as AssetStatsResponseDto; - - } - return null; - } - - /// Get HLS main playlist - /// - /// Returns an HLS main playlist with all available variants for the asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMainPlaylistWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/main.m3u8' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get HLS main playlist - /// - /// Returns an HLS main playlist with all available variants for the asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMainPlaylist(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getMainPlaylistWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - - } - return null; - } - - /// Get HLS media playlist - /// - /// Returns an HLS media playlist for one variant of the streaming session. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [num] xImmichHlsPos: - Future getMediaPlaylistWithHttpInfo(String id, String sessionId, int variantIndex, { String? key, String? slug, num? xImmichHlsPos, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/{sessionId}/{variantIndex}/playlist.m3u8' - .replaceAll('{id}', id) - .replaceAll('{sessionId}', sessionId) - .replaceAll('{variantIndex}', variantIndex.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - if (xImmichHlsPos != null) { - headerParams[r'x-immich-hls-pos'] = parameterToString(xImmichHlsPos); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get HLS media playlist - /// - /// Returns an HLS media playlist for one variant of the streaming session. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [num] xImmichHlsPos: - Future getMediaPlaylist(String id, String sessionId, int variantIndex, { String? key, String? slug, num? xImmichHlsPos, Future? abortTrigger, }) async { - final response = await getMediaPlaylistWithHttpInfo(id, sessionId, variantIndex, key: key, slug: slug, xImmichHlsPos: xImmichHlsPos, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - - } - return null; - } - - /// Get HLS segment or init file - /// - /// Streams an HLS init segment (init.mp4) or media segment (seg_N.m4s). - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] filename (required): - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [int] xImmichHlsMsn: - Future getSegmentWithHttpInfo(String filename, String id, String sessionId, int variantIndex, { String? key, String? slug, int? xImmichHlsMsn, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/{sessionId}/{variantIndex}/{filename}' - .replaceAll('{filename}', filename) - .replaceAll('{id}', id) - .replaceAll('{sessionId}', sessionId) - .replaceAll('{variantIndex}', variantIndex.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - if (xImmichHlsMsn != null) { - headerParams[r'x-immich-hls-msn'] = parameterToString(xImmichHlsMsn); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get HLS segment or init file - /// - /// Streams an HLS init segment (init.mp4) or media segment (seg_N.m4s). - /// - /// Parameters: - /// - /// * [String] filename (required): - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [int] xImmichHlsMsn: - Future getSegment(String filename, String id, String sessionId, int variantIndex, { String? key, String? slug, int? xImmichHlsMsn, Future? abortTrigger, }) async { - final response = await getSegmentWithHttpInfo(filename, id, sessionId, variantIndex, key: key, slug: slug, xImmichHlsMsn: xImmichHlsMsn, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Play asset video - /// - /// Streams the video file for the specified asset. This endpoint also supports byte range requests. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future playAssetVideoWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/playback' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Play asset video - /// - /// Streams the video file for the specified asset. This endpoint also supports byte range requests. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future playAssetVideo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await playAssetVideoWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Remove edits from an existing asset - /// - /// Removes all edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeAssetEditsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/edits' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove edits from an existing asset - /// - /// Removes all edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeAssetEdits(String id, { Future? abortTrigger, }) async { - final response = await removeAssetEditsWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Run an asset job - /// - /// Run a specific job on a set of assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetJobsDto] assetJobsDto (required): - Future runAssetJobsWithHttpInfo(AssetJobsDto assetJobsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/jobs'; - - // ignore: prefer_final_locals - Object? postBody = assetJobsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Run an asset job - /// - /// Run a specific job on a set of assets. - /// - /// Parameters: - /// - /// * [AssetJobsDto] assetJobsDto (required): - Future runAssetJobs(AssetJobsDto assetJobsDto, { Future? abortTrigger, }) async { - final response = await runAssetJobsWithHttpInfo(assetJobsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAssetWithHttpInfo(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateAssetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAsset(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - final response = await updateAssetWithHttpInfo(id, updateAssetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetResponseDto',) as AssetResponseDto; - - } - return null; - } - - /// Update asset metadata - /// - /// Update or add metadata key-value pairs for the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetMetadataUpsertDto] assetMetadataUpsertDto (required): - Future updateAssetMetadataWithHttpInfo(String id, AssetMetadataUpsertDto assetMetadataUpsertDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetMetadataUpsertDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update asset metadata - /// - /// Update or add metadata key-value pairs for the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetMetadataUpsertDto] assetMetadataUpsertDto (required): - Future?> updateAssetMetadata(String id, AssetMetadataUpsertDto assetMetadataUpsertDto, { Future? abortTrigger, }) async { - final response = await updateAssetMetadataWithHttpInfo(id, assetMetadataUpsertDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssetsWithHttpInfo(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssets(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - final response = await updateAssetsWithHttpInfo(assetBulkUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Upsert asset metadata - /// - /// Upsert metadata key-value pairs for multiple assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkUpsertDto] assetMetadataBulkUpsertDto (required): - Future updateBulkAssetMetadataWithHttpInfo(AssetMetadataBulkUpsertDto assetMetadataBulkUpsertDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/metadata'; - - // ignore: prefer_final_locals - Object? postBody = assetMetadataBulkUpsertDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upsert asset metadata - /// - /// Upsert metadata key-value pairs for multiple assets. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkUpsertDto] assetMetadataBulkUpsertDto (required): - Future?> updateBulkAssetMetadata(AssetMetadataBulkUpsertDto assetMetadataBulkUpsertDto, { Future? abortTrigger, }) async { - final response = await updateBulkAssetMetadataWithHttpInfo(assetMetadataBulkUpsertDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Upload asset - /// - /// Uploads a new asset to the server. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MultipartFile] assetData (required): - /// Asset file data - /// - /// * [DateTime] fileCreatedAt (required): - /// File creation date - /// - /// * [DateTime] fileModifiedAt (required): - /// File modification date - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [String] xImmichChecksum: - /// sha1 checksum that can be used for duplicate detection before the file is uploaded - /// - /// * [int] duration: - /// Duration in milliseconds (for videos) - /// - /// * [String] filename: - /// Filename - /// - /// * [bool] isFavorite: - /// Mark as favorite - /// - /// * [String] livePhotoVideoId: - /// Live photo video ID - /// - /// * [List] metadata: - /// Asset metadata items - /// - /// * [MultipartFile] sidecarData: - /// Sidecar file data - /// - /// * [AssetVisibility] visibility: - Future uploadAssetWithHttpInfo(MultipartFile assetData, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? xImmichChecksum, int? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, List? metadata, MultipartFile? sidecarData, AssetVisibility? visibility, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - if (xImmichChecksum != null) { - headerParams[r'x-immich-checksum'] = parameterToString(xImmichChecksum); - } - - const contentTypes = ['multipart/form-data']; - - bool hasFields = false; - final mp = MultipartRequest('POST', Uri.parse(apiPath)); - if (assetData != null) { - hasFields = true; - mp.fields[r'assetData'] = assetData.field; - mp.files.add(assetData); - } - if (duration != null) { - hasFields = true; - mp.fields[r'duration'] = parameterToString(duration); - } - if (fileCreatedAt != null) { - hasFields = true; - mp.fields[r'fileCreatedAt'] = parameterToString(fileCreatedAt); - } - if (fileModifiedAt != null) { - hasFields = true; - mp.fields[r'fileModifiedAt'] = parameterToString(fileModifiedAt); - } - if (filename != null) { - hasFields = true; - mp.fields[r'filename'] = parameterToString(filename); - } - if (isFavorite != null) { - hasFields = true; - mp.fields[r'isFavorite'] = parameterToString(isFavorite); - } - if (livePhotoVideoId != null) { - hasFields = true; - mp.fields[r'livePhotoVideoId'] = parameterToString(livePhotoVideoId); - } - if (metadata != null) { - hasFields = true; - mp.fields[r'metadata'] = parameterToString(metadata); - } - if (sidecarData != null) { - hasFields = true; - mp.fields[r'sidecarData'] = sidecarData.field; - mp.files.add(sidecarData); - } - if (visibility != null) { - hasFields = true; - mp.fields[r'visibility'] = parameterToString(visibility); - } - if (hasFields) { - postBody = mp; - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upload asset - /// - /// Uploads a new asset to the server. - /// - /// Parameters: - /// - /// * [MultipartFile] assetData (required): - /// Asset file data - /// - /// * [DateTime] fileCreatedAt (required): - /// File creation date - /// - /// * [DateTime] fileModifiedAt (required): - /// File modification date - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [String] xImmichChecksum: - /// sha1 checksum that can be used for duplicate detection before the file is uploaded - /// - /// * [int] duration: - /// Duration in milliseconds (for videos) - /// - /// * [String] filename: - /// Filename - /// - /// * [bool] isFavorite: - /// Mark as favorite - /// - /// * [String] livePhotoVideoId: - /// Live photo video ID - /// - /// * [List] metadata: - /// Asset metadata items - /// - /// * [MultipartFile] sidecarData: - /// Sidecar file data - /// - /// * [AssetVisibility] visibility: - Future uploadAsset(MultipartFile assetData, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? xImmichChecksum, int? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, List? metadata, MultipartFile? sidecarData, AssetVisibility? visibility, Future? abortTrigger, }) async { - final response = await uploadAssetWithHttpInfo(assetData, fileCreatedAt, fileModifiedAt, key: key, slug: slug, xImmichChecksum: xImmichChecksum, duration: duration, filename: filename, isFavorite: isFavorite, livePhotoVideoId: livePhotoVideoId, metadata: metadata, sidecarData: sidecarData, visibility: visibility, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetMediaResponseDto',) as AssetMediaResponseDto; - - } - return null; - } - - /// View asset thumbnail - /// - /// Retrieve the thumbnail image for the specified asset. Viewing the fullsize thumbnail might redirect to downloadAsset, which requires a different permission. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [AssetMediaSize] size: - /// - /// * [String] slug: - Future viewAssetWithHttpInfo(String id, { bool? edited, String? key, AssetMediaSize? size, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/thumbnail' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (edited != null) { - queryParams.addAll(_queryParams('', 'edited', edited)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// View asset thumbnail - /// - /// Retrieve the thumbnail image for the specified asset. Viewing the fullsize thumbnail might redirect to downloadAsset, which requires a different permission. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [AssetMediaSize] size: - /// - /// * [String] slug: - Future viewAsset(String id, { bool? edited, String? key, AssetMediaSize? size, String? slug, Future? abortTrigger, }) async { - final response = await viewAssetWithHttpInfo(id, edited: edited, key: key, size: size, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/authentication_admin_api.dart b/mobile/openapi/lib/api/authentication_admin_api.dart deleted file mode 100644 index 2c107891b3..0000000000 --- a/mobile/openapi/lib/api/authentication_admin_api.dart +++ /dev/null @@ -1,59 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class AuthenticationAdminApi { - AuthenticationAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Unlink all OAuth accounts - /// - /// Unlinks all OAuth accounts associated with user accounts in the system. - /// - /// Note: This method returns the HTTP [Response]. - Future unlinkAllOAuthAccountsAdminWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/auth/unlink-all'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Unlink all OAuth accounts - /// - /// Unlinks all OAuth accounts associated with user accounts in the system. - Future unlinkAllOAuthAccountsAdmin({ Future? abortTrigger, }) async { - final response = await unlinkAllOAuthAccountsAdminWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/authentication_api.dart b/mobile/openapi/lib/api/authentication_api.dart deleted file mode 100644 index 8e088d040b..0000000000 --- a/mobile/openapi/lib/api/authentication_api.dart +++ /dev/null @@ -1,888 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class AuthenticationApi { - AuthenticationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Change password - /// - /// Change the password of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [ChangePasswordDto] changePasswordDto (required): - Future changePasswordWithHttpInfo(ChangePasswordDto changePasswordDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/change-password'; - - // ignore: prefer_final_locals - Object? postBody = changePasswordDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Change password - /// - /// Change the password of the current user. - /// - /// Parameters: - /// - /// * [ChangePasswordDto] changePasswordDto (required): - Future changePassword(ChangePasswordDto changePasswordDto, { Future? abortTrigger, }) async { - final response = await changePasswordWithHttpInfo(changePasswordDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Change pin code - /// - /// Change the pin code for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PinCodeChangeDto] pinCodeChangeDto (required): - Future changePinCodeWithHttpInfo(PinCodeChangeDto pinCodeChangeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/pin-code'; - - // ignore: prefer_final_locals - Object? postBody = pinCodeChangeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Change pin code - /// - /// Change the pin code for the current user. - /// - /// Parameters: - /// - /// * [PinCodeChangeDto] pinCodeChangeDto (required): - Future changePinCode(PinCodeChangeDto pinCodeChangeDto, { Future? abortTrigger, }) async { - final response = await changePinCodeWithHttpInfo(pinCodeChangeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Finish OAuth - /// - /// Complete the OAuth authorization process by exchanging the authorization code for a session token. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future finishOAuthWithHttpInfo(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/callback'; - - // ignore: prefer_final_locals - Object? postBody = oAuthCallbackDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Finish OAuth - /// - /// Complete the OAuth authorization process by exchanging the authorization code for a session token. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future finishOAuth(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - final response = await finishOAuthWithHttpInfo(oAuthCallbackDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto; - - } - return null; - } - - /// Retrieve auth status - /// - /// Get information about the current session, including whether the user has a password, and if the session can access locked assets. - /// - /// Note: This method returns the HTTP [Response]. - Future getAuthStatusWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/status'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve auth status - /// - /// Get information about the current session, including whether the user has a password, and if the session can access locked assets. - Future getAuthStatus({ Future? abortTrigger, }) async { - final response = await getAuthStatusWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AuthStatusResponseDto',) as AuthStatusResponseDto; - - } - return null; - } - - /// Link OAuth account - /// - /// Link an OAuth account to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future linkOAuthAccountWithHttpInfo(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/link'; - - // ignore: prefer_final_locals - Object? postBody = oAuthCallbackDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Link OAuth account - /// - /// Link an OAuth account to the authenticated user. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Lock auth session - /// - /// Remove elevated access to locked assets from the current session. - /// - /// Note: This method returns the HTTP [Response]. - Future lockAuthSessionWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/session/lock'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Lock auth session - /// - /// Remove elevated access to locked assets from the current session. - Future lockAuthSession({ Future? abortTrigger, }) async { - final response = await lockAuthSessionWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Login - /// - /// Login with username and password and receive a session token. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [LoginCredentialDto] loginCredentialDto (required): - Future loginWithHttpInfo(LoginCredentialDto loginCredentialDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/login'; - - // ignore: prefer_final_locals - Object? postBody = loginCredentialDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Login - /// - /// Login with username and password and receive a session token. - /// - /// Parameters: - /// - /// * [LoginCredentialDto] loginCredentialDto (required): - Future login(LoginCredentialDto loginCredentialDto, { Future? abortTrigger, }) async { - final response = await loginWithHttpInfo(loginCredentialDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto; - - } - return null; - } - - /// Logout - /// - /// Logout the current user and invalidate the session token. - /// - /// Note: This method returns the HTTP [Response]. - Future logoutWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/logout'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Logout - /// - /// Logout the current user and invalidate the session token. - Future logout({ Future? abortTrigger, }) async { - final response = await logoutWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LogoutResponseDto',) as LogoutResponseDto; - - } - return null; - } - - /// Backchannel OAuth logout - /// - /// Logout the OAuth account and invalidate the session specified by the sid claim or all sessions if the sid claim is not present. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] logoutToken (required): - /// OAuth logout token - Future logoutOAuthWithHttpInfo(String logoutToken, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/backchannel-logout'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/x-www-form-urlencoded']; - - if (logoutToken != null) { - formParams[r'logout_token'] = parameterToString(logoutToken); - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Backchannel OAuth logout - /// - /// Logout the OAuth account and invalidate the session specified by the sid claim or all sessions if the sid claim is not present. - /// - /// Parameters: - /// - /// * [String] logoutToken (required): - /// OAuth logout token - Future logoutOAuth(String logoutToken, { Future? abortTrigger, }) async { - final response = await logoutOAuthWithHttpInfo(logoutToken, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Redirect OAuth to mobile - /// - /// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting. - /// - /// Note: This method returns the HTTP [Response]. - Future redirectOAuthToMobileWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/mobile-redirect'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Redirect OAuth to mobile - /// - /// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting. - Future redirectOAuthToMobile({ Future? abortTrigger, }) async { - final response = await redirectOAuthToMobileWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Reset pin code - /// - /// Reset the pin code for the current user by providing the account password - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PinCodeResetDto] pinCodeResetDto (required): - Future resetPinCodeWithHttpInfo(PinCodeResetDto pinCodeResetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/pin-code'; - - // ignore: prefer_final_locals - Object? postBody = pinCodeResetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Reset pin code - /// - /// Reset the pin code for the current user by providing the account password - /// - /// Parameters: - /// - /// * [PinCodeResetDto] pinCodeResetDto (required): - Future resetPinCode(PinCodeResetDto pinCodeResetDto, { Future? abortTrigger, }) async { - final response = await resetPinCodeWithHttpInfo(pinCodeResetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Setup pin code - /// - /// Setup a new pin code for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PinCodeSetupDto] pinCodeSetupDto (required): - Future setupPinCodeWithHttpInfo(PinCodeSetupDto pinCodeSetupDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/pin-code'; - - // ignore: prefer_final_locals - Object? postBody = pinCodeSetupDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Setup pin code - /// - /// Setup a new pin code for the current user. - /// - /// Parameters: - /// - /// * [PinCodeSetupDto] pinCodeSetupDto (required): - Future setupPinCode(PinCodeSetupDto pinCodeSetupDto, { Future? abortTrigger, }) async { - final response = await setupPinCodeWithHttpInfo(pinCodeSetupDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Register admin - /// - /// Create the first admin user in the system. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SignUpDto] signUpDto (required): - Future signUpAdminWithHttpInfo(SignUpDto signUpDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/admin-sign-up'; - - // ignore: prefer_final_locals - Object? postBody = signUpDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Register admin - /// - /// Create the first admin user in the system. - /// - /// Parameters: - /// - /// * [SignUpDto] signUpDto (required): - Future signUpAdmin(SignUpDto signUpDto, { Future? abortTrigger, }) async { - final response = await signUpAdminWithHttpInfo(signUpDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Start OAuth - /// - /// Initiate the OAuth authorization process. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/authorize'; - - // ignore: prefer_final_locals - Object? postBody = oAuthConfigDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Start OAuth - /// - /// Initiate the OAuth authorization process. - /// - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuth(OAuthConfigDto oAuthConfigDto, { Future? abortTrigger, }) async { - final response = await startOAuthWithHttpInfo(oAuthConfigDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthAuthorizeResponseDto',) as OAuthAuthorizeResponseDto; - - } - return null; - } - - /// Unlink OAuth account - /// - /// Unlink the OAuth account from the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - Future unlinkOAuthAccountWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/unlink'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Unlink OAuth account - /// - /// Unlink the OAuth account from the authenticated user. - Future unlinkOAuthAccount({ Future? abortTrigger, }) async { - final response = await unlinkOAuthAccountWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Unlock auth session - /// - /// Temporarily grant the session elevated access to locked assets by providing the correct PIN code. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SessionUnlockDto] sessionUnlockDto (required): - Future unlockAuthSessionWithHttpInfo(SessionUnlockDto sessionUnlockDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/session/unlock'; - - // ignore: prefer_final_locals - Object? postBody = sessionUnlockDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Unlock auth session - /// - /// Temporarily grant the session elevated access to locked assets by providing the correct PIN code. - /// - /// Parameters: - /// - /// * [SessionUnlockDto] sessionUnlockDto (required): - Future unlockAuthSession(SessionUnlockDto sessionUnlockDto, { Future? abortTrigger, }) async { - final response = await unlockAuthSessionWithHttpInfo(sessionUnlockDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Validate access token - /// - /// Validate the current authorization method is still valid. - /// - /// Note: This method returns the HTTP [Response]. - Future validateAccessTokenWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/validateToken'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Validate access token - /// - /// Validate the current authorization method is still valid. - Future validateAccessToken({ Future? abortTrigger, }) async { - final response = await validateAccessTokenWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ValidateAccessTokenResponseDto',) as ValidateAccessTokenResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/database_backups_admin_api.dart b/mobile/openapi/lib/api/database_backups_admin_api.dart deleted file mode 100644 index ba393833b5..0000000000 --- a/mobile/openapi/lib/api/database_backups_admin_api.dart +++ /dev/null @@ -1,276 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class DatabaseBackupsAdminApi { - DatabaseBackupsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete database backup - /// - /// Delete a backup by its filename - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required): - Future deleteDatabaseBackupWithHttpInfo(DatabaseBackupDeleteDto databaseBackupDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups'; - - // ignore: prefer_final_locals - Object? postBody = databaseBackupDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete database backup - /// - /// Delete a backup by its filename - /// - /// Parameters: - /// - /// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required): - Future deleteDatabaseBackup(DatabaseBackupDeleteDto databaseBackupDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteDatabaseBackupWithHttpInfo(databaseBackupDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Download database backup - /// - /// Downloads the database backup file - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] filename (required): - Future downloadDatabaseBackupWithHttpInfo(String filename, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups/{filename}' - .replaceAll('{filename}', filename); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download database backup - /// - /// Downloads the database backup file - /// - /// Parameters: - /// - /// * [String] filename (required): - Future downloadDatabaseBackup(String filename, { Future? abortTrigger, }) async { - final response = await downloadDatabaseBackupWithHttpInfo(filename, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// List database backups - /// - /// Get the list of the successful and failed backups - /// - /// Note: This method returns the HTTP [Response]. - Future listDatabaseBackupsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List database backups - /// - /// Get the list of the successful and failed backups - Future listDatabaseBackups({ Future? abortTrigger, }) async { - final response = await listDatabaseBackupsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DatabaseBackupListResponseDto',) as DatabaseBackupListResponseDto; - - } - return null; - } - - /// Start database backup restore flow - /// - /// Put Immich into maintenance mode to restore a backup (Immich must not be configured) - /// - /// Note: This method returns the HTTP [Response]. - Future startDatabaseRestoreFlowWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups/start-restore'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Start database backup restore flow - /// - /// Put Immich into maintenance mode to restore a backup (Immich must not be configured) - Future startDatabaseRestoreFlow({ Future? abortTrigger, }) async { - final response = await startDatabaseRestoreFlowWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Upload database backup - /// - /// Uploads .sql/.sql.gz file to restore backup from - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MultipartFile] file: - /// Database backup file - Future uploadDatabaseBackupWithHttpInfo({ MultipartFile? file, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups/upload'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['multipart/form-data']; - - bool hasFields = false; - final mp = MultipartRequest('POST', Uri.parse(apiPath)); - if (file != null) { - hasFields = true; - mp.fields[r'file'] = file.field; - mp.files.add(file); - } - if (hasFields) { - postBody = mp; - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upload database backup - /// - /// Uploads .sql/.sql.gz file to restore backup from - /// - /// Parameters: - /// - /// * [MultipartFile] file: - /// Database backup file - Future uploadDatabaseBackup({ MultipartFile? file, Future? abortTrigger, }) async { - final response = await uploadDatabaseBackupWithHttpInfo(file: file, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/deprecated_api.dart b/mobile/openapi/lib/api/deprecated_api.dart deleted file mode 100644 index 9b4472676c..0000000000 --- a/mobile/openapi/lib/api/deprecated_api.dart +++ /dev/null @@ -1,1032 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class DeprecatedApi { - DeprecatedApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecatedWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecated(String id, { Future? abortTrigger, }) async { - final response = await createPartnerDeprecatedWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - /// - /// Note: This method returns the HTTP [Response]. - Future getQueuesLegacyWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - Future getQueuesLegacy({ Future? abortTrigger, }) async { - final response = await getQueuesLegacyWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto; - - } - return null; - } - - /// Run jobs - /// - /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueCommandDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Run jobs - /// - /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto; - - } - return null; - } - - /// Update an API key - /// - /// Updates the name and permissions of an API key by its ID. The current user must own this API key. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKeyWithHttpInfo(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = apiKeyUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an API key - /// - /// Updates the name and permissions of an API key by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKey(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - final response = await updateApiKeyWithHttpInfo(id, apiKeyUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAssetWithHttpInfo(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateAssetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAsset(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - final response = await updateAssetWithHttpInfo(id, updateAssetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetResponseDto',) as AssetResponseDto; - - } - return null; - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssetsWithHttpInfo(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssets(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - final response = await updateAssetsWithHttpInfo(assetBulkUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibraryWithHttpInfo(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibrary(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - final response = await updateLibraryWithHttpInfo(id, updateLibraryDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemoryWithHttpInfo(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = memoryUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemory(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMemoryWithHttpInfo(id, memoryUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferencesWithHttpInfo(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/preferences'; - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferences(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMyPreferencesWithHttpInfo(userPreferencesUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUserWithHttpInfo(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me'; - - // ignore: prefer_final_locals - Object? postBody = userUpdateMeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUser(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - final response = await updateMyUserWithHttpInfo(userUpdateMeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Update person - /// - /// Update an individual person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePersonWithHttpInfo(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = personUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update person - /// - /// Update an individual person. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePerson(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePersonWithHttpInfo(id, personUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSessionWithHttpInfo(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = sessionUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSession(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - final response = await updateSessionWithHttpInfo(id, sessionUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SessionResponseDto',) as SessionResponseDto; - - } - return null; - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStackWithHttpInfo(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = stackUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStack(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - final response = await updateStackWithHttpInfo(id, stackUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTagWithHttpInfo(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = tagUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTag(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - final response = await updateTagWithHttpInfo(id, tagUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdminWithHttpInfo(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userAdminUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdmin(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserAdminWithHttpInfo(id, userAdminUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdminWithHttpInfo(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/preferences' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdmin(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserPreferencesAdminWithHttpInfo(id, userPreferencesUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflowWithHttpInfo(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = workflowUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflow(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - final response = await updateWorkflowWithHttpInfo(id, workflowUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/download_api.dart b/mobile/openapi/lib/api/download_api.dart deleted file mode 100644 index ac26259277..0000000000 --- a/mobile/openapi/lib/api/download_api.dart +++ /dev/null @@ -1,162 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class DownloadApi { - DownloadApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Download asset archive - /// - /// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DownloadArchiveDto] downloadArchiveDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadArchiveWithHttpInfo(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/download/archive'; - - // ignore: prefer_final_locals - Object? postBody = downloadArchiveDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download asset archive - /// - /// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint. - /// - /// Parameters: - /// - /// * [DownloadArchiveDto] downloadArchiveDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadArchive(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await downloadArchiveWithHttpInfo(downloadArchiveDto, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Retrieve download information - /// - /// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DownloadInfoDto] downloadInfoDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getDownloadInfoWithHttpInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/download/info'; - - // ignore: prefer_final_locals - Object? postBody = downloadInfoDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve download information - /// - /// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together. - /// - /// Parameters: - /// - /// * [DownloadInfoDto] downloadInfoDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getDownloadInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getDownloadInfoWithHttpInfo(downloadInfoDto, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DownloadResponseDto',) as DownloadResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/duplicates_api.dart b/mobile/openapi/lib/api/duplicates_api.dart deleted file mode 100644 index 357947b889..0000000000 --- a/mobile/openapi/lib/api/duplicates_api.dart +++ /dev/null @@ -1,229 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class DuplicatesApi { - DuplicatesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Dismiss a duplicate group - /// - /// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteDuplicateWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Dismiss a duplicate group - /// - /// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteDuplicate(String id, { Future? abortTrigger, }) async { - final response = await deleteDuplicateWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete duplicates - /// - /// Delete multiple duplicate assets specified by their IDs. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteDuplicatesWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete duplicates - /// - /// Delete multiple duplicate assets specified by their IDs. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteDuplicates(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await deleteDuplicatesWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve duplicates - /// - /// Retrieve a list of duplicate assets available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - Future getAssetDuplicatesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve duplicates - /// - /// Retrieve a list of duplicate assets available to the authenticated user. - Future?> getAssetDuplicates({ Future? abortTrigger, }) async { - final response = await getAssetDuplicatesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Resolve duplicate groups - /// - /// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DuplicateResolveDto] duplicateResolveDto (required): - Future resolveDuplicatesWithHttpInfo(DuplicateResolveDto duplicateResolveDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates/resolve'; - - // ignore: prefer_final_locals - Object? postBody = duplicateResolveDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Resolve duplicate groups - /// - /// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates. - /// - /// Parameters: - /// - /// * [DuplicateResolveDto] duplicateResolveDto (required): - Future?> resolveDuplicates(DuplicateResolveDto duplicateResolveDto, { Future? abortTrigger, }) async { - final response = await resolveDuplicatesWithHttpInfo(duplicateResolveDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/faces_api.dart b/mobile/openapi/lib/api/faces_api.dart deleted file mode 100644 index 2a71bbbaca..0000000000 --- a/mobile/openapi/lib/api/faces_api.dart +++ /dev/null @@ -1,247 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class FacesApi { - FacesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a face - /// - /// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetFaceCreateDto] assetFaceCreateDto (required): - Future createFaceWithHttpInfo(AssetFaceCreateDto assetFaceCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces'; - - // ignore: prefer_final_locals - Object? postBody = assetFaceCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a face - /// - /// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face. - /// - /// Parameters: - /// - /// * [AssetFaceCreateDto] assetFaceCreateDto (required): - Future createFace(AssetFaceCreateDto assetFaceCreateDto, { Future? abortTrigger, }) async { - final response = await createFaceWithHttpInfo(assetFaceCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete a face - /// - /// Delete a face identified by the id. Optionally can be force deleted. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceDeleteDto] assetFaceDeleteDto (required): - Future deleteFaceWithHttpInfo(String id, AssetFaceDeleteDto assetFaceDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetFaceDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a face - /// - /// Delete a face identified by the id. Optionally can be force deleted. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceDeleteDto] assetFaceDeleteDto (required): - Future deleteFace(String id, AssetFaceDeleteDto assetFaceDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteFaceWithHttpInfo(id, assetFaceDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve faces for asset - /// - /// Retrieve all faces belonging to an asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Face ID - Future getFacesWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'id', id)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve faces for asset - /// - /// Retrieve all faces belonging to an asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Face ID - Future?> getFaces(String id, { Future? abortTrigger, }) async { - final response = await getFacesWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Re-assign a face to another person - /// - /// Re-assign the face provided in the body to the person identified by the id in the path parameter. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [FaceDto] faceDto (required): - Future reassignFacesByIdWithHttpInfo(String id, FaceDto faceDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = faceDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Re-assign a face to another person - /// - /// Re-assign the face provided in the body to the person identified by the id in the path parameter. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [FaceDto] faceDto (required): - Future reassignFacesById(String id, FaceDto faceDto, { Future? abortTrigger, }) async { - final response = await reassignFacesByIdWithHttpInfo(id, faceDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/jobs_api.dart b/mobile/openapi/lib/api/jobs_api.dart deleted file mode 100644 index 287432ad9a..0000000000 --- a/mobile/openapi/lib/api/jobs_api.dart +++ /dev/null @@ -1,178 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class JobsApi { - JobsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a manual job - /// - /// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [JobCreateDto] jobCreateDto (required): - Future createJobWithHttpInfo(JobCreateDto jobCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs'; - - // ignore: prefer_final_locals - Object? postBody = jobCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a manual job - /// - /// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup. - /// - /// Parameters: - /// - /// * [JobCreateDto] jobCreateDto (required): - Future createJob(JobCreateDto jobCreateDto, { Future? abortTrigger, }) async { - final response = await createJobWithHttpInfo(jobCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - /// - /// Note: This method returns the HTTP [Response]. - Future getQueuesLegacyWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - Future getQueuesLegacy({ Future? abortTrigger, }) async { - final response = await getQueuesLegacyWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto; - - } - return null; - } - - /// Run jobs - /// - /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueCommandDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Run jobs - /// - /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/libraries_api.dart b/mobile/openapi/lib/api/libraries_api.dart deleted file mode 100644 index a3b3086994..0000000000 --- a/mobile/openapi/lib/api/libraries_api.dart +++ /dev/null @@ -1,467 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class LibrariesApi { - LibrariesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a library - /// - /// Create a new external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [CreateLibraryDto] createLibraryDto (required): - Future createLibraryWithHttpInfo(CreateLibraryDto createLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries'; - - // ignore: prefer_final_locals - Object? postBody = createLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a library - /// - /// Create a new external library. - /// - /// Parameters: - /// - /// * [CreateLibraryDto] createLibraryDto (required): - Future createLibrary(CreateLibraryDto createLibraryDto, { Future? abortTrigger, }) async { - final response = await createLibraryWithHttpInfo(createLibraryDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Delete a library - /// - /// Delete an external library by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteLibraryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a library - /// - /// Delete an external library by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteLibrary(String id, { Future? abortTrigger, }) async { - final response = await deleteLibraryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve libraries - /// - /// Retrieve a list of external libraries. - /// - /// Note: This method returns the HTTP [Response]. - Future getAllLibrariesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve libraries - /// - /// Retrieve a list of external libraries. - Future?> getAllLibraries({ Future? abortTrigger, }) async { - final response = await getAllLibrariesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve a library - /// - /// Retrieve an external library by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibraryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a library - /// - /// Retrieve an external library by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibrary(String id, { Future? abortTrigger, }) async { - final response = await getLibraryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Retrieve library statistics - /// - /// Retrieve statistics for a specific external library, including number of videos, images, and storage usage. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibraryStatisticsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}/statistics' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve library statistics - /// - /// Retrieve statistics for a specific external library, including number of videos, images, and storage usage. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibraryStatistics(String id, { Future? abortTrigger, }) async { - final response = await getLibraryStatisticsWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryStatsResponseDto',) as LibraryStatsResponseDto; - - } - return null; - } - - /// Scan a library - /// - /// Queue a scan for the external library to find and import new assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future scanLibraryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}/scan' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Scan a library - /// - /// Queue a scan for the external library to find and import new assets. - /// - /// Parameters: - /// - /// * [String] id (required): - Future scanLibrary(String id, { Future? abortTrigger, }) async { - final response = await scanLibraryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibraryWithHttpInfo(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibrary(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - final response = await updateLibraryWithHttpInfo(id, updateLibraryDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Validate library settings - /// - /// Validate the settings of an external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ValidateLibraryDto] validateLibraryDto (required): - Future validateWithHttpInfo(String id, ValidateLibraryDto validateLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}/validate' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = validateLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Validate library settings - /// - /// Validate the settings of an external library. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ValidateLibraryDto] validateLibraryDto (required): - Future validate(String id, ValidateLibraryDto validateLibraryDto, { Future? abortTrigger, }) async { - final response = await validateWithHttpInfo(id, validateLibraryDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ValidateLibraryResponseDto',) as ValidateLibraryResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/maintenance_admin_api.dart b/mobile/openapi/lib/api/maintenance_admin_api.dart deleted file mode 100644 index 3e43f6d51a..0000000000 --- a/mobile/openapi/lib/api/maintenance_admin_api.dart +++ /dev/null @@ -1,514 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class MaintenanceAdminApi { - MaintenanceAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete integrity report item - /// - /// Delete a given report item and perform corresponding deletion (e.g. trash asset, delete file) - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteIntegrityReportWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete integrity report item - /// - /// Delete a given report item and perform corresponding deletion (e.g. trash asset, delete file) - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteIntegrityReport(String id, { Future? abortTrigger, }) async { - final response = await deleteIntegrityReportWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Detect existing install - /// - /// Collect integrity checks and other heuristics about local data. - /// - /// Note: This method returns the HTTP [Response]. - Future detectPriorInstallWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance/detect-install'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Detect existing install - /// - /// Collect integrity checks and other heuristics about local data. - Future detectPriorInstall({ Future? abortTrigger, }) async { - final response = await detectPriorInstallWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceDetectInstallResponseDto',) as MaintenanceDetectInstallResponseDto; - - } - return null; - } - - /// Get integrity report by type - /// - /// Get all flagged items by integrity report type - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - /// - /// * [String] cursor: - /// Cursor for pagination - /// - /// * [int] limit: - /// Number of items per page - Future getIntegrityReportWithHttpInfo(IntegrityReport type, { String? cursor, int? limit, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (cursor != null) { - queryParams.addAll(_queryParams('', 'cursor', cursor)); - } - if (limit != null) { - queryParams.addAll(_queryParams('', 'limit', limit)); - } - queryParams.addAll(_queryParams('', 'type', type)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get integrity report by type - /// - /// Get all flagged items by integrity report type - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - /// - /// * [String] cursor: - /// Cursor for pagination - /// - /// * [int] limit: - /// Number of items per page - Future getIntegrityReport(IntegrityReport type, { String? cursor, int? limit, Future? abortTrigger, }) async { - final response = await getIntegrityReportWithHttpInfo(type, cursor: cursor, limit: limit, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'IntegrityReportResponseDto',) as IntegrityReportResponseDto; - - } - return null; - } - - /// Export integrity report by type as CSV - /// - /// Get all integrity report entries for a given type as a CSV - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - Future getIntegrityReportCsvWithHttpInfo(IntegrityReport type, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report/{type}/csv' - .replaceAll('{type}', type.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Export integrity report by type as CSV - /// - /// Get all integrity report entries for a given type as a CSV - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - Future getIntegrityReportCsv(IntegrityReport type, { Future? abortTrigger, }) async { - final response = await getIntegrityReportCsvWithHttpInfo(type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Download flagged file - /// - /// Download the untracked/broken file if one exists - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getIntegrityReportFileWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report/{id}/file' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download flagged file - /// - /// Download the untracked/broken file if one exists - /// - /// Parameters: - /// - /// * [String] id (required): - Future getIntegrityReportFile(String id, { Future? abortTrigger, }) async { - final response = await getIntegrityReportFileWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Get integrity report summary - /// - /// Get a count of the items flagged in each integrity report - /// - /// Note: This method returns the HTTP [Response]. - Future getIntegrityReportSummaryWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/summary'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get integrity report summary - /// - /// Get a count of the items flagged in each integrity report - Future getIntegrityReportSummary({ Future? abortTrigger, }) async { - final response = await getIntegrityReportSummaryWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'IntegrityReportSummaryResponseDto',) as IntegrityReportSummaryResponseDto; - - } - return null; - } - - /// Get maintenance mode status - /// - /// Fetch information about the currently running maintenance action. - /// - /// Note: This method returns the HTTP [Response]. - Future getMaintenanceStatusWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance/status'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get maintenance mode status - /// - /// Fetch information about the currently running maintenance action. - Future getMaintenanceStatus({ Future? abortTrigger, }) async { - final response = await getMaintenanceStatusWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceStatusResponseDto',) as MaintenanceStatusResponseDto; - - } - return null; - } - - /// Log into maintenance mode - /// - /// Login with maintenance token or cookie to receive current information and perform further actions. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MaintenanceLoginDto] maintenanceLoginDto (required): - Future maintenanceLoginWithHttpInfo(MaintenanceLoginDto maintenanceLoginDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance/login'; - - // ignore: prefer_final_locals - Object? postBody = maintenanceLoginDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Log into maintenance mode - /// - /// Login with maintenance token or cookie to receive current information and perform further actions. - /// - /// Parameters: - /// - /// * [MaintenanceLoginDto] maintenanceLoginDto (required): - Future maintenanceLogin(MaintenanceLoginDto maintenanceLoginDto, { Future? abortTrigger, }) async { - final response = await maintenanceLoginWithHttpInfo(maintenanceLoginDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceAuthDto',) as MaintenanceAuthDto; - - } - return null; - } - - /// Set maintenance mode - /// - /// Put Immich into or take it out of maintenance mode - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SetMaintenanceModeDto] setMaintenanceModeDto (required): - Future setMaintenanceModeWithHttpInfo(SetMaintenanceModeDto setMaintenanceModeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance'; - - // ignore: prefer_final_locals - Object? postBody = setMaintenanceModeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Set maintenance mode - /// - /// Put Immich into or take it out of maintenance mode - /// - /// Parameters: - /// - /// * [SetMaintenanceModeDto] setMaintenanceModeDto (required): - Future setMaintenanceMode(SetMaintenanceModeDto setMaintenanceModeDto, { Future? abortTrigger, }) async { - final response = await setMaintenanceModeWithHttpInfo(setMaintenanceModeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/map_api.dart b/mobile/openapi/lib/api/map_api.dart deleted file mode 100644 index 7e1618a875..0000000000 --- a/mobile/openapi/lib/api/map_api.dart +++ /dev/null @@ -1,200 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class MapApi { - MapApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve map markers - /// - /// Retrieve a list of latitude and longitude coordinates for every asset with location data. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] fileCreatedAfter: - /// Filter assets created after this date - /// - /// * [DateTime] fileCreatedBefore: - /// Filter assets created before this date - /// - /// * [bool] isArchived: - /// Filter by archived status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] withPartners: - /// Include partner assets - /// - /// * [bool] withSharedAlbums: - /// Include shared album assets - Future getMapMarkersWithHttpInfo({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/map/markers'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (fileCreatedAfter != null) { - queryParams.addAll(_queryParams('', 'fileCreatedAfter', fileCreatedAfter)); - } - if (fileCreatedBefore != null) { - queryParams.addAll(_queryParams('', 'fileCreatedBefore', fileCreatedBefore)); - } - if (isArchived != null) { - queryParams.addAll(_queryParams('', 'isArchived', isArchived)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (withPartners != null) { - queryParams.addAll(_queryParams('', 'withPartners', withPartners)); - } - if (withSharedAlbums != null) { - queryParams.addAll(_queryParams('', 'withSharedAlbums', withSharedAlbums)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve map markers - /// - /// Retrieve a list of latitude and longitude coordinates for every asset with location data. - /// - /// Parameters: - /// - /// * [DateTime] fileCreatedAfter: - /// Filter assets created after this date - /// - /// * [DateTime] fileCreatedBefore: - /// Filter assets created before this date - /// - /// * [bool] isArchived: - /// Filter by archived status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] withPartners: - /// Include partner assets - /// - /// * [bool] withSharedAlbums: - /// Include shared album assets - Future?> getMapMarkers({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, Future? abortTrigger, }) async { - final response = await getMapMarkersWithHttpInfo(fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, isArchived: isArchived, isFavorite: isFavorite, withPartners: withPartners, withSharedAlbums: withSharedAlbums, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Reverse geocode coordinates - /// - /// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [double] lat (required): - /// Latitude (-90 to 90) - /// - /// * [double] lon (required): - /// Longitude (-180 to 180) - Future reverseGeocodeWithHttpInfo(double lat, double lon, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/map/reverse-geocode'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'lat', lat)); - queryParams.addAll(_queryParams('', 'lon', lon)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Reverse geocode coordinates - /// - /// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates. - /// - /// Parameters: - /// - /// * [double] lat (required): - /// Latitude (-90 to 90) - /// - /// * [double] lon (required): - /// Longitude (-180 to 180) - Future?> reverseGeocode(double lat, double lon, { Future? abortTrigger, }) async { - final response = await reverseGeocodeWithHttpInfo(lat, lon, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/memories_api.dart b/mobile/openapi/lib/api/memories_api.dart deleted file mode 100644 index f5c653765a..0000000000 --- a/mobile/openapi/lib/api/memories_api.dart +++ /dev/null @@ -1,586 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class MemoriesApi { - MemoriesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Add assets to a memory - /// - /// Add a list of asset IDs to a specific memory. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future addMemoryAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to a memory - /// - /// Add a list of asset IDs to a specific memory. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> addMemoryAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await addMemoryAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Create a memory - /// - /// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MemoryCreateDto] memoryCreateDto (required): - Future createMemoryWithHttpInfo(MemoryCreateDto memoryCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories'; - - // ignore: prefer_final_locals - Object? postBody = memoryCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a memory - /// - /// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory. - /// - /// Parameters: - /// - /// * [MemoryCreateDto] memoryCreateDto (required): - Future createMemory(MemoryCreateDto memoryCreateDto, { Future? abortTrigger, }) async { - final response = await createMemoryWithHttpInfo(memoryCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } - - /// Delete a memory - /// - /// Delete a specific memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteMemoryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a memory - /// - /// Delete a specific memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteMemory(String id, { Future? abortTrigger, }) async { - final response = await deleteMemoryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a memory - /// - /// Retrieve a specific memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getMemoryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a memory - /// - /// Retrieve a specific memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getMemory(String id, { Future? abortTrigger, }) async { - final response = await getMemoryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } - - /// Retrieve memories statistics - /// - /// Retrieve statistics about memories, such as total count and other relevant metrics. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future memoriesStatisticsWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (for_ != null) { - queryParams.addAll(_queryParams('', 'for', for_)); - } - if (isSaved != null) { - queryParams.addAll(_queryParams('', 'isSaved', isSaved)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve memories statistics - /// - /// Retrieve statistics about memories, such as total count and other relevant metrics. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future memoriesStatistics({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - final response = await memoriesStatisticsWithHttpInfo(for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryStatisticsResponseDto',) as MemoryStatisticsResponseDto; - - } - return null; - } - - /// Remove assets from a memory - /// - /// Remove a list of asset IDs from a specific memory. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future removeMemoryAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove assets from a memory - /// - /// Remove a list of asset IDs from a specific memory. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> removeMemoryAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await removeMemoryAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve memories - /// - /// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future searchMemoriesWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (for_ != null) { - queryParams.addAll(_queryParams('', 'for', for_)); - } - if (isSaved != null) { - queryParams.addAll(_queryParams('', 'isSaved', isSaved)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve memories - /// - /// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future?> searchMemories({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - final response = await searchMemoriesWithHttpInfo(for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemoryWithHttpInfo(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = memoryUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemory(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMemoryWithHttpInfo(id, memoryUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/notifications_admin_api.dart b/mobile/openapi/lib/api/notifications_admin_api.dart deleted file mode 100644 index e9e18e791e..0000000000 --- a/mobile/openapi/lib/api/notifications_admin_api.dart +++ /dev/null @@ -1,194 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class NotificationsAdminApi { - NotificationsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a notification - /// - /// Create a new notification for a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [NotificationCreateDto] notificationCreateDto (required): - Future createNotificationWithHttpInfo(NotificationCreateDto notificationCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/notifications'; - - // ignore: prefer_final_locals - Object? postBody = notificationCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a notification - /// - /// Create a new notification for a specific user. - /// - /// Parameters: - /// - /// * [NotificationCreateDto] notificationCreateDto (required): - Future createNotification(NotificationCreateDto notificationCreateDto, { Future? abortTrigger, }) async { - final response = await createNotificationWithHttpInfo(notificationCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationDto',) as NotificationDto; - - } - return null; - } - - /// Render email template - /// - /// Retrieve a preview of the provided email template. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] name (required): - /// - /// * [TemplateDto] templateDto (required): - Future getNotificationTemplateAdminWithHttpInfo(String name, TemplateDto templateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/notifications/templates/{name}' - .replaceAll('{name}', name); - - // ignore: prefer_final_locals - Object? postBody = templateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Render email template - /// - /// Retrieve a preview of the provided email template. - /// - /// Parameters: - /// - /// * [String] name (required): - /// - /// * [TemplateDto] templateDto (required): - Future getNotificationTemplateAdmin(String name, TemplateDto templateDto, { Future? abortTrigger, }) async { - final response = await getNotificationTemplateAdminWithHttpInfo(name, templateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TemplateResponseDto',) as TemplateResponseDto; - - } - return null; - } - - /// Send test email - /// - /// Send a test email using the provided SMTP configuration. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): - Future sendTestEmailAdminWithHttpInfo(SystemConfigSmtpDto systemConfigSmtpDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/notifications/test-email'; - - // ignore: prefer_final_locals - Object? postBody = systemConfigSmtpDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Send test email - /// - /// Send a test email using the provided SMTP configuration. - /// - /// Parameters: - /// - /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): - Future sendTestEmailAdmin(SystemConfigSmtpDto systemConfigSmtpDto, { Future? abortTrigger, }) async { - final response = await sendTestEmailAdminWithHttpInfo(systemConfigSmtpDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TestEmailResponseDto',) as TestEmailResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/notifications_api.dart b/mobile/openapi/lib/api/notifications_api.dart deleted file mode 100644 index 6b4f213bcd..0000000000 --- a/mobile/openapi/lib/api/notifications_api.dart +++ /dev/null @@ -1,375 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class NotificationsApi { - NotificationsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete a notification - /// - /// Delete a specific notification. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteNotificationWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a notification - /// - /// Delete a specific notification. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteNotification(String id, { Future? abortTrigger, }) async { - final response = await deleteNotificationWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete notifications - /// - /// Delete a list of notifications at once. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [NotificationDeleteAllDto] notificationDeleteAllDto (required): - Future deleteNotificationsWithHttpInfo(NotificationDeleteAllDto notificationDeleteAllDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications'; - - // ignore: prefer_final_locals - Object? postBody = notificationDeleteAllDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete notifications - /// - /// Delete a list of notifications at once. - /// - /// Parameters: - /// - /// * [NotificationDeleteAllDto] notificationDeleteAllDto (required): - Future deleteNotifications(NotificationDeleteAllDto notificationDeleteAllDto, { Future? abortTrigger, }) async { - final response = await deleteNotificationsWithHttpInfo(notificationDeleteAllDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Get a notification - /// - /// Retrieve a specific notification identified by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getNotificationWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get a notification - /// - /// Retrieve a specific notification identified by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getNotification(String id, { Future? abortTrigger, }) async { - final response = await getNotificationWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationDto',) as NotificationDto; - - } - return null; - } - - /// Retrieve notifications - /// - /// Retrieve a list of notifications. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id: - /// Filter by notification ID - /// - /// * [NotificationLevel] level: - /// - /// * [NotificationType] type: - /// - /// * [bool] unread: - /// Filter by unread status - Future getNotificationsWithHttpInfo({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (level != null) { - queryParams.addAll(_queryParams('', 'level', level)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - if (unread != null) { - queryParams.addAll(_queryParams('', 'unread', unread)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve notifications - /// - /// Retrieve a list of notifications. - /// - /// Parameters: - /// - /// * [String] id: - /// Filter by notification ID - /// - /// * [NotificationLevel] level: - /// - /// * [NotificationType] type: - /// - /// * [bool] unread: - /// Filter by unread status - Future?> getNotifications({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, Future? abortTrigger, }) async { - final response = await getNotificationsWithHttpInfo(id: id, level: level, type: type, unread: unread, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a notification - /// - /// Update a specific notification to set its read status. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [NotificationUpdateDto] notificationUpdateDto (required): - Future updateNotificationWithHttpInfo(String id, NotificationUpdateDto notificationUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = notificationUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a notification - /// - /// Update a specific notification to set its read status. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [NotificationUpdateDto] notificationUpdateDto (required): - Future updateNotification(String id, NotificationUpdateDto notificationUpdateDto, { Future? abortTrigger, }) async { - final response = await updateNotificationWithHttpInfo(id, notificationUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationDto',) as NotificationDto; - - } - return null; - } - - /// Update notifications - /// - /// Update a list of notifications. Allows to bulk-set the read status of notifications. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [NotificationUpdateAllDto] notificationUpdateAllDto (required): - Future updateNotificationsWithHttpInfo(NotificationUpdateAllDto notificationUpdateAllDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications'; - - // ignore: prefer_final_locals - Object? postBody = notificationUpdateAllDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update notifications - /// - /// Update a list of notifications. Allows to bulk-set the read status of notifications. - /// - /// Parameters: - /// - /// * [NotificationUpdateAllDto] notificationUpdateAllDto (required): - Future updateNotifications(NotificationUpdateAllDto notificationUpdateAllDto, { Future? abortTrigger, }) async { - final response = await updateNotificationsWithHttpInfo(notificationUpdateAllDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/partners_api.dart b/mobile/openapi/lib/api/partners_api.dart deleted file mode 100644 index 45bcdcd085..0000000000 --- a/mobile/openapi/lib/api/partners_api.dart +++ /dev/null @@ -1,307 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class PartnersApi { - PartnersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PartnerCreateDto] partnerCreateDto (required): - Future createPartnerWithHttpInfo(PartnerCreateDto partnerCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners'; - - // ignore: prefer_final_locals - Object? postBody = partnerCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Parameters: - /// - /// * [PartnerCreateDto] partnerCreateDto (required): - Future createPartner(PartnerCreateDto partnerCreateDto, { Future? abortTrigger, }) async { - final response = await createPartnerWithHttpInfo(partnerCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecatedWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecated(String id, { Future? abortTrigger, }) async { - final response = await createPartnerDeprecatedWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } - - /// Retrieve partners - /// - /// Retrieve a list of partners with whom assets are shared. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PartnerDirection] direction (required): - Future getPartnersWithHttpInfo(PartnerDirection direction, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'direction', direction)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve partners - /// - /// Retrieve a list of partners with whom assets are shared. - /// - /// Parameters: - /// - /// * [PartnerDirection] direction (required): - Future?> getPartners(PartnerDirection direction, { Future? abortTrigger, }) async { - final response = await getPartnersWithHttpInfo(direction, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Remove a partner - /// - /// Stop sharing assets with a partner. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removePartnerWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove a partner - /// - /// Stop sharing assets with a partner. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removePartner(String id, { Future? abortTrigger, }) async { - final response = await removePartnerWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a partner - /// - /// Specify whether a partner's assets should appear in the user's timeline. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PartnerUpdateDto] partnerUpdateDto (required): - Future updatePartnerWithHttpInfo(String id, PartnerUpdateDto partnerUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = partnerUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a partner - /// - /// Specify whether a partner's assets should appear in the user's timeline. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PartnerUpdateDto] partnerUpdateDto (required): - Future updatePartner(String id, PartnerUpdateDto partnerUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePartnerWithHttpInfo(id, partnerUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/people_api.dart b/mobile/openapi/lib/api/people_api.dart deleted file mode 100644 index c35491e110..0000000000 --- a/mobile/openapi/lib/api/people_api.dart +++ /dev/null @@ -1,699 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class PeopleApi { - PeopleApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a person - /// - /// Create a new person that can have multiple faces assigned to them. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PersonCreateDto] personCreateDto (required): - Future createPersonWithHttpInfo(PersonCreateDto personCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody = personCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a person - /// - /// Create a new person that can have multiple faces assigned to them. - /// - /// Parameters: - /// - /// * [PersonCreateDto] personCreateDto (required): - Future createPerson(PersonCreateDto personCreateDto, { Future? abortTrigger, }) async { - final response = await createPersonWithHttpInfo(personCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } - - /// Delete people - /// - /// Bulk delete a list of people at once. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deletePeopleWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete people - /// - /// Bulk delete a list of people at once. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deletePeople(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await deletePeopleWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete person - /// - /// Delete an individual person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deletePersonWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete person - /// - /// Delete an individual person. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deletePerson(String id, { Future? abortTrigger, }) async { - final response = await deletePersonWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Get all people - /// - /// Retrieve a list of all people. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] closestAssetId: - /// Closest asset ID for similarity search - /// - /// * [String] closestPersonId: - /// Closest person ID for similarity search - /// - /// * [int] page: - /// Page number for pagination - /// - /// * [int] size: - /// Number of items per page - /// - /// * [bool] withHidden: - /// Include hidden people - Future getAllPeopleWithHttpInfo({ String? closestAssetId, String? closestPersonId, int? page, int? size, bool? withHidden, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (closestAssetId != null) { - queryParams.addAll(_queryParams('', 'closestAssetId', closestAssetId)); - } - if (closestPersonId != null) { - queryParams.addAll(_queryParams('', 'closestPersonId', closestPersonId)); - } - if (page != null) { - queryParams.addAll(_queryParams('', 'page', page)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (withHidden != null) { - queryParams.addAll(_queryParams('', 'withHidden', withHidden)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get all people - /// - /// Retrieve a list of all people. - /// - /// Parameters: - /// - /// * [String] closestAssetId: - /// Closest asset ID for similarity search - /// - /// * [String] closestPersonId: - /// Closest person ID for similarity search - /// - /// * [int] page: - /// Page number for pagination - /// - /// * [int] size: - /// Number of items per page - /// - /// * [bool] withHidden: - /// Include hidden people - Future getAllPeople({ String? closestAssetId, String? closestPersonId, int? page, int? size, bool? withHidden, Future? abortTrigger, }) async { - final response = await getAllPeopleWithHttpInfo(closestAssetId: closestAssetId, closestPersonId: closestPersonId, page: page, size: size, withHidden: withHidden, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PeopleResponseDto',) as PeopleResponseDto; - - } - return null; - } - - /// Get a person - /// - /// Retrieve a person by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get a person - /// - /// Retrieve a person by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPerson(String id, { Future? abortTrigger, }) async { - final response = await getPersonWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } - - /// Get person statistics - /// - /// Retrieve statistics about a specific person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonStatisticsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/statistics' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get person statistics - /// - /// Retrieve statistics about a specific person. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonStatistics(String id, { Future? abortTrigger, }) async { - final response = await getPersonStatisticsWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonStatisticsResponseDto',) as PersonStatisticsResponseDto; - - } - return null; - } - - /// Get person thumbnail - /// - /// Retrieve the thumbnail file for a person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonThumbnailWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/thumbnail' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get person thumbnail - /// - /// Retrieve the thumbnail file for a person. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonThumbnail(String id, { Future? abortTrigger, }) async { - final response = await getPersonThumbnailWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Merge people - /// - /// Merge a list of people into the person specified in the path parameter. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MergePersonDto] mergePersonDto (required): - Future mergePersonWithHttpInfo(String id, MergePersonDto mergePersonDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/merge' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = mergePersonDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Merge people - /// - /// Merge a list of people into the person specified in the path parameter. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MergePersonDto] mergePersonDto (required): - Future?> mergePerson(String id, MergePersonDto mergePersonDto, { Future? abortTrigger, }) async { - final response = await mergePersonWithHttpInfo(id, mergePersonDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Reassign faces - /// - /// Bulk reassign a list of faces to a different person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceUpdateDto] assetFaceUpdateDto (required): - Future reassignFacesWithHttpInfo(String id, AssetFaceUpdateDto assetFaceUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/reassign' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetFaceUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Reassign faces - /// - /// Bulk reassign a list of faces to a different person. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceUpdateDto] assetFaceUpdateDto (required): - Future?> reassignFaces(String id, AssetFaceUpdateDto assetFaceUpdateDto, { Future? abortTrigger, }) async { - final response = await reassignFacesWithHttpInfo(id, assetFaceUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update people - /// - /// Bulk update multiple people at once. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PeopleUpdateDto] peopleUpdateDto (required): - Future updatePeopleWithHttpInfo(PeopleUpdateDto peopleUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody = peopleUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update people - /// - /// Bulk update multiple people at once. - /// - /// Parameters: - /// - /// * [PeopleUpdateDto] peopleUpdateDto (required): - Future?> updatePeople(PeopleUpdateDto peopleUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePeopleWithHttpInfo(peopleUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update person - /// - /// Update an individual person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePersonWithHttpInfo(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = personUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update person - /// - /// Update an individual person. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePerson(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePersonWithHttpInfo(id, personUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/plugins_api.dart b/mobile/openapi/lib/api/plugins_api.dart deleted file mode 100644 index 40892b8a67..0000000000 --- a/mobile/openapi/lib/api/plugins_api.dart +++ /dev/null @@ -1,363 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class PluginsApi { - PluginsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve a plugin - /// - /// Retrieve information about a specific plugin by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPluginWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a plugin - /// - /// Retrieve information about a specific plugin by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPlugin(String id, { Future? abortTrigger, }) async { - final response = await getPluginWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PluginResponseDto',) as PluginResponseDto; - - } - return null; - } - - /// Retrieve plugin methods - /// - /// Retrieve a list of plugin methods - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin method is enabled - /// - /// * [String] id: - /// Plugin method ID - /// - /// * [String] name: - /// - /// * [String] pluginName: - /// Plugin name - /// - /// * [String] pluginVersion: - /// Plugin version - /// - /// * [String] title: - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger - /// - /// * [WorkflowType] type: - /// Workflow types - Future searchPluginMethodsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, String? pluginName, String? pluginVersion, String? title, WorkflowTrigger? trigger, WorkflowType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins/methods'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (description != null) { - queryParams.addAll(_queryParams('', 'description', description)); - } - if (enabled != null) { - queryParams.addAll(_queryParams('', 'enabled', enabled)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - if (pluginName != null) { - queryParams.addAll(_queryParams('', 'pluginName', pluginName)); - } - if (pluginVersion != null) { - queryParams.addAll(_queryParams('', 'pluginVersion', pluginVersion)); - } - if (title != null) { - queryParams.addAll(_queryParams('', 'title', title)); - } - if (trigger != null) { - queryParams.addAll(_queryParams('', 'trigger', trigger)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve plugin methods - /// - /// Retrieve a list of plugin methods - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin method is enabled - /// - /// * [String] id: - /// Plugin method ID - /// - /// * [String] name: - /// - /// * [String] pluginName: - /// Plugin name - /// - /// * [String] pluginVersion: - /// Plugin version - /// - /// * [String] title: - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger - /// - /// * [WorkflowType] type: - /// Workflow types - Future?> searchPluginMethods({ String? description, bool? enabled, String? id, String? name, String? pluginName, String? pluginVersion, String? title, WorkflowTrigger? trigger, WorkflowType? type, Future? abortTrigger, }) async { - final response = await searchPluginMethodsWithHttpInfo(description: description, enabled: enabled, id: id, name: name, pluginName: pluginName, pluginVersion: pluginVersion, title: title, trigger: trigger, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve workflow templates - /// - /// Retrieve workflow templates provided by installed plugins - /// - /// Note: This method returns the HTTP [Response]. - Future searchPluginTemplatesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins/templates'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve workflow templates - /// - /// Retrieve workflow templates provided by installed plugins - Future?> searchPluginTemplates({ Future? abortTrigger, }) async { - final response = await searchPluginTemplatesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// List all plugins - /// - /// Retrieve a list of plugins available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin is enabled - /// - /// * [String] id: - /// Plugin ID - /// - /// * [String] name: - /// - /// * [String] title: - /// - /// * [String] version: - Future searchPluginsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, String? title, String? version, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (description != null) { - queryParams.addAll(_queryParams('', 'description', description)); - } - if (enabled != null) { - queryParams.addAll(_queryParams('', 'enabled', enabled)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - if (title != null) { - queryParams.addAll(_queryParams('', 'title', title)); - } - if (version != null) { - queryParams.addAll(_queryParams('', 'version', version)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all plugins - /// - /// Retrieve a list of plugins available to the authenticated user. - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin is enabled - /// - /// * [String] id: - /// Plugin ID - /// - /// * [String] name: - /// - /// * [String] title: - /// - /// * [String] version: - Future?> searchPlugins({ String? description, bool? enabled, String? id, String? name, String? title, String? version, Future? abortTrigger, }) async { - final response = await searchPluginsWithHttpInfo(description: description, enabled: enabled, id: id, name: name, title: title, version: version, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/queues_api.dart b/mobile/openapi/lib/api/queues_api.dart deleted file mode 100644 index 39386c23f9..0000000000 --- a/mobile/openapi/lib/api/queues_api.dart +++ /dev/null @@ -1,315 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class QueuesApi { - QueuesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Empty a queue - /// - /// Removes all jobs from the specified queue. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueDeleteDto] queueDeleteDto (required): - Future emptyQueueWithHttpInfo(QueueName name, QueueDeleteDto queueDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}/jobs' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Empty a queue - /// - /// Removes all jobs from the specified queue. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueDeleteDto] queueDeleteDto (required): - Future emptyQueue(QueueName name, QueueDeleteDto queueDeleteDto, { Future? abortTrigger, }) async { - final response = await emptyQueueWithHttpInfo(name, queueDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a queue - /// - /// Retrieves a specific queue by its name. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - Future getQueueWithHttpInfo(QueueName name, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a queue - /// - /// Retrieves a specific queue by its name. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - Future getQueue(QueueName name, { Future? abortTrigger, }) async { - final response = await getQueueWithHttpInfo(name, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseDto',) as QueueResponseDto; - - } - return null; - } - - /// Retrieve queue jobs - /// - /// Retrieves a list of queue jobs from the specified queue. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [List] status: - /// Filter jobs by status - Future getQueueJobsWithHttpInfo(QueueName name, { List? status, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}/jobs' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (status != null) { - queryParams.addAll(_queryParams('multi', 'status', status)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve queue jobs - /// - /// Retrieves a list of queue jobs from the specified queue. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [List] status: - /// Filter jobs by status - Future?> getQueueJobs(QueueName name, { List? status, Future? abortTrigger, }) async { - final response = await getQueueJobsWithHttpInfo(name, status: status, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// List all queues - /// - /// Retrieves a list of queues. - /// - /// Note: This method returns the HTTP [Response]. - Future getQueuesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all queues - /// - /// Retrieves a list of queues. - Future?> getQueues({ Future? abortTrigger, }) async { - final response = await getQueuesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a queue - /// - /// Change the paused status of a specific queue. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueUpdateDto] queueUpdateDto (required): - Future updateQueueWithHttpInfo(QueueName name, QueueUpdateDto queueUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a queue - /// - /// Change the paused status of a specific queue. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueUpdateDto] queueUpdateDto (required): - Future updateQueue(QueueName name, QueueUpdateDto queueUpdateDto, { Future? abortTrigger, }) async { - final response = await updateQueueWithHttpInfo(name, queueUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseDto',) as QueueResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/search_api.dart b/mobile/openapi/lib/api/search_api.dart deleted file mode 100644 index 9957949812..0000000000 --- a/mobile/openapi/lib/api/search_api.dart +++ /dev/null @@ -1,953 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SearchApi { - SearchApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve assets by city - /// - /// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in. - /// - /// Note: This method returns the HTTP [Response]. - Future getAssetsByCityWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/cities'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve assets by city - /// - /// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in. - Future?> getAssetsByCity({ Future? abortTrigger, }) async { - final response = await getAssetsByCityWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve explore data - /// - /// Retrieve data for the explore section, such as popular people and places. - /// - /// Note: This method returns the HTTP [Response]. - Future getExploreDataWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/explore'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve explore data - /// - /// Retrieve data for the explore section, such as popular people and places. - Future?> getExploreData({ Future? abortTrigger, }) async { - final response = await getExploreDataWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve search suggestions - /// - /// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SearchSuggestionType] type (required): - /// - /// * [String] country: - /// Filter by country - /// - /// * [bool] includeNull: - /// Include null values in suggestions - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] state: - /// Filter by state/province - Future getSearchSuggestionsWithHttpInfo(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/suggestions'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (country != null) { - queryParams.addAll(_queryParams('', 'country', country)); - } - if (includeNull != null) { - queryParams.addAll(_queryParams('', 'includeNull', includeNull)); - } - if (lensModel != null) { - queryParams.addAll(_queryParams('', 'lensModel', lensModel)); - } - if (make != null) { - queryParams.addAll(_queryParams('', 'make', make)); - } - if (model != null) { - queryParams.addAll(_queryParams('', 'model', model)); - } - if (state != null) { - queryParams.addAll(_queryParams('', 'state', state)); - } - queryParams.addAll(_queryParams('', 'type', type)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve search suggestions - /// - /// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features. - /// - /// Parameters: - /// - /// * [SearchSuggestionType] type (required): - /// - /// * [String] country: - /// Filter by country - /// - /// * [bool] includeNull: - /// Include null values in suggestions - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] state: - /// Filter by state/province - Future?> getSearchSuggestions(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, Future? abortTrigger, }) async { - final response = await getSearchSuggestionsWithHttpInfo(type, country: country, includeNull: includeNull, lensModel: lensModel, make: make, model: model, state: state, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Search asset statistics - /// - /// Retrieve statistical data about assets based on search criteria, such as the total matching count. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [StatisticsSearchDto] statisticsSearchDto (required): - Future searchAssetStatisticsWithHttpInfo(StatisticsSearchDto statisticsSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/statistics'; - - // ignore: prefer_final_locals - Object? postBody = statisticsSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search asset statistics - /// - /// Retrieve statistical data about assets based on search criteria, such as the total matching count. - /// - /// Parameters: - /// - /// * [StatisticsSearchDto] statisticsSearchDto (required): - Future searchAssetStatistics(StatisticsSearchDto statisticsSearchDto, { Future? abortTrigger, }) async { - final response = await searchAssetStatisticsWithHttpInfo(statisticsSearchDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SearchStatisticsResponseDto',) as SearchStatisticsResponseDto; - - } - return null; - } - - /// Search assets by metadata - /// - /// Search for assets based on various metadata criteria. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MetadataSearchDto] metadataSearchDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future searchAssetsWithHttpInfo(MetadataSearchDto metadataSearchDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/metadata'; - - // ignore: prefer_final_locals - Object? postBody = metadataSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search assets by metadata - /// - /// Search for assets based on various metadata criteria. - /// - /// Parameters: - /// - /// * [MetadataSearchDto] metadataSearchDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future searchAssets(MetadataSearchDto metadataSearchDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await searchAssetsWithHttpInfo(metadataSearchDto, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SearchResponseDto',) as SearchResponseDto; - - } - return null; - } - - /// Search large assets - /// - /// Search for assets that are considered large based on specified criteria. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [List] albumIds: - /// Filter by album IDs - /// - /// * [String] city: - /// Filter by city name - /// - /// * [String] country: - /// Filter by country name - /// - /// * [DateTime] createdAfter: - /// Filter by creation date (after) - /// - /// * [DateTime] createdBefore: - /// Filter by creation date (before) - /// - /// * [bool] isEncoded: - /// Filter by encoded status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isMotion: - /// Filter by motion photo status - /// - /// * [bool] isNotInAlbum: - /// Filter assets not in any album - /// - /// * [bool] isOffline: - /// Filter by offline status - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] libraryId: - /// Library ID to filter by - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [int] minFileSize: - /// Minimum file size in bytes - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] ocr: - /// Filter by OCR text content - /// - /// * [List] personIds: - /// Filter by person IDs - /// - /// * [int] rating: - /// Filter by rating [1-5], or null for unrated - /// - /// * [int] size: - /// Number of results to return - /// - /// * [String] state: - /// Filter by state/province name - /// - /// * [List] tagIds: - /// Filter by tag IDs - /// - /// * [DateTime] takenAfter: - /// Filter by taken date (after) - /// - /// * [DateTime] takenBefore: - /// Filter by taken date (before) - /// - /// * [DateTime] trashedAfter: - /// Filter by trash date (after) - /// - /// * [DateTime] trashedBefore: - /// Filter by trash date (before) - /// - /// * [AssetTypeEnum] type: - /// - /// * [DateTime] updatedAfter: - /// Filter by update date (after) - /// - /// * [DateTime] updatedBefore: - /// Filter by update date (before) - /// - /// * [AssetVisibility] visibility: - /// - /// * [bool] withDeleted: - /// Include deleted assets - /// - /// * [bool] withExif: - /// Include EXIF data in response - Future searchLargeAssetsWithHttpInfo({ List? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List? personIds, int? rating, int? size, String? state, List? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/large-assets'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumIds != null) { - queryParams.addAll(_queryParams('multi', 'albumIds', albumIds)); - } - if (city != null) { - queryParams.addAll(_queryParams('', 'city', city)); - } - if (country != null) { - queryParams.addAll(_queryParams('', 'country', country)); - } - if (createdAfter != null) { - queryParams.addAll(_queryParams('', 'createdAfter', createdAfter)); - } - if (createdBefore != null) { - queryParams.addAll(_queryParams('', 'createdBefore', createdBefore)); - } - if (isEncoded != null) { - queryParams.addAll(_queryParams('', 'isEncoded', isEncoded)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isMotion != null) { - queryParams.addAll(_queryParams('', 'isMotion', isMotion)); - } - if (isNotInAlbum != null) { - queryParams.addAll(_queryParams('', 'isNotInAlbum', isNotInAlbum)); - } - if (isOffline != null) { - queryParams.addAll(_queryParams('', 'isOffline', isOffline)); - } - if (lensModel != null) { - queryParams.addAll(_queryParams('', 'lensModel', lensModel)); - } - if (libraryId != null) { - queryParams.addAll(_queryParams('', 'libraryId', libraryId)); - } - if (make != null) { - queryParams.addAll(_queryParams('', 'make', make)); - } - if (minFileSize != null) { - queryParams.addAll(_queryParams('', 'minFileSize', minFileSize)); - } - if (model != null) { - queryParams.addAll(_queryParams('', 'model', model)); - } - if (ocr != null) { - queryParams.addAll(_queryParams('', 'ocr', ocr)); - } - if (personIds != null) { - queryParams.addAll(_queryParams('multi', 'personIds', personIds)); - } - if (rating != null) { - queryParams.addAll(_queryParams('', 'rating', rating)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (state != null) { - queryParams.addAll(_queryParams('', 'state', state)); - } - if (tagIds != null) { - queryParams.addAll(_queryParams('multi', 'tagIds', tagIds)); - } - if (takenAfter != null) { - queryParams.addAll(_queryParams('', 'takenAfter', takenAfter)); - } - if (takenBefore != null) { - queryParams.addAll(_queryParams('', 'takenBefore', takenBefore)); - } - if (trashedAfter != null) { - queryParams.addAll(_queryParams('', 'trashedAfter', trashedAfter)); - } - if (trashedBefore != null) { - queryParams.addAll(_queryParams('', 'trashedBefore', trashedBefore)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - if (updatedAfter != null) { - queryParams.addAll(_queryParams('', 'updatedAfter', updatedAfter)); - } - if (updatedBefore != null) { - queryParams.addAll(_queryParams('', 'updatedBefore', updatedBefore)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - if (withDeleted != null) { - queryParams.addAll(_queryParams('', 'withDeleted', withDeleted)); - } - if (withExif != null) { - queryParams.addAll(_queryParams('', 'withExif', withExif)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search large assets - /// - /// Search for assets that are considered large based on specified criteria. - /// - /// Parameters: - /// - /// * [List] albumIds: - /// Filter by album IDs - /// - /// * [String] city: - /// Filter by city name - /// - /// * [String] country: - /// Filter by country name - /// - /// * [DateTime] createdAfter: - /// Filter by creation date (after) - /// - /// * [DateTime] createdBefore: - /// Filter by creation date (before) - /// - /// * [bool] isEncoded: - /// Filter by encoded status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isMotion: - /// Filter by motion photo status - /// - /// * [bool] isNotInAlbum: - /// Filter assets not in any album - /// - /// * [bool] isOffline: - /// Filter by offline status - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] libraryId: - /// Library ID to filter by - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [int] minFileSize: - /// Minimum file size in bytes - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] ocr: - /// Filter by OCR text content - /// - /// * [List] personIds: - /// Filter by person IDs - /// - /// * [int] rating: - /// Filter by rating [1-5], or null for unrated - /// - /// * [int] size: - /// Number of results to return - /// - /// * [String] state: - /// Filter by state/province name - /// - /// * [List] tagIds: - /// Filter by tag IDs - /// - /// * [DateTime] takenAfter: - /// Filter by taken date (after) - /// - /// * [DateTime] takenBefore: - /// Filter by taken date (before) - /// - /// * [DateTime] trashedAfter: - /// Filter by trash date (after) - /// - /// * [DateTime] trashedBefore: - /// Filter by trash date (before) - /// - /// * [AssetTypeEnum] type: - /// - /// * [DateTime] updatedAfter: - /// Filter by update date (after) - /// - /// * [DateTime] updatedBefore: - /// Filter by update date (before) - /// - /// * [AssetVisibility] visibility: - /// - /// * [bool] withDeleted: - /// Include deleted assets - /// - /// * [bool] withExif: - /// Include EXIF data in response - Future?> searchLargeAssets({ List? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List? personIds, int? rating, int? size, String? state, List? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, Future? abortTrigger, }) async { - final response = await searchLargeAssetsWithHttpInfo(albumIds: albumIds, city: city, country: country, createdAfter: createdAfter, createdBefore: createdBefore, isEncoded: isEncoded, isFavorite: isFavorite, isMotion: isMotion, isNotInAlbum: isNotInAlbum, isOffline: isOffline, lensModel: lensModel, libraryId: libraryId, make: make, minFileSize: minFileSize, model: model, ocr: ocr, personIds: personIds, rating: rating, size: size, state: state, tagIds: tagIds, takenAfter: takenAfter, takenBefore: takenBefore, trashedAfter: trashedAfter, trashedBefore: trashedBefore, type: type, updatedAfter: updatedAfter, updatedBefore: updatedBefore, visibility: visibility, withDeleted: withDeleted, withExif: withExif, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Search people - /// - /// Search for people by name. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Person name to search for - /// - /// * [bool] withHidden: - /// Include hidden people - Future searchPersonWithHttpInfo(String name, { bool? withHidden, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/person'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'name', name)); - if (withHidden != null) { - queryParams.addAll(_queryParams('', 'withHidden', withHidden)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search people - /// - /// Search for people by name. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Person name to search for - /// - /// * [bool] withHidden: - /// Include hidden people - Future?> searchPerson(String name, { bool? withHidden, Future? abortTrigger, }) async { - final response = await searchPersonWithHttpInfo(name, withHidden: withHidden, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Search places - /// - /// Search for places by name. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Place name to search for - Future searchPlacesWithHttpInfo(String name, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/places'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'name', name)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search places - /// - /// Search for places by name. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Place name to search for - Future?> searchPlaces(String name, { Future? abortTrigger, }) async { - final response = await searchPlacesWithHttpInfo(name, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Search random assets - /// - /// Retrieve a random selection of assets based on the provided criteria. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [RandomSearchDto] randomSearchDto (required): - Future searchRandomWithHttpInfo(RandomSearchDto randomSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/random'; - - // ignore: prefer_final_locals - Object? postBody = randomSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search random assets - /// - /// Retrieve a random selection of assets based on the provided criteria. - /// - /// Parameters: - /// - /// * [RandomSearchDto] randomSearchDto (required): - Future?> searchRandom(RandomSearchDto randomSearchDto, { Future? abortTrigger, }) async { - final response = await searchRandomWithHttpInfo(randomSearchDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Smart asset search - /// - /// Perform a smart search for assets by using machine learning vectors to determine relevance. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SmartSearchDto] smartSearchDto (required): - Future searchSmartWithHttpInfo(SmartSearchDto smartSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/smart'; - - // ignore: prefer_final_locals - Object? postBody = smartSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Smart asset search - /// - /// Perform a smart search for assets by using machine learning vectors to determine relevance. - /// - /// Parameters: - /// - /// * [SmartSearchDto] smartSearchDto (required): - Future searchSmart(SmartSearchDto smartSearchDto, { Future? abortTrigger, }) async { - final response = await searchSmartWithHttpInfo(smartSearchDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SearchResponseDto',) as SearchResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/server_api.dart b/mobile/openapi/lib/api/server_api.dart deleted file mode 100644 index 1a46a86188..0000000000 --- a/mobile/openapi/lib/api/server_api.dart +++ /dev/null @@ -1,707 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class ServerApi { - ServerApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete server product key - /// - /// Delete the currently set server product key. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteServerLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete server product key - /// - /// Delete the currently set server product key. - Future deleteServerLicense({ Future? abortTrigger, }) async { - final response = await deleteServerLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Get server information - /// - /// Retrieve a list of information about the server. - /// - /// Note: This method returns the HTTP [Response]. - Future getAboutInfoWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/about'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get server information - /// - /// Retrieve a list of information about the server. - Future getAboutInfo({ Future? abortTrigger, }) async { - final response = await getAboutInfoWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerAboutResponseDto',) as ServerAboutResponseDto; - - } - return null; - } - - /// Get APK links - /// - /// Retrieve links to the APKs for the current server version. - /// - /// Note: This method returns the HTTP [Response]. - Future getApkLinksWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/apk-links'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get APK links - /// - /// Retrieve links to the APKs for the current server version. - Future getApkLinks({ Future? abortTrigger, }) async { - final response = await getApkLinksWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerApkLinksDto',) as ServerApkLinksDto; - - } - return null; - } - - /// Get config - /// - /// Retrieve the current server configuration. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerConfigWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/config'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get config - /// - /// Retrieve the current server configuration. - Future getServerConfig({ Future? abortTrigger, }) async { - final response = await getServerConfigWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerConfigDto',) as ServerConfigDto; - - } - return null; - } - - /// Get features - /// - /// Retrieve available features supported by this server. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerFeaturesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/features'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get features - /// - /// Retrieve available features supported by this server. - Future getServerFeatures({ Future? abortTrigger, }) async { - final response = await getServerFeaturesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerFeaturesDto',) as ServerFeaturesDto; - - } - return null; - } - - /// Get product key - /// - /// Retrieve information about whether the server currently has a product key registered. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get product key - /// - /// Retrieve information about whether the server currently has a product key registered. - Future getServerLicense({ Future? abortTrigger, }) async { - final response = await getServerLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserLicense',) as UserLicense; - - } - return null; - } - - /// Get statistics - /// - /// Retrieve statistics about the entire Immich instance such as asset counts. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerStatisticsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get statistics - /// - /// Retrieve statistics about the entire Immich instance such as asset counts. - Future getServerStatistics({ Future? abortTrigger, }) async { - final response = await getServerStatisticsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStatsResponseDto',) as ServerStatsResponseDto; - - } - return null; - } - - /// Get server version - /// - /// Retrieve the current server version in semantic versioning (semver) format. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerVersionWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/version'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get server version - /// - /// Retrieve the current server version in semantic versioning (semver) format. - Future getServerVersion({ Future? abortTrigger, }) async { - final response = await getServerVersionWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerVersionResponseDto',) as ServerVersionResponseDto; - - } - return null; - } - - /// Get storage - /// - /// Retrieve the current storage utilization information of the server. - /// - /// Note: This method returns the HTTP [Response]. - Future getStorageWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/storage'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get storage - /// - /// Retrieve the current storage utilization information of the server. - Future getStorage({ Future? abortTrigger, }) async { - final response = await getStorageWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStorageResponseDto',) as ServerStorageResponseDto; - - } - return null; - } - - /// Get supported media types - /// - /// Retrieve all media types supported by the server. - /// - /// Note: This method returns the HTTP [Response]. - Future getSupportedMediaTypesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/media-types'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get supported media types - /// - /// Retrieve all media types supported by the server. - Future getSupportedMediaTypes({ Future? abortTrigger, }) async { - final response = await getSupportedMediaTypesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerMediaTypesResponseDto',) as ServerMediaTypesResponseDto; - - } - return null; - } - - /// Get version check status - /// - /// Retrieve information about the last time the version check ran. - /// - /// Note: This method returns the HTTP [Response]. - Future getVersionCheckWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/version-check'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get version check status - /// - /// Retrieve information about the last time the version check ran. - Future getVersionCheck({ Future? abortTrigger, }) async { - final response = await getVersionCheckWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VersionCheckStateResponseDto',) as VersionCheckStateResponseDto; - - } - return null; - } - - /// Get version history - /// - /// Retrieve a list of past versions the server has been on. - /// - /// Note: This method returns the HTTP [Response]. - Future getVersionHistoryWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/version-history'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get version history - /// - /// Retrieve a list of past versions the server has been on. - Future?> getVersionHistory({ Future? abortTrigger, }) async { - final response = await getVersionHistoryWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Ping - /// - /// Pong - /// - /// Note: This method returns the HTTP [Response]. - Future pingServerWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/ping'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Ping - /// - /// Pong - Future pingServer({ Future? abortTrigger, }) async { - final response = await pingServerWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerPingResponse',) as ServerPingResponse; - - } - return null; - } - - /// Set server product key - /// - /// Validate and set the server product key if successful. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setServerLicenseWithHttpInfo(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/license'; - - // ignore: prefer_final_locals - Object? postBody = licenseKeyDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Set server product key - /// - /// Validate and set the server product key if successful. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setServerLicense(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - final response = await setServerLicenseWithHttpInfo(licenseKeyDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserLicense',) as UserLicense; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/sessions_api.dart b/mobile/openapi/lib/api/sessions_api.dart deleted file mode 100644 index fdd6c09266..0000000000 --- a/mobile/openapi/lib/api/sessions_api.dart +++ /dev/null @@ -1,330 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SessionsApi { - SessionsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a session - /// - /// Create a session as a child to the current session. This endpoint is used for casting. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SessionCreateDto] sessionCreateDto (required): - Future createSessionWithHttpInfo(SessionCreateDto sessionCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions'; - - // ignore: prefer_final_locals - Object? postBody = sessionCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a session - /// - /// Create a session as a child to the current session. This endpoint is used for casting. - /// - /// Parameters: - /// - /// * [SessionCreateDto] sessionCreateDto (required): - Future createSession(SessionCreateDto sessionCreateDto, { Future? abortTrigger, }) async { - final response = await createSessionWithHttpInfo(sessionCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SessionCreateResponseDto',) as SessionCreateResponseDto; - - } - return null; - } - - /// Delete all sessions - /// - /// Delete all sessions for the user. This will not delete the current session. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteAllSessionsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete all sessions - /// - /// Delete all sessions for the user. This will not delete the current session. - Future deleteAllSessions({ Future? abortTrigger, }) async { - final response = await deleteAllSessionsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete a session - /// - /// Delete a specific session by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteSessionWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a session - /// - /// Delete a specific session by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteSession(String id, { Future? abortTrigger, }) async { - final response = await deleteSessionWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve sessions - /// - /// Retrieve a list of sessions for the user. - /// - /// Note: This method returns the HTTP [Response]. - Future getSessionsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve sessions - /// - /// Retrieve a list of sessions for the user. - Future?> getSessions({ Future? abortTrigger, }) async { - final response = await getSessionsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Lock a session - /// - /// Lock a specific session by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future lockSessionWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}/lock' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Lock a session - /// - /// Lock a specific session by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future lockSession(String id, { Future? abortTrigger, }) async { - final response = await lockSessionWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSessionWithHttpInfo(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = sessionUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSession(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - final response = await updateSessionWithHttpInfo(id, sessionUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SessionResponseDto',) as SessionResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/shared_links_api.dart b/mobile/openapi/lib/api/shared_links_api.dart deleted file mode 100644 index 5bd548d7d2..0000000000 --- a/mobile/openapi/lib/api/shared_links_api.dart +++ /dev/null @@ -1,590 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SharedLinksApi { - SharedLinksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Add assets to a shared link - /// - /// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future addSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to a shared link - /// - /// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future?> addSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - final response = await addSharedLinkAssetsWithHttpInfo(id, assetIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Create a shared link - /// - /// Create a new shared link. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SharedLinkCreateDto] sharedLinkCreateDto (required): - Future createSharedLinkWithHttpInfo(SharedLinkCreateDto sharedLinkCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links'; - - // ignore: prefer_final_locals - Object? postBody = sharedLinkCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a shared link - /// - /// Create a new shared link. - /// - /// Parameters: - /// - /// * [SharedLinkCreateDto] sharedLinkCreateDto (required): - Future createSharedLink(SharedLinkCreateDto sharedLinkCreateDto, { Future? abortTrigger, }) async { - final response = await createSharedLinkWithHttpInfo(sharedLinkCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Retrieve all shared links - /// - /// Retrieve a list of all shared links. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter by album ID - /// - /// * [String] id: - /// Filter by shared link ID - Future getAllSharedLinksWithHttpInfo({ String? albumId, String? id, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumId != null) { - queryParams.addAll(_queryParams('', 'albumId', albumId)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve all shared links - /// - /// Retrieve a list of all shared links. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter by album ID - /// - /// * [String] id: - /// Filter by shared link ID - Future?> getAllSharedLinks({ String? albumId, String? id, Future? abortTrigger, }) async { - final response = await getAllSharedLinksWithHttpInfo(albumId: albumId, id: id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve current shared link - /// - /// Retrieve the current shared link associated with authentication method. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMySharedLinkWithHttpInfo({ String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/me'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve current shared link - /// - /// Retrieve the current shared link associated with authentication method. - /// - /// Parameters: - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMySharedLink({ String? key, String? slug, Future? abortTrigger, }) async { - final response = await getMySharedLinkWithHttpInfo(key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Retrieve a shared link - /// - /// Retrieve a specific shared link by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getSharedLinkByIdWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a shared link - /// - /// Retrieve a specific shared link by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getSharedLinkById(String id, { Future? abortTrigger, }) async { - final response = await getSharedLinkByIdWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Delete a shared link - /// - /// Delete a specific shared link by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeSharedLinkWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a shared link - /// - /// Delete a specific shared link by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeSharedLink(String id, { Future? abortTrigger, }) async { - final response = await removeSharedLinkWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Remove assets from a shared link - /// - /// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future removeSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove assets from a shared link - /// - /// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future?> removeSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - final response = await removeSharedLinkAssetsWithHttpInfo(id, assetIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Shared link login - /// - /// Login to a password protected shared link - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SharedLinkLoginDto] sharedLinkLoginDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future sharedLinkLoginWithHttpInfo(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/login'; - - // ignore: prefer_final_locals - Object? postBody = sharedLinkLoginDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Shared link login - /// - /// Login to a password protected shared link - /// - /// Parameters: - /// - /// * [SharedLinkLoginDto] sharedLinkLoginDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future sharedLinkLogin(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await sharedLinkLoginWithHttpInfo(sharedLinkLoginDto, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Update a shared link - /// - /// Update an existing shared link by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SharedLinkEditDto] sharedLinkEditDto (required): - Future updateSharedLinkWithHttpInfo(String id, SharedLinkEditDto sharedLinkEditDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = sharedLinkEditDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PATCH', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a shared link - /// - /// Update an existing shared link by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SharedLinkEditDto] sharedLinkEditDto (required): - Future updateSharedLink(String id, SharedLinkEditDto sharedLinkEditDto, { Future? abortTrigger, }) async { - final response = await updateSharedLinkWithHttpInfo(id, sharedLinkEditDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/stacks_api.dart b/mobile/openapi/lib/api/stacks_api.dart deleted file mode 100644 index a99ebe0600..0000000000 --- a/mobile/openapi/lib/api/stacks_api.dart +++ /dev/null @@ -1,415 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class StacksApi { - StacksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a stack - /// - /// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [StackCreateDto] stackCreateDto (required): - Future createStackWithHttpInfo(StackCreateDto stackCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks'; - - // ignore: prefer_final_locals - Object? postBody = stackCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a stack - /// - /// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack. - /// - /// Parameters: - /// - /// * [StackCreateDto] stackCreateDto (required): - Future createStack(StackCreateDto stackCreateDto, { Future? abortTrigger, }) async { - final response = await createStackWithHttpInfo(stackCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } - - /// Delete a stack - /// - /// Delete a specific stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteStackWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a stack - /// - /// Delete a specific stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteStack(String id, { Future? abortTrigger, }) async { - final response = await deleteStackWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete stacks - /// - /// Delete multiple stacks by providing a list of stack IDs. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteStacksWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete stacks - /// - /// Delete multiple stacks by providing a list of stack IDs. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteStacks(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await deleteStacksWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a stack - /// - /// Retrieve a specific stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getStackWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a stack - /// - /// Retrieve a specific stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getStack(String id, { Future? abortTrigger, }) async { - final response = await getStackWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } - - /// Remove an asset from a stack - /// - /// Remove a specific asset from a stack by providing the stack ID and asset ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] assetId (required): - /// - /// * [String] id (required): - Future removeAssetFromStackWithHttpInfo(String assetId, String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}/assets/{assetId}' - .replaceAll('{assetId}', assetId) - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove an asset from a stack - /// - /// Remove a specific asset from a stack by providing the stack ID and asset ID. - /// - /// Parameters: - /// - /// * [String] assetId (required): - /// - /// * [String] id (required): - Future removeAssetFromStack(String assetId, String id, { Future? abortTrigger, }) async { - final response = await removeAssetFromStackWithHttpInfo(assetId, id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve stacks - /// - /// Retrieve a list of stacks. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] primaryAssetId: - /// Filter by primary asset ID - Future searchStacksWithHttpInfo({ String? primaryAssetId, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (primaryAssetId != null) { - queryParams.addAll(_queryParams('', 'primaryAssetId', primaryAssetId)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve stacks - /// - /// Retrieve a list of stacks. - /// - /// Parameters: - /// - /// * [String] primaryAssetId: - /// Filter by primary asset ID - Future?> searchStacks({ String? primaryAssetId, Future? abortTrigger, }) async { - final response = await searchStacksWithHttpInfo(primaryAssetId: primaryAssetId, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStackWithHttpInfo(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = stackUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStack(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - final response = await updateStackWithHttpInfo(id, stackUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/sync_api.dart b/mobile/openapi/lib/api/sync_api.dart deleted file mode 100644 index c2a57c3395..0000000000 --- a/mobile/openapi/lib/api/sync_api.dart +++ /dev/null @@ -1,217 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SyncApi { - SyncApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete acknowledgements - /// - /// Delete specific synchronization acknowledgments. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SyncAckDeleteDto] syncAckDeleteDto (required): - Future deleteSyncAckWithHttpInfo(SyncAckDeleteDto syncAckDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/ack'; - - // ignore: prefer_final_locals - Object? postBody = syncAckDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete acknowledgements - /// - /// Delete specific synchronization acknowledgments. - /// - /// Parameters: - /// - /// * [SyncAckDeleteDto] syncAckDeleteDto (required): - Future deleteSyncAck(SyncAckDeleteDto syncAckDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteSyncAckWithHttpInfo(syncAckDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve acknowledgements - /// - /// Retrieve the synchronization acknowledgments for the current session. - /// - /// Note: This method returns the HTTP [Response]. - Future getSyncAckWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/ack'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve acknowledgements - /// - /// Retrieve the synchronization acknowledgments for the current session. - Future?> getSyncAck({ Future? abortTrigger, }) async { - final response = await getSyncAckWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Stream sync changes - /// - /// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SyncStreamDto] syncStreamDto (required): - Future getSyncStreamWithHttpInfo(SyncStreamDto syncStreamDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/stream'; - - // ignore: prefer_final_locals - Object? postBody = syncStreamDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Stream sync changes - /// - /// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes. - /// - /// Parameters: - /// - /// * [SyncStreamDto] syncStreamDto (required): - Future getSyncStream(SyncStreamDto syncStreamDto, { Future? abortTrigger, }) async { - final response = await getSyncStreamWithHttpInfo(syncStreamDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Acknowledge changes - /// - /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SyncAckSetDto] syncAckSetDto (required): - Future sendSyncAckWithHttpInfo(SyncAckSetDto syncAckSetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/ack'; - - // ignore: prefer_final_locals - Object? postBody = syncAckSetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Acknowledge changes - /// - /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. - /// - /// Parameters: - /// - /// * [SyncAckSetDto] syncAckSetDto (required): - Future sendSyncAck(SyncAckSetDto syncAckSetDto, { Future? abortTrigger, }) async { - final response = await sendSyncAckWithHttpInfo(syncAckSetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/system_config_api.dart b/mobile/openapi/lib/api/system_config_api.dart deleted file mode 100644 index ba5b82263a..0000000000 --- a/mobile/openapi/lib/api/system_config_api.dart +++ /dev/null @@ -1,222 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SystemConfigApi { - SystemConfigApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Get system configuration - /// - /// Retrieve the current system configuration. - /// - /// Note: This method returns the HTTP [Response]. - Future getConfigWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get system configuration - /// - /// Retrieve the current system configuration. - Future getConfig({ Future? abortTrigger, }) async { - final response = await getConfigWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto; - - } - return null; - } - - /// Get system configuration defaults - /// - /// Retrieve the default values for the system configuration. - /// - /// Note: This method returns the HTTP [Response]. - Future getConfigDefaultsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config/defaults'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get system configuration defaults - /// - /// Retrieve the default values for the system configuration. - Future getConfigDefaults({ Future? abortTrigger, }) async { - final response = await getConfigDefaultsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto; - - } - return null; - } - - /// Get storage template options - /// - /// Retrieve exemplary storage template options. - /// - /// Note: This method returns the HTTP [Response]. - Future getStorageTemplateOptionsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config/storage-template-options'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get storage template options - /// - /// Retrieve exemplary storage template options. - Future getStorageTemplateOptions({ Future? abortTrigger, }) async { - final response = await getStorageTemplateOptionsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigTemplateStorageOptionDto',) as SystemConfigTemplateStorageOptionDto; - - } - return null; - } - - /// Update system configuration - /// - /// Update the system configuration with a new system configuration. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SystemConfigDto] systemConfigDto (required): - Future updateConfigWithHttpInfo(SystemConfigDto systemConfigDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config'; - - // ignore: prefer_final_locals - Object? postBody = systemConfigDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update system configuration - /// - /// Update the system configuration with a new system configuration. - /// - /// Parameters: - /// - /// * [SystemConfigDto] systemConfigDto (required): - Future updateConfig(SystemConfigDto systemConfigDto, { Future? abortTrigger, }) async { - final response = await updateConfigWithHttpInfo(systemConfigDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/system_metadata_api.dart b/mobile/openapi/lib/api/system_metadata_api.dart deleted file mode 100644 index a1429b54b0..0000000000 --- a/mobile/openapi/lib/api/system_metadata_api.dart +++ /dev/null @@ -1,214 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SystemMetadataApi { - SystemMetadataApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve admin onboarding - /// - /// Retrieve the current admin onboarding status. - /// - /// Note: This method returns the HTTP [Response]. - Future getAdminOnboardingWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/admin-onboarding'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve admin onboarding - /// - /// Retrieve the current admin onboarding status. - Future getAdminOnboarding({ Future? abortTrigger, }) async { - final response = await getAdminOnboardingWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AdminOnboardingUpdateDto',) as AdminOnboardingUpdateDto; - - } - return null; - } - - /// Retrieve reverse geocoding state - /// - /// Retrieve the current state of the reverse geocoding import. - /// - /// Note: This method returns the HTTP [Response]. - Future getReverseGeocodingStateWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/reverse-geocoding-state'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve reverse geocoding state - /// - /// Retrieve the current state of the reverse geocoding import. - Future getReverseGeocodingState({ Future? abortTrigger, }) async { - final response = await getReverseGeocodingStateWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ReverseGeocodingStateResponseDto',) as ReverseGeocodingStateResponseDto; - - } - return null; - } - - /// Retrieve version check state - /// - /// Retrieve the current state of the version check process. - /// - /// Note: This method returns the HTTP [Response]. - Future getVersionCheckStateWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/version-check-state'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve version check state - /// - /// Retrieve the current state of the version check process. - Future getVersionCheckState({ Future? abortTrigger, }) async { - final response = await getVersionCheckStateWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VersionCheckStateResponseDto',) as VersionCheckStateResponseDto; - - } - return null; - } - - /// Update admin onboarding - /// - /// Update the admin onboarding status. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AdminOnboardingUpdateDto] adminOnboardingUpdateDto (required): - Future updateAdminOnboardingWithHttpInfo(AdminOnboardingUpdateDto adminOnboardingUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/admin-onboarding'; - - // ignore: prefer_final_locals - Object? postBody = adminOnboardingUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update admin onboarding - /// - /// Update the admin onboarding status. - /// - /// Parameters: - /// - /// * [AdminOnboardingUpdateDto] adminOnboardingUpdateDto (required): - Future updateAdminOnboarding(AdminOnboardingUpdateDto adminOnboardingUpdateDto, { Future? abortTrigger, }) async { - final response = await updateAdminOnboardingWithHttpInfo(adminOnboardingUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/tags_api.dart b/mobile/openapi/lib/api/tags_api.dart deleted file mode 100644 index c3cf9f545c..0000000000 --- a/mobile/openapi/lib/api/tags_api.dart +++ /dev/null @@ -1,544 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class TagsApi { - TagsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Tag assets - /// - /// Add multiple tags to multiple assets in a single request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [TagBulkAssetsDto] tagBulkAssetsDto (required): - Future bulkTagAssetsWithHttpInfo(TagBulkAssetsDto tagBulkAssetsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/assets'; - - // ignore: prefer_final_locals - Object? postBody = tagBulkAssetsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Tag assets - /// - /// Add multiple tags to multiple assets in a single request. - /// - /// Parameters: - /// - /// * [TagBulkAssetsDto] tagBulkAssetsDto (required): - Future bulkTagAssets(TagBulkAssetsDto tagBulkAssetsDto, { Future? abortTrigger, }) async { - final response = await bulkTagAssetsWithHttpInfo(tagBulkAssetsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagBulkAssetsResponseDto',) as TagBulkAssetsResponseDto; - - } - return null; - } - - /// Create a tag - /// - /// Create a new tag by providing a name and optional color. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [TagCreateDto] tagCreateDto (required): - Future createTagWithHttpInfo(TagCreateDto tagCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags'; - - // ignore: prefer_final_locals - Object? postBody = tagCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a tag - /// - /// Create a new tag by providing a name and optional color. - /// - /// Parameters: - /// - /// * [TagCreateDto] tagCreateDto (required): - Future createTag(TagCreateDto tagCreateDto, { Future? abortTrigger, }) async { - final response = await createTagWithHttpInfo(tagCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Delete a tag - /// - /// Delete a specific tag by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteTagWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a tag - /// - /// Delete a specific tag by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteTag(String id, { Future? abortTrigger, }) async { - final response = await deleteTagWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve tags - /// - /// Retrieve a list of all tags. - /// - /// Note: This method returns the HTTP [Response]. - Future getAllTagsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve tags - /// - /// Retrieve a list of all tags. - Future?> getAllTags({ Future? abortTrigger, }) async { - final response = await getAllTagsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve a tag - /// - /// Retrieve a specific tag by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getTagByIdWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a tag - /// - /// Retrieve a specific tag by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getTagById(String id, { Future? abortTrigger, }) async { - final response = await getTagByIdWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Tag assets - /// - /// Add a tag to all the specified assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future tagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Tag assets - /// - /// Add a tag to all the specified assets. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> tagAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await tagAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Untag assets - /// - /// Remove a tag from all the specified assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future untagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Untag assets - /// - /// Remove a tag from all the specified assets. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> untagAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await untagAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTagWithHttpInfo(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = tagUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTag(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - final response = await updateTagWithHttpInfo(id, tagUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Upsert tags - /// - /// Create or update multiple tags in a single request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [TagUpsertDto] tagUpsertDto (required): - Future upsertTagsWithHttpInfo(TagUpsertDto tagUpsertDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags'; - - // ignore: prefer_final_locals - Object? postBody = tagUpsertDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upsert tags - /// - /// Create or update multiple tags in a single request. - /// - /// Parameters: - /// - /// * [TagUpsertDto] tagUpsertDto (required): - Future?> upsertTags(TagUpsertDto tagUpsertDto, { Future? abortTrigger, }) async { - final response = await upsertTagsWithHttpInfo(tagUpsertDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/timeline_api.dart b/mobile/openapi/lib/api/timeline_api.dart deleted file mode 100644 index a85aee2d7a..0000000000 --- a/mobile/openapi/lib/api/timeline_api.dart +++ /dev/null @@ -1,398 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class TimelineApi { - TimelineApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Get time bucket - /// - /// Retrieve a string of all asset ids in a given time bucket. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] timeBucket (required): - /// Time bucket identifier in YYYY-MM-DD format - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future getTimeBucketWithHttpInfo(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/timeline/bucket'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumId != null) { - queryParams.addAll(_queryParams('', 'albumId', albumId)); - } - if (bbox != null) { - queryParams.addAll(_queryParams('', 'bbox', bbox)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (orderBy != null) { - queryParams.addAll(_queryParams('', 'orderBy', orderBy)); - } - if (personId != null) { - queryParams.addAll(_queryParams('', 'personId', personId)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - if (tagId != null) { - queryParams.addAll(_queryParams('', 'tagId', tagId)); - } - queryParams.addAll(_queryParams('', 'timeBucket', timeBucket)); - if (userId != null) { - queryParams.addAll(_queryParams('', 'userId', userId)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - if (withCoordinates != null) { - queryParams.addAll(_queryParams('', 'withCoordinates', withCoordinates)); - } - if (withPartners != null) { - queryParams.addAll(_queryParams('', 'withPartners', withPartners)); - } - if (withStacked != null) { - queryParams.addAll(_queryParams('', 'withStacked', withStacked)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get time bucket - /// - /// Retrieve a string of all asset ids in a given time bucket. - /// - /// Parameters: - /// - /// * [String] timeBucket (required): - /// Time bucket identifier in YYYY-MM-DD format - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future getTimeBucket(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - final response = await getTimeBucketWithHttpInfo(timeBucket, albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, orderBy: orderBy, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TimeBucketAssetResponseDto',) as TimeBucketAssetResponseDto; - - } - return null; - } - - /// Get time buckets - /// - /// Retrieve a list of all minimal time buckets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future getTimeBucketsWithHttpInfo({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/timeline/buckets'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumId != null) { - queryParams.addAll(_queryParams('', 'albumId', albumId)); - } - if (bbox != null) { - queryParams.addAll(_queryParams('', 'bbox', bbox)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (orderBy != null) { - queryParams.addAll(_queryParams('', 'orderBy', orderBy)); - } - if (personId != null) { - queryParams.addAll(_queryParams('', 'personId', personId)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - if (tagId != null) { - queryParams.addAll(_queryParams('', 'tagId', tagId)); - } - if (userId != null) { - queryParams.addAll(_queryParams('', 'userId', userId)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - if (withCoordinates != null) { - queryParams.addAll(_queryParams('', 'withCoordinates', withCoordinates)); - } - if (withPartners != null) { - queryParams.addAll(_queryParams('', 'withPartners', withPartners)); - } - if (withStacked != null) { - queryParams.addAll(_queryParams('', 'withStacked', withStacked)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get time buckets - /// - /// Retrieve a list of all minimal time buckets. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future?> getTimeBuckets({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - final response = await getTimeBucketsWithHttpInfo(albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, orderBy: orderBy, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/trash_api.dart b/mobile/openapi/lib/api/trash_api.dart deleted file mode 100644 index 7b593e5111..0000000000 --- a/mobile/openapi/lib/api/trash_api.dart +++ /dev/null @@ -1,173 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class TrashApi { - TrashApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Empty trash - /// - /// Permanently delete all items in the trash. - /// - /// Note: This method returns the HTTP [Response]. - Future emptyTrashWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/trash/empty'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Empty trash - /// - /// Permanently delete all items in the trash. - Future emptyTrash({ Future? abortTrigger, }) async { - final response = await emptyTrashWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto; - - } - return null; - } - - /// Restore assets - /// - /// Restore specific assets from the trash. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future restoreAssetsWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/trash/restore/assets'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Restore assets - /// - /// Restore specific assets from the trash. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future restoreAssets(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await restoreAssetsWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto; - - } - return null; - } - - /// Restore trash - /// - /// Restore all items in the trash. - /// - /// Note: This method returns the HTTP [Response]. - Future restoreTrashWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/trash/restore'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Restore trash - /// - /// Restore all items in the trash. - Future restoreTrash({ Future? abortTrigger, }) async { - final response = await restoreTrashWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/users_admin_api.dart b/mobile/openapi/lib/api/users_admin_api.dart deleted file mode 100644 index ef695e2f33..0000000000 --- a/mobile/openapi/lib/api/users_admin_api.dart +++ /dev/null @@ -1,739 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class UsersAdminApi { - UsersAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a user - /// - /// Create a new user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserAdminCreateDto] userAdminCreateDto (required): - Future createUserAdminWithHttpInfo(UserAdminCreateDto userAdminCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users'; - - // ignore: prefer_final_locals - Object? postBody = userAdminCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a user - /// - /// Create a new user. - /// - /// Parameters: - /// - /// * [UserAdminCreateDto] userAdminCreateDto (required): - Future createUserAdmin(UserAdminCreateDto userAdminCreateDto, { Future? abortTrigger, }) async { - final response = await createUserAdminWithHttpInfo(userAdminCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Delete a user - /// - /// Delete a user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminDeleteDto] userAdminDeleteDto (required): - Future deleteUserAdminWithHttpInfo(String id, UserAdminDeleteDto userAdminDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userAdminDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a user - /// - /// Delete a user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminDeleteDto] userAdminDeleteDto (required): - Future deleteUserAdmin(String id, UserAdminDeleteDto userAdminDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteUserAdminWithHttpInfo(id, userAdminDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserAdmin(String id, { Future? abortTrigger, }) async { - final response = await getUserAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getUserCalendarHeatmapAdminWithHttpInfo(String id, { DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/calendar-heatmap' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (from != null) { - queryParams.addAll(_queryParams('', 'from', from)); - } - if (to != null) { - queryParams.addAll(_queryParams('', 'to', to)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getUserCalendarHeatmapAdmin(String id, { DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - final response = await getUserCalendarHeatmapAdminWithHttpInfo(id, from: from, to: to, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CalendarHeatmapResponseDto',) as CalendarHeatmapResponseDto; - - } - return null; - } - - /// Retrieve user preferences - /// - /// Retrieve the preferences of a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserPreferencesAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/preferences' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user preferences - /// - /// Retrieve the preferences of a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserPreferencesAdmin(String id, { Future? abortTrigger, }) async { - final response = await getUserPreferencesAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Retrieve user sessions - /// - /// Retrieve all sessions for a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserSessionsAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/sessions' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user sessions - /// - /// Retrieve all sessions for a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future?> getUserSessionsAdmin(String id, { Future? abortTrigger, }) async { - final response = await getUserSessionsAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve user statistics - /// - /// Retrieve asset statistics for a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getUserStatisticsAdminWithHttpInfo(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/statistics' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user statistics - /// - /// Retrieve asset statistics for a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getUserStatisticsAdmin(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - final response = await getUserStatisticsAdminWithHttpInfo(id, isFavorite: isFavorite, isTrashed: isTrashed, visibility: visibility, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetStatsResponseDto',) as AssetStatsResponseDto; - - } - return null; - } - - /// Restore a deleted user - /// - /// Restore a previously deleted user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future restoreUserAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/restore' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Restore a deleted user - /// - /// Restore a previously deleted user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future restoreUserAdmin(String id, { Future? abortTrigger, }) async { - final response = await restoreUserAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Search users - /// - /// Search for users. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id: - /// User ID filter - /// - /// * [bool] withDeleted: - /// Include deleted users - Future searchUsersAdminWithHttpInfo({ String? id, bool? withDeleted, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (withDeleted != null) { - queryParams.addAll(_queryParams('', 'withDeleted', withDeleted)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search users - /// - /// Search for users. - /// - /// Parameters: - /// - /// * [String] id: - /// User ID filter - /// - /// * [bool] withDeleted: - /// Include deleted users - Future?> searchUsersAdmin({ String? id, bool? withDeleted, Future? abortTrigger, }) async { - final response = await searchUsersAdminWithHttpInfo(id: id, withDeleted: withDeleted, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdminWithHttpInfo(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userAdminUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdmin(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserAdminWithHttpInfo(id, userAdminUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdminWithHttpInfo(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/preferences' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdmin(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserPreferencesAdminWithHttpInfo(id, userPreferencesUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/users_api.dart b/mobile/openapi/lib/api/users_api.dart deleted file mode 100644 index f768e7c92b..0000000000 --- a/mobile/openapi/lib/api/users_api.dart +++ /dev/null @@ -1,881 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class UsersApi { - UsersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create user profile image - /// - /// Upload and set a new profile image for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MultipartFile] file (required): - /// Profile image file - Future createProfileImageWithHttpInfo(MultipartFile file, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/profile-image'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['multipart/form-data']; - - bool hasFields = false; - final mp = MultipartRequest('POST', Uri.parse(apiPath)); - if (file != null) { - hasFields = true; - mp.fields[r'file'] = file.field; - mp.files.add(file); - } - if (hasFields) { - postBody = mp; - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create user profile image - /// - /// Upload and set a new profile image for the current user. - /// - /// Parameters: - /// - /// * [MultipartFile] file (required): - /// Profile image file - Future createProfileImage(MultipartFile file, { Future? abortTrigger, }) async { - final response = await createProfileImageWithHttpInfo(file, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CreateProfileImageResponseDto',) as CreateProfileImageResponseDto; - - } - return null; - } - - /// Delete user profile image - /// - /// Delete the profile image of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteProfileImageWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/profile-image'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete user profile image - /// - /// Delete the profile image of the current user. - Future deleteProfileImage({ Future? abortTrigger, }) async { - final response = await deleteProfileImageWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete user product key - /// - /// Delete the registered product key for the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteUserLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete user product key - /// - /// Delete the registered product key for the current user. - Future deleteUserLicense({ Future? abortTrigger, }) async { - final response = await deleteUserLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete user onboarding - /// - /// Delete the onboarding status of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteUserOnboardingWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/onboarding'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete user onboarding - /// - /// Delete the onboarding status of the current user. - Future deleteUserOnboarding({ Future? abortTrigger, }) async { - final response = await deleteUserOnboardingWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getMyCalendarHeatmapWithHttpInfo({ DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/calendar-heatmap'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (from != null) { - queryParams.addAll(_queryParams('', 'from', from)); - } - if (to != null) { - queryParams.addAll(_queryParams('', 'to', to)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Parameters: - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getMyCalendarHeatmap({ DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - final response = await getMyCalendarHeatmapWithHttpInfo(from: from, to: to, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CalendarHeatmapResponseDto',) as CalendarHeatmapResponseDto; - - } - return null; - } - - /// Get my preferences - /// - /// Retrieve the preferences for the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future getMyPreferencesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/preferences'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get my preferences - /// - /// Retrieve the preferences for the current user. - Future getMyPreferences({ Future? abortTrigger, }) async { - final response = await getMyPreferencesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Get current user - /// - /// Retrieve information about the user making the API request. - /// - /// Note: This method returns the HTTP [Response]. - Future getMyUserWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get current user - /// - /// Retrieve information about the user making the API request. - Future getMyUser({ Future? abortTrigger, }) async { - final response = await getMyUserWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Retrieve user profile image - /// - /// Retrieve the profile image file for a user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getProfileImageWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/{id}/profile-image' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user profile image - /// - /// Retrieve the profile image file for a user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getProfileImage(String id, { Future? abortTrigger, }) async { - final response = await getProfileImageWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUser(String id, { Future? abortTrigger, }) async { - final response = await getUserWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserResponseDto',) as UserResponseDto; - - } - return null; - } - - /// Retrieve user product key - /// - /// Retrieve information about whether the current user has a registered product key. - /// - /// Note: This method returns the HTTP [Response]. - Future getUserLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user product key - /// - /// Retrieve information about whether the current user has a registered product key. - Future getUserLicense({ Future? abortTrigger, }) async { - final response = await getUserLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserLicense',) as UserLicense; - - } - return null; - } - - /// Retrieve user onboarding - /// - /// Retrieve the onboarding status of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future getUserOnboardingWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/onboarding'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user onboarding - /// - /// Retrieve the onboarding status of the current user. - Future getUserOnboarding({ Future? abortTrigger, }) async { - final response = await getUserOnboardingWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OnboardingResponseDto',) as OnboardingResponseDto; - - } - return null; - } - - /// Get all users - /// - /// Retrieve a list of all users on the server. - /// - /// Note: This method returns the HTTP [Response]. - Future searchUsersWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get all users - /// - /// Retrieve a list of all users on the server. - Future?> searchUsers({ Future? abortTrigger, }) async { - final response = await searchUsersWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Set user product key - /// - /// Register a product key for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setUserLicenseWithHttpInfo(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/license'; - - // ignore: prefer_final_locals - Object? postBody = licenseKeyDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Set user product key - /// - /// Register a product key for the current user. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setUserLicense(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - final response = await setUserLicenseWithHttpInfo(licenseKeyDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserLicense',) as UserLicense; - - } - return null; - } - - /// Update user onboarding - /// - /// Update the onboarding status of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OnboardingDto] onboardingDto (required): - Future setUserOnboardingWithHttpInfo(OnboardingDto onboardingDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/onboarding'; - - // ignore: prefer_final_locals - Object? postBody = onboardingDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user onboarding - /// - /// Update the onboarding status of the current user. - /// - /// Parameters: - /// - /// * [OnboardingDto] onboardingDto (required): - Future setUserOnboarding(OnboardingDto onboardingDto, { Future? abortTrigger, }) async { - final response = await setUserOnboardingWithHttpInfo(onboardingDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OnboardingResponseDto',) as OnboardingResponseDto; - - } - return null; - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferencesWithHttpInfo(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/preferences'; - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferences(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMyPreferencesWithHttpInfo(userPreferencesUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUserWithHttpInfo(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me'; - - // ignore: prefer_final_locals - Object? postBody = userUpdateMeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUser(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - final response = await updateMyUserWithHttpInfo(userUpdateMeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/views_api.dart b/mobile/openapi/lib/api/views_api.dart deleted file mode 100644 index 3ccbacb650..0000000000 --- a/mobile/openapi/lib/api/views_api.dart +++ /dev/null @@ -1,132 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class ViewsApi { - ViewsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve assets by original path - /// - /// Retrieve assets that are children of a specific folder. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] path (required): - Future getAssetsByOriginalPathWithHttpInfo(String path, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/view/folder'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'path', path)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve assets by original path - /// - /// Retrieve assets that are children of a specific folder. - /// - /// Parameters: - /// - /// * [String] path (required): - Future?> getAssetsByOriginalPath(String path, { Future? abortTrigger, }) async { - final response = await getAssetsByOriginalPathWithHttpInfo(path, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve unique paths - /// - /// Retrieve a list of unique folder paths from asset original paths. - /// - /// Note: This method returns the HTTP [Response]. - Future getUniqueOriginalPathsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/view/folder/unique-paths'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve unique paths - /// - /// Retrieve a list of unique folder paths from asset original paths. - Future?> getUniqueOriginalPaths({ Future? abortTrigger, }) async { - final response = await getUniqueOriginalPathsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/workflows_api.dart b/mobile/openapi/lib/api/workflows_api.dart deleted file mode 100644 index 4b27acd624..0000000000 --- a/mobile/openapi/lib/api/workflows_api.dart +++ /dev/null @@ -1,457 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class WorkflowsApi { - WorkflowsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a workflow - /// - /// Create a new workflow, the workflow can also be created with empty filters and actions. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [WorkflowCreateDto] workflowCreateDto (required): - Future createWorkflowWithHttpInfo(WorkflowCreateDto workflowCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows'; - - // ignore: prefer_final_locals - Object? postBody = workflowCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a workflow - /// - /// Create a new workflow, the workflow can also be created with empty filters and actions. - /// - /// Parameters: - /// - /// * [WorkflowCreateDto] workflowCreateDto (required): - Future createWorkflow(WorkflowCreateDto workflowCreateDto, { Future? abortTrigger, }) async { - final response = await createWorkflowWithHttpInfo(workflowCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } - - /// Delete a workflow - /// - /// Delete a workflow by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteWorkflowWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a workflow - /// - /// Delete a workflow by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteWorkflow(String id, { Future? abortTrigger, }) async { - final response = await deleteWorkflowWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a workflow - /// - /// Retrieve information about a specific workflow by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflowWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a workflow - /// - /// Retrieve information about a specific workflow by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflow(String id, { Future? abortTrigger, }) async { - final response = await getWorkflowWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } - - /// Retrieve a workflow - /// - /// Retrieve a workflow details without ids, default values, etc. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflowForShareWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}/share' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a workflow - /// - /// Retrieve a workflow details without ids, default values, etc. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflowForShare(String id, { Future? abortTrigger, }) async { - final response = await getWorkflowForShareWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowShareResponseDto',) as WorkflowShareResponseDto; - - } - return null; - } - - /// List all workflow triggers - /// - /// Retrieve a list of all available workflow triggers. - /// - /// Note: This method returns the HTTP [Response]. - Future getWorkflowTriggersWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/triggers'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all workflow triggers - /// - /// Retrieve a list of all available workflow triggers. - Future?> getWorkflowTriggers({ Future? abortTrigger, }) async { - final response = await getWorkflowTriggersWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// List all workflows - /// - /// Retrieve a list of workflows available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] description: - /// Workflow description - /// - /// * [bool] enabled: - /// Workflow enabled - /// - /// * [String] id: - /// Workflow ID - /// - /// * [String] name: - /// Workflow name - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger type - Future searchWorkflowsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, WorkflowTrigger? trigger, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (description != null) { - queryParams.addAll(_queryParams('', 'description', description)); - } - if (enabled != null) { - queryParams.addAll(_queryParams('', 'enabled', enabled)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - if (trigger != null) { - queryParams.addAll(_queryParams('', 'trigger', trigger)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all workflows - /// - /// Retrieve a list of workflows available to the authenticated user. - /// - /// Parameters: - /// - /// * [String] description: - /// Workflow description - /// - /// * [bool] enabled: - /// Workflow enabled - /// - /// * [String] id: - /// Workflow ID - /// - /// * [String] name: - /// Workflow name - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger type - Future?> searchWorkflows({ String? description, bool? enabled, String? id, String? name, WorkflowTrigger? trigger, Future? abortTrigger, }) async { - final response = await searchWorkflowsWithHttpInfo(description: description, enabled: enabled, id: id, name: name, trigger: trigger, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflowWithHttpInfo(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = workflowUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflow(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - final response = await updateWorkflowWithHttpInfo(id, workflowUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart deleted file mode 100644 index 4c6c1b5c72..0000000000 --- a/mobile/openapi/lib/api_client.dart +++ /dev/null @@ -1,999 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiClient { - ApiClient({this.basePath = '/api', this.authentication,}); - - String basePath; - final Authentication? authentication; - - var _client = Client(); - final _defaultHeaderMap = {}; - - /// Returns the current HTTP [Client] instance to use in this class. - /// - /// The return value is guaranteed to never be null. - Client get client => _client; - - /// Requests to use a new HTTP [Client] in this class. - set client(Client newClient) { - _client = newClient; - } - - Map get defaultHeaderMap => _defaultHeaderMap; - - void addDefaultHeader(String key, String value) { - _defaultHeaderMap[key] = value; - } - - // We don't use a Map for queryParams. - // If collectionFormat is 'multi', a key might appear multiple times. - Future invokeAPI( - String path, - String method, - List queryParams, - Object? body, - Map headerParams, - Map formParams, - String? contentType, { - Future? abortTrigger, - }) async { - await authentication?.applyToParams(queryParams, headerParams); - - headerParams.addAll(_defaultHeaderMap); - if (contentType != null) { - headerParams['Content-Type'] = contentType; - } - - final urlEncodedQueryParams = queryParams.map((param) => '$param'); - final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : ''; - final uri = Uri.parse('$basePath$path$queryString'); - - try { - // Special case for uploading a single file which isn't a 'multipart/form-data'. - if ( - body is MultipartFile && (contentType == null || - !contentType.toLowerCase().startsWith('multipart/form-data')) - ) { - final request = AbortableStreamedRequest(method, uri, abortTrigger: abortTrigger); - request.headers.addAll(headerParams); - request.contentLength = body.length; - body.finalize().listen( - request.sink.add, - onDone: request.sink.close, - // ignore: avoid_types_on_closure_parameters - onError: (Object error, StackTrace trace) => request.sink.close(), - cancelOnError: true, - ); - final response = await _client.send(request); - return Response.fromStream(response); - } - - if (body is MultipartRequest) { - final request = AbortableMultipartRequest(method, uri, abortTrigger: abortTrigger); - request.fields.addAll(body.fields); - request.files.addAll(body.files); - request.headers.addAll(body.headers); - request.headers.addAll(headerParams); - final response = await _client.send(request); - return Response.fromStream(response); - } - - final msgBody = contentType == 'application/x-www-form-urlencoded' - ? formParams - : await serializeAsync(body); - final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; - - final request = AbortableRequest(method, uri, abortTrigger: abortTrigger); - if (nullableHeaderParams != null) { - request.headers.addAll(nullableHeaderParams); - } - if (msgBody is String && msgBody.isNotEmpty) { - request.body = msgBody; - } else if (msgBody is List && msgBody.isNotEmpty) { - request.bodyBytes = msgBody; - } else if (msgBody is Map) { - request.bodyFields = msgBody; - } - final response = await _client.send(request); - return Response.fromStream(response); - } on SocketException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'Socket operation failed: $method $path', - error, - trace, - ); - } on TlsException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'TLS/SSL communication failed: $method $path', - error, - trace, - ); - } on IOException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'I/O operation failed: $method $path', - error, - trace, - ); - } on ClientException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'HTTP connection failed: $method $path', - error, - trace, - ); - } on Exception catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'Exception occurred: $method $path', - error, - trace, - ); - } - } - - Future deserializeAsync(String value, String targetType, {bool growable = false,}) => - // ignore: deprecated_member_use_from_same_package - deserialize(value, targetType, growable: growable); - - @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') - Future deserialize(String value, String targetType, {bool growable = false,}) async { - // Remove all spaces. Necessary for regular expressions as well. - targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments - - // If the expected target type is String, nothing to do... - return targetType == 'String' - ? value - : fromJson(await compute((String j) => json.decode(j), value), targetType, growable: growable); - } - - // ignore: deprecated_member_use_from_same_package - Future serializeAsync(Object? value) async => serialize(value); - - @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') - String serialize(Object? value) => value == null ? '' : json.encode(value); - - /// Returns a native instance of an OpenAPI class matching the [specified type][targetType]. - static dynamic fromJson(dynamic value, String targetType, {bool growable = false,}) { - try { - switch (targetType) { - case 'String': - return value is String ? value : value.toString(); - case 'int': - return value is int ? value : int.parse('$value'); - case 'double': - return value is double ? value : double.parse('$value'); - case 'bool': - if (value is bool) { - return value; - } - final valueString = '$value'.toLowerCase(); - return valueString == 'true' || valueString == '1'; - case 'DateTime': - return value is DateTime ? value : DateTime.tryParse(value); - case 'ActivityCreateDto': - return ActivityCreateDto.fromJson(value); - case 'ActivityResponseDto': - return ActivityResponseDto.fromJson(value); - case 'ActivityStatisticsResponseDto': - return ActivityStatisticsResponseDto.fromJson(value); - case 'AddUsersDto': - return AddUsersDto.fromJson(value); - case 'AdminOnboardingUpdateDto': - return AdminOnboardingUpdateDto.fromJson(value); - case 'AlbumResponseDto': - return AlbumResponseDto.fromJson(value); - case 'AlbumStatisticsResponseDto': - return AlbumStatisticsResponseDto.fromJson(value); - case 'AlbumUserAddDto': - return AlbumUserAddDto.fromJson(value); - case 'AlbumUserCreateDto': - return AlbumUserCreateDto.fromJson(value); - case 'AlbumUserResponseDto': - return AlbumUserResponseDto.fromJson(value); - case 'AlbumUserRole': - return AlbumUserRoleTypeTransformer().decode(value); - case 'AlbumsAddAssetsDto': - return AlbumsAddAssetsDto.fromJson(value); - case 'AlbumsAddAssetsResponseDto': - return AlbumsAddAssetsResponseDto.fromJson(value); - case 'AlbumsResponse': - return AlbumsResponse.fromJson(value); - case 'AlbumsUpdate': - return AlbumsUpdate.fromJson(value); - case 'ApiKeyCreateDto': - return ApiKeyCreateDto.fromJson(value); - case 'ApiKeyCreateResponseDto': - return ApiKeyCreateResponseDto.fromJson(value); - case 'ApiKeyResponseDto': - return ApiKeyResponseDto.fromJson(value); - case 'ApiKeyUpdateDto': - return ApiKeyUpdateDto.fromJson(value); - case 'AssetBulkDeleteDto': - return AssetBulkDeleteDto.fromJson(value); - case 'AssetBulkUpdateDto': - return AssetBulkUpdateDto.fromJson(value); - case 'AssetBulkUploadCheckDto': - return AssetBulkUploadCheckDto.fromJson(value); - case 'AssetBulkUploadCheckItem': - return AssetBulkUploadCheckItem.fromJson(value); - case 'AssetBulkUploadCheckResponseDto': - return AssetBulkUploadCheckResponseDto.fromJson(value); - case 'AssetBulkUploadCheckResult': - return AssetBulkUploadCheckResult.fromJson(value); - case 'AssetCopyDto': - return AssetCopyDto.fromJson(value); - case 'AssetEditAction': - return AssetEditActionTypeTransformer().decode(value); - case 'AssetEditActionItemDto': - return AssetEditActionItemDto.fromJson(value); - case 'AssetEditActionItemDtoParameters': - return AssetEditActionItemDtoParameters.fromJson(value); - case 'AssetEditActionItemResponseDto': - return AssetEditActionItemResponseDto.fromJson(value); - case 'AssetEditsCreateDto': - return AssetEditsCreateDto.fromJson(value); - case 'AssetEditsResponseDto': - return AssetEditsResponseDto.fromJson(value); - case 'AssetFaceCreateDto': - return AssetFaceCreateDto.fromJson(value); - case 'AssetFaceDeleteDto': - return AssetFaceDeleteDto.fromJson(value); - case 'AssetFaceResponseDto': - return AssetFaceResponseDto.fromJson(value); - case 'AssetFaceUpdateDto': - return AssetFaceUpdateDto.fromJson(value); - case 'AssetFaceUpdateItem': - return AssetFaceUpdateItem.fromJson(value); - case 'AssetIdErrorReason': - return AssetIdErrorReasonTypeTransformer().decode(value); - case 'AssetIdsDto': - return AssetIdsDto.fromJson(value); - case 'AssetIdsResponseDto': - return AssetIdsResponseDto.fromJson(value); - case 'AssetJobName': - return AssetJobNameTypeTransformer().decode(value); - case 'AssetJobsDto': - return AssetJobsDto.fromJson(value); - case 'AssetMediaResponseDto': - return AssetMediaResponseDto.fromJson(value); - case 'AssetMediaSize': - return AssetMediaSizeTypeTransformer().decode(value); - case 'AssetMediaStatus': - return AssetMediaStatusTypeTransformer().decode(value); - case 'AssetMetadataBulkDeleteDto': - return AssetMetadataBulkDeleteDto.fromJson(value); - case 'AssetMetadataBulkDeleteItemDto': - return AssetMetadataBulkDeleteItemDto.fromJson(value); - case 'AssetMetadataBulkResponseDto': - return AssetMetadataBulkResponseDto.fromJson(value); - case 'AssetMetadataBulkUpsertDto': - return AssetMetadataBulkUpsertDto.fromJson(value); - case 'AssetMetadataBulkUpsertItemDto': - return AssetMetadataBulkUpsertItemDto.fromJson(value); - case 'AssetMetadataResponseDto': - return AssetMetadataResponseDto.fromJson(value); - case 'AssetMetadataUpsertDto': - return AssetMetadataUpsertDto.fromJson(value); - case 'AssetMetadataUpsertItemDto': - return AssetMetadataUpsertItemDto.fromJson(value); - case 'AssetOcrResponseDto': - return AssetOcrResponseDto.fromJson(value); - case 'AssetOrder': - return AssetOrderTypeTransformer().decode(value); - case 'AssetOrderBy': - return AssetOrderByTypeTransformer().decode(value); - case 'AssetRejectReason': - return AssetRejectReasonTypeTransformer().decode(value); - case 'AssetResponseDto': - return AssetResponseDto.fromJson(value); - case 'AssetStackResponseDto': - return AssetStackResponseDto.fromJson(value); - case 'AssetStatsResponseDto': - return AssetStatsResponseDto.fromJson(value); - case 'AssetTypeEnum': - return AssetTypeEnumTypeTransformer().decode(value); - case 'AssetUploadAction': - return AssetUploadActionTypeTransformer().decode(value); - case 'AssetVisibility': - return AssetVisibilityTypeTransformer().decode(value); - case 'AudioCodec': - return AudioCodecTypeTransformer().decode(value); - case 'AuthStatusResponseDto': - return AuthStatusResponseDto.fromJson(value); - case 'AvatarUpdate': - return AvatarUpdate.fromJson(value); - case 'BulkIdErrorReason': - return BulkIdErrorReasonTypeTransformer().decode(value); - case 'BulkIdResponseDto': - return BulkIdResponseDto.fromJson(value); - case 'BulkIdsDto': - return BulkIdsDto.fromJson(value); - case 'CLIPConfig': - return CLIPConfig.fromJson(value); - case 'CQMode': - return CQModeTypeTransformer().decode(value); - case 'CalendarHeatmapResponseDto': - return CalendarHeatmapResponseDto.fromJson(value); - case 'CalendarHeatmapResponseDtoSeriesInner': - return CalendarHeatmapResponseDtoSeriesInner.fromJson(value); - case 'CalendarHeatmapType': - return CalendarHeatmapTypeTypeTransformer().decode(value); - case 'CastResponse': - return CastResponse.fromJson(value); - case 'CastUpdate': - return CastUpdate.fromJson(value); - case 'ChangePasswordDto': - return ChangePasswordDto.fromJson(value); - case 'Colorspace': - return ColorspaceTypeTransformer().decode(value); - case 'ContributorCountResponseDto': - return ContributorCountResponseDto.fromJson(value); - case 'CreateAlbumDto': - return CreateAlbumDto.fromJson(value); - case 'CreateLibraryDto': - return CreateLibraryDto.fromJson(value); - case 'CreateProfileImageResponseDto': - return CreateProfileImageResponseDto.fromJson(value); - case 'CropParameters': - return CropParameters.fromJson(value); - case 'DatabaseBackupConfig': - return DatabaseBackupConfig.fromJson(value); - case 'DatabaseBackupDeleteDto': - return DatabaseBackupDeleteDto.fromJson(value); - case 'DatabaseBackupDto': - return DatabaseBackupDto.fromJson(value); - case 'DatabaseBackupListResponseDto': - return DatabaseBackupListResponseDto.fromJson(value); - case 'DownloadArchiveDto': - return DownloadArchiveDto.fromJson(value); - case 'DownloadArchiveInfo': - return DownloadArchiveInfo.fromJson(value); - case 'DownloadInfoDto': - return DownloadInfoDto.fromJson(value); - case 'DownloadResponse': - return DownloadResponse.fromJson(value); - case 'DownloadResponseDto': - return DownloadResponseDto.fromJson(value); - case 'DownloadUpdate': - return DownloadUpdate.fromJson(value); - case 'DuplicateDetectionConfig': - return DuplicateDetectionConfig.fromJson(value); - case 'DuplicateResolveDto': - return DuplicateResolveDto.fromJson(value); - case 'DuplicateResolveGroupDto': - return DuplicateResolveGroupDto.fromJson(value); - case 'DuplicateResponseDto': - return DuplicateResponseDto.fromJson(value); - case 'EmailNotificationsResponse': - return EmailNotificationsResponse.fromJson(value); - case 'EmailNotificationsUpdate': - return EmailNotificationsUpdate.fromJson(value); - case 'ExifResponseDto': - return ExifResponseDto.fromJson(value); - case 'FaceDto': - return FaceDto.fromJson(value); - case 'FacialRecognitionConfig': - return FacialRecognitionConfig.fromJson(value); - case 'FoldersResponse': - return FoldersResponse.fromJson(value); - case 'FoldersUpdate': - return FoldersUpdate.fromJson(value); - case 'HlsVideoResolution': - return HlsVideoResolutionTypeTransformer().decode(value); - case 'ImageFormat': - return ImageFormatTypeTransformer().decode(value); - case 'IntegrityReport': - return IntegrityReportTypeTransformer().decode(value); - case 'IntegrityReportResponseDto': - return IntegrityReportResponseDto.fromJson(value); - case 'IntegrityReportResponseDtoItemsInner': - return IntegrityReportResponseDtoItemsInner.fromJson(value); - case 'IntegrityReportSummaryResponseDto': - return IntegrityReportSummaryResponseDto.fromJson(value); - case 'JobCreateDto': - return JobCreateDto.fromJson(value); - case 'JobName': - return JobNameTypeTransformer().decode(value); - case 'JobSettingsDto': - return JobSettingsDto.fromJson(value); - case 'LibraryResponseDto': - return LibraryResponseDto.fromJson(value); - case 'LibraryStatsResponseDto': - return LibraryStatsResponseDto.fromJson(value); - case 'LicenseKeyDto': - return LicenseKeyDto.fromJson(value); - case 'LogLevel': - return LogLevelTypeTransformer().decode(value); - case 'LoginCredentialDto': - return LoginCredentialDto.fromJson(value); - case 'LoginResponseDto': - return LoginResponseDto.fromJson(value); - case 'LogoutResponseDto': - return LogoutResponseDto.fromJson(value); - case 'MachineLearningAvailabilityChecksDto': - return MachineLearningAvailabilityChecksDto.fromJson(value); - case 'MaintenanceAction': - return MaintenanceActionTypeTransformer().decode(value); - case 'MaintenanceAuthDto': - return MaintenanceAuthDto.fromJson(value); - case 'MaintenanceDetectInstallResponseDto': - return MaintenanceDetectInstallResponseDto.fromJson(value); - case 'MaintenanceDetectInstallStorageFolderDto': - return MaintenanceDetectInstallStorageFolderDto.fromJson(value); - case 'MaintenanceLoginDto': - return MaintenanceLoginDto.fromJson(value); - case 'MaintenanceStatusResponseDto': - return MaintenanceStatusResponseDto.fromJson(value); - case 'ManualJobName': - return ManualJobNameTypeTransformer().decode(value); - case 'MapMarkerResponseDto': - return MapMarkerResponseDto.fromJson(value); - case 'MapReverseGeocodeResponseDto': - return MapReverseGeocodeResponseDto.fromJson(value); - case 'MemoriesResponse': - return MemoriesResponse.fromJson(value); - case 'MemoriesUpdate': - return MemoriesUpdate.fromJson(value); - case 'MemoryCreateDto': - return MemoryCreateDto.fromJson(value); - case 'MemoryResponseDto': - return MemoryResponseDto.fromJson(value); - case 'MemorySearchOrder': - return MemorySearchOrderTypeTransformer().decode(value); - case 'MemoryStatisticsResponseDto': - return MemoryStatisticsResponseDto.fromJson(value); - case 'MemoryType': - return MemoryTypeTypeTransformer().decode(value); - case 'MemoryUpdateDto': - return MemoryUpdateDto.fromJson(value); - case 'MergePersonDto': - return MergePersonDto.fromJson(value); - case 'MetadataSearchDto': - return MetadataSearchDto.fromJson(value); - case 'MirrorAxis': - return MirrorAxisTypeTransformer().decode(value); - case 'MirrorParameters': - return MirrorParameters.fromJson(value); - case 'NotificationCreateDto': - return NotificationCreateDto.fromJson(value); - case 'NotificationDeleteAllDto': - return NotificationDeleteAllDto.fromJson(value); - case 'NotificationDto': - return NotificationDto.fromJson(value); - case 'NotificationLevel': - return NotificationLevelTypeTransformer().decode(value); - case 'NotificationType': - return NotificationTypeTypeTransformer().decode(value); - case 'NotificationUpdateAllDto': - return NotificationUpdateAllDto.fromJson(value); - case 'NotificationUpdateDto': - return NotificationUpdateDto.fromJson(value); - case 'OAuthAuthorizeResponseDto': - return OAuthAuthorizeResponseDto.fromJson(value); - case 'OAuthCallbackDto': - return OAuthCallbackDto.fromJson(value); - case 'OAuthConfigDto': - return OAuthConfigDto.fromJson(value); - case 'OAuthTokenEndpointAuthMethod': - return OAuthTokenEndpointAuthMethodTypeTransformer().decode(value); - case 'OcrConfig': - return OcrConfig.fromJson(value); - case 'OnThisDayDto': - return OnThisDayDto.fromJson(value); - case 'OnboardingDto': - return OnboardingDto.fromJson(value); - case 'OnboardingResponseDto': - return OnboardingResponseDto.fromJson(value); - case 'PartnerCreateDto': - return PartnerCreateDto.fromJson(value); - case 'PartnerDirection': - return PartnerDirectionTypeTransformer().decode(value); - case 'PartnerResponseDto': - return PartnerResponseDto.fromJson(value); - case 'PartnerUpdateDto': - return PartnerUpdateDto.fromJson(value); - case 'PeopleResponse': - return PeopleResponse.fromJson(value); - case 'PeopleResponseDto': - return PeopleResponseDto.fromJson(value); - case 'PeopleUpdate': - return PeopleUpdate.fromJson(value); - case 'PeopleUpdateDto': - return PeopleUpdateDto.fromJson(value); - case 'PeopleUpdateItem': - return PeopleUpdateItem.fromJson(value); - case 'Permission': - return PermissionTypeTransformer().decode(value); - case 'PersonCreateDto': - return PersonCreateDto.fromJson(value); - case 'PersonResponseDto': - return PersonResponseDto.fromJson(value); - case 'PersonStatisticsResponseDto': - return PersonStatisticsResponseDto.fromJson(value); - case 'PersonUpdateDto': - return PersonUpdateDto.fromJson(value); - case 'PinCodeChangeDto': - return PinCodeChangeDto.fromJson(value); - case 'PinCodeResetDto': - return PinCodeResetDto.fromJson(value); - case 'PinCodeSetupDto': - return PinCodeSetupDto.fromJson(value); - case 'PlacesResponseDto': - return PlacesResponseDto.fromJson(value); - case 'PluginMethodResponseDto': - return PluginMethodResponseDto.fromJson(value); - case 'PluginResponseDto': - return PluginResponseDto.fromJson(value); - case 'PluginTemplateResponseDto': - return PluginTemplateResponseDto.fromJson(value); - case 'PluginTemplateStepResponseDto': - return PluginTemplateStepResponseDto.fromJson(value); - case 'PurchaseResponse': - return PurchaseResponse.fromJson(value); - case 'PurchaseUpdate': - return PurchaseUpdate.fromJson(value); - case 'QueueCommand': - return QueueCommandTypeTransformer().decode(value); - case 'QueueCommandDto': - return QueueCommandDto.fromJson(value); - case 'QueueDeleteDto': - return QueueDeleteDto.fromJson(value); - case 'QueueJobResponseDto': - return QueueJobResponseDto.fromJson(value); - case 'QueueJobStatus': - return QueueJobStatusTypeTransformer().decode(value); - case 'QueueName': - return QueueNameTypeTransformer().decode(value); - case 'QueueResponseDto': - return QueueResponseDto.fromJson(value); - case 'QueueResponseLegacyDto': - return QueueResponseLegacyDto.fromJson(value); - case 'QueueStatisticsDto': - return QueueStatisticsDto.fromJson(value); - case 'QueueStatusLegacyDto': - return QueueStatusLegacyDto.fromJson(value); - case 'QueueUpdateDto': - return QueueUpdateDto.fromJson(value); - case 'QueuesResponseLegacyDto': - return QueuesResponseLegacyDto.fromJson(value); - case 'RandomSearchDto': - return RandomSearchDto.fromJson(value); - case 'RatingsResponse': - return RatingsResponse.fromJson(value); - case 'RatingsUpdate': - return RatingsUpdate.fromJson(value); - case 'ReactionLevel': - return ReactionLevelTypeTransformer().decode(value); - case 'ReactionType': - return ReactionTypeTypeTransformer().decode(value); - case 'RecentlyAddedResponse': - return RecentlyAddedResponse.fromJson(value); - case 'RecentlyAddedUpdate': - return RecentlyAddedUpdate.fromJson(value); - case 'ReleaseChannel': - return ReleaseChannelTypeTransformer().decode(value); - case 'ReleaseEventV1': - return ReleaseEventV1.fromJson(value); - case 'ReleaseType': - return ReleaseTypeTypeTransformer().decode(value); - case 'ReverseGeocodingStateResponseDto': - return ReverseGeocodingStateResponseDto.fromJson(value); - case 'RotateParameters': - return RotateParameters.fromJson(value); - case 'SearchAlbumResponseDto': - return SearchAlbumResponseDto.fromJson(value); - case 'SearchAssetResponseDto': - return SearchAssetResponseDto.fromJson(value); - case 'SearchExploreItem': - return SearchExploreItem.fromJson(value); - case 'SearchExploreResponseDto': - return SearchExploreResponseDto.fromJson(value); - case 'SearchFacetCountResponseDto': - return SearchFacetCountResponseDto.fromJson(value); - case 'SearchFacetResponseDto': - return SearchFacetResponseDto.fromJson(value); - case 'SearchResponseDto': - return SearchResponseDto.fromJson(value); - case 'SearchStatisticsResponseDto': - return SearchStatisticsResponseDto.fromJson(value); - case 'SearchSuggestionType': - return SearchSuggestionTypeTypeTransformer().decode(value); - case 'ServerAboutResponseDto': - return ServerAboutResponseDto.fromJson(value); - case 'ServerApkLinksDto': - return ServerApkLinksDto.fromJson(value); - case 'ServerConfigDto': - return ServerConfigDto.fromJson(value); - case 'ServerFeaturesDto': - return ServerFeaturesDto.fromJson(value); - case 'ServerMediaTypesResponseDto': - return ServerMediaTypesResponseDto.fromJson(value); - case 'ServerPingResponse': - return ServerPingResponse.fromJson(value); - case 'ServerStatsResponseDto': - return ServerStatsResponseDto.fromJson(value); - case 'ServerStorageResponseDto': - return ServerStorageResponseDto.fromJson(value); - case 'ServerVersionHistoryResponseDto': - return ServerVersionHistoryResponseDto.fromJson(value); - case 'ServerVersionResponseDto': - return ServerVersionResponseDto.fromJson(value); - case 'SessionCreateDto': - return SessionCreateDto.fromJson(value); - case 'SessionCreateResponseDto': - return SessionCreateResponseDto.fromJson(value); - case 'SessionResponseDto': - return SessionResponseDto.fromJson(value); - case 'SessionUnlockDto': - return SessionUnlockDto.fromJson(value); - case 'SessionUpdateDto': - return SessionUpdateDto.fromJson(value); - case 'SetMaintenanceModeDto': - return SetMaintenanceModeDto.fromJson(value); - case 'SharedLinkCreateDto': - return SharedLinkCreateDto.fromJson(value); - case 'SharedLinkEditDto': - return SharedLinkEditDto.fromJson(value); - case 'SharedLinkLoginDto': - return SharedLinkLoginDto.fromJson(value); - case 'SharedLinkResponseDto': - return SharedLinkResponseDto.fromJson(value); - case 'SharedLinkType': - return SharedLinkTypeTypeTransformer().decode(value); - case 'SharedLinksResponse': - return SharedLinksResponse.fromJson(value); - case 'SharedLinksUpdate': - return SharedLinksUpdate.fromJson(value); - case 'SignUpDto': - return SignUpDto.fromJson(value); - case 'SmartSearchDto': - return SmartSearchDto.fromJson(value); - case 'SourceType': - return SourceTypeTypeTransformer().decode(value); - case 'StackCreateDto': - return StackCreateDto.fromJson(value); - case 'StackResponseDto': - return StackResponseDto.fromJson(value); - case 'StackUpdateDto': - return StackUpdateDto.fromJson(value); - case 'StatisticsSearchDto': - return StatisticsSearchDto.fromJson(value); - case 'StorageFolder': - return StorageFolderTypeTransformer().decode(value); - case 'SyncAckDeleteDto': - return SyncAckDeleteDto.fromJson(value); - case 'SyncAckDto': - return SyncAckDto.fromJson(value); - case 'SyncAckSetDto': - return SyncAckSetDto.fromJson(value); - case 'SyncAlbumDeleteV1': - return SyncAlbumDeleteV1.fromJson(value); - case 'SyncAlbumToAssetDeleteV1': - return SyncAlbumToAssetDeleteV1.fromJson(value); - case 'SyncAlbumToAssetV1': - return SyncAlbumToAssetV1.fromJson(value); - case 'SyncAlbumUserDeleteV1': - return SyncAlbumUserDeleteV1.fromJson(value); - case 'SyncAlbumUserV1': - return SyncAlbumUserV1.fromJson(value); - case 'SyncAlbumV1': - return SyncAlbumV1.fromJson(value); - case 'SyncAlbumV2': - return SyncAlbumV2.fromJson(value); - case 'SyncAssetDeleteV1': - return SyncAssetDeleteV1.fromJson(value); - case 'SyncAssetEditDeleteV1': - return SyncAssetEditDeleteV1.fromJson(value); - case 'SyncAssetEditV1': - return SyncAssetEditV1.fromJson(value); - case 'SyncAssetExifV1': - return SyncAssetExifV1.fromJson(value); - case 'SyncAssetFaceDeleteV1': - return SyncAssetFaceDeleteV1.fromJson(value); - case 'SyncAssetFaceV1': - return SyncAssetFaceV1.fromJson(value); - case 'SyncAssetFaceV2': - return SyncAssetFaceV2.fromJson(value); - case 'SyncAssetMetadataDeleteV1': - return SyncAssetMetadataDeleteV1.fromJson(value); - case 'SyncAssetMetadataV1': - return SyncAssetMetadataV1.fromJson(value); - case 'SyncAssetOcrDeleteV1': - return SyncAssetOcrDeleteV1.fromJson(value); - case 'SyncAssetOcrV1': - return SyncAssetOcrV1.fromJson(value); - case 'SyncAssetV1': - return SyncAssetV1.fromJson(value); - case 'SyncAssetV2': - return SyncAssetV2.fromJson(value); - case 'SyncAuthUserV1': - return SyncAuthUserV1.fromJson(value); - case 'SyncEntityType': - return SyncEntityTypeTypeTransformer().decode(value); - case 'SyncMemoryAssetDeleteV1': - return SyncMemoryAssetDeleteV1.fromJson(value); - case 'SyncMemoryAssetV1': - return SyncMemoryAssetV1.fromJson(value); - case 'SyncMemoryDeleteV1': - return SyncMemoryDeleteV1.fromJson(value); - case 'SyncMemoryV1': - return SyncMemoryV1.fromJson(value); - case 'SyncPartnerDeleteV1': - return SyncPartnerDeleteV1.fromJson(value); - case 'SyncPartnerV1': - return SyncPartnerV1.fromJson(value); - case 'SyncPersonDeleteV1': - return SyncPersonDeleteV1.fromJson(value); - case 'SyncPersonV1': - return SyncPersonV1.fromJson(value); - case 'SyncRequestType': - return SyncRequestTypeTypeTransformer().decode(value); - case 'SyncStackDeleteV1': - return SyncStackDeleteV1.fromJson(value); - case 'SyncStackV1': - return SyncStackV1.fromJson(value); - case 'SyncStreamDto': - return SyncStreamDto.fromJson(value); - case 'SyncUserDeleteV1': - return SyncUserDeleteV1.fromJson(value); - case 'SyncUserMetadataDeleteV1': - return SyncUserMetadataDeleteV1.fromJson(value); - case 'SyncUserMetadataV1': - return SyncUserMetadataV1.fromJson(value); - case 'SyncUserV1': - return SyncUserV1.fromJson(value); - case 'SystemConfigBackupsDto': - return SystemConfigBackupsDto.fromJson(value); - case 'SystemConfigDto': - return SystemConfigDto.fromJson(value); - case 'SystemConfigFFmpegDto': - return SystemConfigFFmpegDto.fromJson(value); - case 'SystemConfigFFmpegRealtimeDto': - return SystemConfigFFmpegRealtimeDto.fromJson(value); - case 'SystemConfigFacesDto': - return SystemConfigFacesDto.fromJson(value); - case 'SystemConfigGeneratedFullsizeImageDto': - return SystemConfigGeneratedFullsizeImageDto.fromJson(value); - case 'SystemConfigGeneratedImageDto': - return SystemConfigGeneratedImageDto.fromJson(value); - case 'SystemConfigImageDto': - return SystemConfigImageDto.fromJson(value); - case 'SystemConfigIntegrityChecks': - return SystemConfigIntegrityChecks.fromJson(value); - case 'SystemConfigIntegrityChecksumJob': - return SystemConfigIntegrityChecksumJob.fromJson(value); - case 'SystemConfigIntegrityJob': - return SystemConfigIntegrityJob.fromJson(value); - case 'SystemConfigJobDto': - return SystemConfigJobDto.fromJson(value); - case 'SystemConfigLibraryDto': - return SystemConfigLibraryDto.fromJson(value); - case 'SystemConfigLibraryScanDto': - return SystemConfigLibraryScanDto.fromJson(value); - case 'SystemConfigLibraryWatchDto': - return SystemConfigLibraryWatchDto.fromJson(value); - case 'SystemConfigLoggingDto': - return SystemConfigLoggingDto.fromJson(value); - case 'SystemConfigMachineLearningDto': - return SystemConfigMachineLearningDto.fromJson(value); - case 'SystemConfigMapDto': - return SystemConfigMapDto.fromJson(value); - case 'SystemConfigMetadataDto': - return SystemConfigMetadataDto.fromJson(value); - case 'SystemConfigNewVersionCheckDto': - return SystemConfigNewVersionCheckDto.fromJson(value); - case 'SystemConfigNightlyTasksDto': - return SystemConfigNightlyTasksDto.fromJson(value); - case 'SystemConfigNotificationsDto': - return SystemConfigNotificationsDto.fromJson(value); - case 'SystemConfigOAuthDto': - return SystemConfigOAuthDto.fromJson(value); - case 'SystemConfigPasswordLoginDto': - return SystemConfigPasswordLoginDto.fromJson(value); - case 'SystemConfigReverseGeocodingDto': - return SystemConfigReverseGeocodingDto.fromJson(value); - case 'SystemConfigServerDto': - return SystemConfigServerDto.fromJson(value); - case 'SystemConfigSmtpDto': - return SystemConfigSmtpDto.fromJson(value); - case 'SystemConfigSmtpTransportDto': - return SystemConfigSmtpTransportDto.fromJson(value); - case 'SystemConfigStorageTemplateDto': - return SystemConfigStorageTemplateDto.fromJson(value); - case 'SystemConfigTemplateEmailsDto': - return SystemConfigTemplateEmailsDto.fromJson(value); - case 'SystemConfigTemplateStorageOptionDto': - return SystemConfigTemplateStorageOptionDto.fromJson(value); - case 'SystemConfigTemplatesDto': - return SystemConfigTemplatesDto.fromJson(value); - case 'SystemConfigThemeDto': - return SystemConfigThemeDto.fromJson(value); - case 'SystemConfigTrashDto': - return SystemConfigTrashDto.fromJson(value); - case 'SystemConfigUserDto': - return SystemConfigUserDto.fromJson(value); - case 'TagBulkAssetsDto': - return TagBulkAssetsDto.fromJson(value); - case 'TagBulkAssetsResponseDto': - return TagBulkAssetsResponseDto.fromJson(value); - case 'TagCreateDto': - return TagCreateDto.fromJson(value); - case 'TagResponseDto': - return TagResponseDto.fromJson(value); - case 'TagUpdateDto': - return TagUpdateDto.fromJson(value); - case 'TagUpsertDto': - return TagUpsertDto.fromJson(value); - case 'TagsResponse': - return TagsResponse.fromJson(value); - case 'TagsUpdate': - return TagsUpdate.fromJson(value); - case 'TemplateDto': - return TemplateDto.fromJson(value); - case 'TemplateResponseDto': - return TemplateResponseDto.fromJson(value); - case 'TestEmailResponseDto': - return TestEmailResponseDto.fromJson(value); - case 'TimeBucketAssetResponseDto': - return TimeBucketAssetResponseDto.fromJson(value); - case 'TimeBucketsResponseDto': - return TimeBucketsResponseDto.fromJson(value); - case 'ToneMapping': - return ToneMappingTypeTransformer().decode(value); - case 'TranscodeHWAccel': - return TranscodeHWAccelTypeTransformer().decode(value); - case 'TranscodePolicy': - return TranscodePolicyTypeTransformer().decode(value); - case 'TrashResponseDto': - return TrashResponseDto.fromJson(value); - case 'UpdateAlbumDto': - return UpdateAlbumDto.fromJson(value); - case 'UpdateAlbumUserDto': - return UpdateAlbumUserDto.fromJson(value); - case 'UpdateAssetDto': - return UpdateAssetDto.fromJson(value); - case 'UpdateLibraryDto': - return UpdateLibraryDto.fromJson(value); - case 'UsageByUserDto': - return UsageByUserDto.fromJson(value); - case 'UserAdminCreateDto': - return UserAdminCreateDto.fromJson(value); - case 'UserAdminDeleteDto': - return UserAdminDeleteDto.fromJson(value); - case 'UserAdminResponseDto': - return UserAdminResponseDto.fromJson(value); - case 'UserAdminUpdateDto': - return UserAdminUpdateDto.fromJson(value); - case 'UserAvatarColor': - return UserAvatarColorTypeTransformer().decode(value); - case 'UserLicense': - return UserLicense.fromJson(value); - case 'UserMetadataKey': - return UserMetadataKeyTypeTransformer().decode(value); - case 'UserPreferencesResponseDto': - return UserPreferencesResponseDto.fromJson(value); - case 'UserPreferencesUpdateDto': - return UserPreferencesUpdateDto.fromJson(value); - case 'UserResponseDto': - return UserResponseDto.fromJson(value); - case 'UserStatus': - return UserStatusTypeTransformer().decode(value); - case 'UserUpdateMeDto': - return UserUpdateMeDto.fromJson(value); - case 'ValidateAccessTokenResponseDto': - return ValidateAccessTokenResponseDto.fromJson(value); - case 'ValidateLibraryDto': - return ValidateLibraryDto.fromJson(value); - case 'ValidateLibraryImportPathResponseDto': - return ValidateLibraryImportPathResponseDto.fromJson(value); - case 'ValidateLibraryResponseDto': - return ValidateLibraryResponseDto.fromJson(value); - case 'VersionCheckStateResponseDto': - return VersionCheckStateResponseDto.fromJson(value); - case 'VideoCodec': - return VideoCodecTypeTransformer().decode(value); - case 'VideoContainer': - return VideoContainerTypeTransformer().decode(value); - case 'WorkflowCreateDto': - return WorkflowCreateDto.fromJson(value); - case 'WorkflowResponseDto': - return WorkflowResponseDto.fromJson(value); - case 'WorkflowShareResponseDto': - return WorkflowShareResponseDto.fromJson(value); - case 'WorkflowShareStepDto': - return WorkflowShareStepDto.fromJson(value); - case 'WorkflowStepDto': - return WorkflowStepDto.fromJson(value); - case 'WorkflowTrigger': - return WorkflowTriggerTypeTransformer().decode(value); - case 'WorkflowTriggerResponseDto': - return WorkflowTriggerResponseDto.fromJson(value); - case 'WorkflowType': - return WorkflowTypeTypeTransformer().decode(value); - case 'WorkflowUpdateDto': - return WorkflowUpdateDto.fromJson(value); - default: - dynamic match; - if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { - return value - .map((dynamic v) => fromJson(v, match, growable: growable,)) - .toList(growable: growable); - } - if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { - return value - .map((dynamic v) => fromJson(v, match, growable: growable,)) - .toSet(); - } - if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { - return Map.fromIterables( - value.keys.cast(), - value.values.map((dynamic v) => fromJson(v, match, growable: growable,)), - ); - } - } - } on Exception catch (error, trace) { - throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,); - } - throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',); - } -} - -/// Primarily intended for use in an isolate. -class DeserializationMessage { - const DeserializationMessage({ - required this.json, - required this.targetType, - this.growable = false, - }); - - /// The JSON value to deserialize. - final String json; - - /// Target type to deserialize to. - final String targetType; - - /// Whether to make deserialized lists or maps growable. - final bool growable; -} - -/// Primarily intended for use in an isolate. -Future decodeAsync(DeserializationMessage message) async { - // Remove all spaces. Necessary for regular expressions as well. - final targetType = message.targetType.replaceAll(' ', ''); - - // If the expected target type is String, nothing to do... - return targetType == 'String' - ? message.json - : json.decode(message.json); -} - -/// Primarily intended for use in an isolate. -Future deserializeAsync(DeserializationMessage message) async { - // Remove all spaces. Necessary for regular expressions as well. - final targetType = message.targetType.replaceAll(' ', ''); - - // If the expected target type is String, nothing to do... - return targetType == 'String' - ? message.json - : ApiClient.fromJson( - json.decode(message.json), - targetType, - growable: message.growable, - ); -} - -/// Primarily intended for use in an isolate. -Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); diff --git a/mobile/openapi/lib/api_exception.dart b/mobile/openapi/lib/api_exception.dart deleted file mode 100644 index 53077d686d..0000000000 --- a/mobile/openapi/lib/api_exception.dart +++ /dev/null @@ -1,33 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiException implements Exception { - ApiException(this.code, this.message); - - ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); - - int code = 0; - String? message; - Exception? innerException; - StackTrace? stackTrace; - - @override - String toString() { - if (message == null) { - return 'ApiException'; - } - if (innerException == null) { - return 'ApiException $code: $message'; - } - return 'ApiException $code: $message (Inner exception: $innerException)\n\n$stackTrace'; - } -} diff --git a/mobile/openapi/lib/api_helper.dart b/mobile/openapi/lib/api_helper.dart deleted file mode 100644 index c8efcb5466..0000000000 --- a/mobile/openapi/lib/api_helper.dart +++ /dev/null @@ -1,269 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueryParam { - const QueryParam(this.name, this.value); - - final String name; - final String value; - - @override - String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; -} - -// Ported from the Java version. -Iterable _queryParams(String collectionFormat, String name, dynamic value,) { - // Assertions to run in debug mode only. - assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); - - final params = []; - - if (value is List) { - if (collectionFormat == 'multi') { - return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); - } - - // Default collection format is 'csv'. - if (collectionFormat.isEmpty) { - collectionFormat = 'csv'; // ignore: parameter_assignments - } - - final delimiter = _delimiters[collectionFormat] ?? ','; - - params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); - } else if (value != null) { - params.add(QueryParam(name, parameterToString(value))); - } - - return params; -} - -/// Format the given parameter object into a [String]. -String parameterToString(dynamic value) { - if (value == null) { - return ''; - } - if (value is DateTime) { - return value.toUtc().toIso8601String(); - } - if (value is AlbumUserRole) { - return AlbumUserRoleTypeTransformer().encode(value).toString(); - } - if (value is AssetEditAction) { - return AssetEditActionTypeTransformer().encode(value).toString(); - } - if (value is AssetIdErrorReason) { - return AssetIdErrorReasonTypeTransformer().encode(value).toString(); - } - if (value is AssetJobName) { - return AssetJobNameTypeTransformer().encode(value).toString(); - } - if (value is AssetMediaSize) { - return AssetMediaSizeTypeTransformer().encode(value).toString(); - } - if (value is AssetMediaStatus) { - return AssetMediaStatusTypeTransformer().encode(value).toString(); - } - if (value is AssetOrder) { - return AssetOrderTypeTransformer().encode(value).toString(); - } - if (value is AssetOrderBy) { - return AssetOrderByTypeTransformer().encode(value).toString(); - } - if (value is AssetRejectReason) { - return AssetRejectReasonTypeTransformer().encode(value).toString(); - } - if (value is AssetTypeEnum) { - return AssetTypeEnumTypeTransformer().encode(value).toString(); - } - if (value is AssetUploadAction) { - return AssetUploadActionTypeTransformer().encode(value).toString(); - } - if (value is AssetVisibility) { - return AssetVisibilityTypeTransformer().encode(value).toString(); - } - if (value is AudioCodec) { - return AudioCodecTypeTransformer().encode(value).toString(); - } - if (value is BulkIdErrorReason) { - return BulkIdErrorReasonTypeTransformer().encode(value).toString(); - } - if (value is CQMode) { - return CQModeTypeTransformer().encode(value).toString(); - } - if (value is CalendarHeatmapType) { - return CalendarHeatmapTypeTypeTransformer().encode(value).toString(); - } - if (value is Colorspace) { - return ColorspaceTypeTransformer().encode(value).toString(); - } - if (value is HlsVideoResolution) { - return HlsVideoResolutionTypeTransformer().encode(value).toString(); - } - if (value is ImageFormat) { - return ImageFormatTypeTransformer().encode(value).toString(); - } - if (value is IntegrityReport) { - return IntegrityReportTypeTransformer().encode(value).toString(); - } - if (value is JobName) { - return JobNameTypeTransformer().encode(value).toString(); - } - if (value is LogLevel) { - return LogLevelTypeTransformer().encode(value).toString(); - } - if (value is MaintenanceAction) { - return MaintenanceActionTypeTransformer().encode(value).toString(); - } - if (value is ManualJobName) { - return ManualJobNameTypeTransformer().encode(value).toString(); - } - if (value is MemorySearchOrder) { - return MemorySearchOrderTypeTransformer().encode(value).toString(); - } - if (value is MemoryType) { - return MemoryTypeTypeTransformer().encode(value).toString(); - } - if (value is MirrorAxis) { - return MirrorAxisTypeTransformer().encode(value).toString(); - } - if (value is NotificationLevel) { - return NotificationLevelTypeTransformer().encode(value).toString(); - } - if (value is NotificationType) { - return NotificationTypeTypeTransformer().encode(value).toString(); - } - if (value is OAuthTokenEndpointAuthMethod) { - return OAuthTokenEndpointAuthMethodTypeTransformer().encode(value).toString(); - } - if (value is PartnerDirection) { - return PartnerDirectionTypeTransformer().encode(value).toString(); - } - if (value is Permission) { - return PermissionTypeTransformer().encode(value).toString(); - } - if (value is QueueCommand) { - return QueueCommandTypeTransformer().encode(value).toString(); - } - if (value is QueueJobStatus) { - return QueueJobStatusTypeTransformer().encode(value).toString(); - } - if (value is QueueName) { - return QueueNameTypeTransformer().encode(value).toString(); - } - if (value is ReactionLevel) { - return ReactionLevelTypeTransformer().encode(value).toString(); - } - if (value is ReactionType) { - return ReactionTypeTypeTransformer().encode(value).toString(); - } - if (value is ReleaseChannel) { - return ReleaseChannelTypeTransformer().encode(value).toString(); - } - if (value is ReleaseType) { - return ReleaseTypeTypeTransformer().encode(value).toString(); - } - if (value is SearchSuggestionType) { - return SearchSuggestionTypeTypeTransformer().encode(value).toString(); - } - if (value is SharedLinkType) { - return SharedLinkTypeTypeTransformer().encode(value).toString(); - } - if (value is SourceType) { - return SourceTypeTypeTransformer().encode(value).toString(); - } - if (value is StorageFolder) { - return StorageFolderTypeTransformer().encode(value).toString(); - } - if (value is SyncEntityType) { - return SyncEntityTypeTypeTransformer().encode(value).toString(); - } - if (value is SyncRequestType) { - return SyncRequestTypeTypeTransformer().encode(value).toString(); - } - if (value is ToneMapping) { - return ToneMappingTypeTransformer().encode(value).toString(); - } - if (value is TranscodeHWAccel) { - return TranscodeHWAccelTypeTransformer().encode(value).toString(); - } - if (value is TranscodePolicy) { - return TranscodePolicyTypeTransformer().encode(value).toString(); - } - if (value is UserAvatarColor) { - return UserAvatarColorTypeTransformer().encode(value).toString(); - } - if (value is UserMetadataKey) { - return UserMetadataKeyTypeTransformer().encode(value).toString(); - } - if (value is UserStatus) { - return UserStatusTypeTransformer().encode(value).toString(); - } - if (value is VideoCodec) { - return VideoCodecTypeTransformer().encode(value).toString(); - } - if (value is VideoContainer) { - return VideoContainerTypeTransformer().encode(value).toString(); - } - if (value is WorkflowTrigger) { - return WorkflowTriggerTypeTransformer().encode(value).toString(); - } - if (value is WorkflowType) { - return WorkflowTypeTypeTransformer().encode(value).toString(); - } - return value.toString(); -} - -/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json' -/// content type. Otherwise, returns the decoded body as decoded by dart:http package. -Future _decodeBodyBytes(Response response) async { - final contentType = response.headers['content-type']; - return contentType != null && contentType.toLowerCase().startsWith('application/json') - ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) - : response.body; -} - -/// Returns a valid [T] value found at the specified Map [key], null otherwise. -T? mapValueOfType(dynamic map, String key) { - final dynamic value = map is Map ? map[key] : null; - if (T == double && value is int) { - return value.toDouble() as T; - } - return value is T ? value : null; -} - -/// Returns a valid Map found at the specified Map [key], null otherwise. -Map? mapCastOfType(dynamic map, String key) { - final dynamic value = map is Map ? map[key] : null; - return value is Map ? value.cast() : null; -} - -/// Returns a valid [DateTime] found at the specified Map [key], null otherwise. -DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { - final dynamic value = map is Map ? map[key] : null; - if (value != null) { - int? millis; - if (value is int) { - millis = value; - } else if (value is String) { - if (_isEpochMarker(pattern)) { - millis = int.tryParse(value); - } else { - return DateTime.tryParse(value); - } - } - if (millis != null) { - return DateTime.fromMillisecondsSinceEpoch(millis, isUtc: true); - } - } - return null; -} diff --git a/mobile/openapi/lib/auth/api_key_auth.dart b/mobile/openapi/lib/auth/api_key_auth.dart deleted file mode 100644 index 6c5621798f..0000000000 --- a/mobile/openapi/lib/auth/api_key_auth.dart +++ /dev/null @@ -1,40 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyAuth implements Authentication { - ApiKeyAuth(this.location, this.paramName); - - final String location; - final String paramName; - - String apiKeyPrefix = ''; - String apiKey = ''; - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; - - if (paramValue.isNotEmpty) { - if (location == 'query') { - queryParams.add(QueryParam(paramName, paramValue)); - } else if (location == 'header') { - headerParams[paramName] = paramValue; - } else if (location == 'cookie') { - headerParams.update( - 'Cookie', - (existingCookie) => '$existingCookie; $paramName=$paramValue', - ifAbsent: () => '$paramName=$paramValue', - ); - } - } - } -} diff --git a/mobile/openapi/lib/auth/authentication.dart b/mobile/openapi/lib/auth/authentication.dart deleted file mode 100644 index 5377fb6f34..0000000000 --- a/mobile/openapi/lib/auth/authentication.dart +++ /dev/null @@ -1,17 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -// ignore: one_member_abstracts -abstract class Authentication { - /// Apply authentication settings to header and query params. - Future applyToParams(List queryParams, Map headerParams); -} diff --git a/mobile/openapi/lib/auth/http_basic_auth.dart b/mobile/openapi/lib/auth/http_basic_auth.dart deleted file mode 100644 index 5e8b1c4147..0000000000 --- a/mobile/openapi/lib/auth/http_basic_auth.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class HttpBasicAuth implements Authentication { - HttpBasicAuth({this.username = '', this.password = ''}); - - String username; - String password; - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - if (username.isNotEmpty && password.isNotEmpty) { - final credentials = '$username:$password'; - headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; - } - } -} diff --git a/mobile/openapi/lib/auth/http_bearer_auth.dart b/mobile/openapi/lib/auth/http_bearer_auth.dart deleted file mode 100644 index 847dc056e1..0000000000 --- a/mobile/openapi/lib/auth/http_bearer_auth.dart +++ /dev/null @@ -1,49 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -typedef HttpBearerAuthProvider = String Function(); - -class HttpBearerAuth implements Authentication { - HttpBearerAuth(); - - dynamic _accessToken; - - dynamic get accessToken => _accessToken; - - set accessToken(dynamic accessToken) { - if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { - throw ArgumentError('accessToken value must be either a String or a String Function().'); - } - _accessToken = accessToken; - } - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - if (_accessToken == null) { - return; - } - - String accessToken; - - if (_accessToken is String) { - accessToken = _accessToken; - } else if (_accessToken is HttpBearerAuthProvider) { - accessToken = _accessToken!(); - } else { - return; - } - - if (accessToken.isNotEmpty) { - headerParams['Authorization'] = 'Bearer $accessToken'; - } - } -} diff --git a/mobile/openapi/lib/auth/oauth.dart b/mobile/openapi/lib/auth/oauth.dart deleted file mode 100644 index 73fd8202dc..0000000000 --- a/mobile/openapi/lib/auth/oauth.dart +++ /dev/null @@ -1,24 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OAuth implements Authentication { - OAuth({this.accessToken = ''}); - - String accessToken; - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - if (accessToken.isNotEmpty) { - headerParams['Authorization'] = 'Bearer $accessToken'; - } - } -} diff --git a/mobile/openapi/lib/model/activity_create_dto.dart b/mobile/openapi/lib/model/activity_create_dto.dart deleted file mode 100644 index 7dbea342c9..0000000000 --- a/mobile/openapi/lib/model/activity_create_dto.dart +++ /dev/null @@ -1,142 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ActivityCreateDto { - /// Returns a new [ActivityCreateDto] instance. - ActivityCreateDto({ - required this.albumId, - this.assetId = const Optional.absent(), - this.comment = const Optional.absent(), - required this.type, - }); - - /// Album ID - String albumId; - - /// Asset ID (if activity is for an asset) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional assetId; - - /// Comment text (required if type is comment) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional comment; - - ReactionType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is ActivityCreateDto && - other.albumId == albumId && - other.assetId == assetId && - other.comment == comment && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (assetId == null ? 0 : assetId!.hashCode) + - (comment == null ? 0 : comment!.hashCode) + - (type.hashCode); - - @override - String toString() => 'ActivityCreateDto[albumId=$albumId, assetId=$assetId, comment=$comment, type=$type]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - if (this.assetId.isPresent) { - final value = this.assetId.value; - json[r'assetId'] = value; - } - if (this.comment.isPresent) { - final value = this.comment.value; - json[r'comment'] = value; - } - json[r'type'] = this.type; - return json; - } - - /// Returns a new [ActivityCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ActivityCreateDto? fromJson(dynamic value) { - upgradeDto(value, "ActivityCreateDto"); - if (value is Map) { - final json = value.cast(); - - return ActivityCreateDto( - albumId: mapValueOfType(json, r'albumId')!, - assetId: json.containsKey(r'assetId') ? Optional.present(mapValueOfType(json, r'assetId')) : const Optional.absent(), - comment: json.containsKey(r'comment') ? Optional.present(mapValueOfType(json, r'comment')) : const Optional.absent(), - type: ReactionType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ActivityCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ActivityCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ActivityCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ActivityCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/activity_response_dto.dart b/mobile/openapi/lib/model/activity_response_dto.dart deleted file mode 100644 index 15d22e56cd..0000000000 --- a/mobile/openapi/lib/model/activity_response_dto.dart +++ /dev/null @@ -1,151 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ActivityResponseDto { - /// Returns a new [ActivityResponseDto] instance. - ActivityResponseDto({ - required this.assetId, - this.comment = const Optional.absent(), - required this.createdAt, - required this.id, - required this.type, - required this.user, - }); - - /// Asset ID (if activity is for an asset) - String? assetId; - - /// Comment text (for comment activities) - Optional comment; - - /// Creation date - DateTime createdAt; - - /// Activity ID - String id; - - ReactionType type; - - UserResponseDto user; - - @override - bool operator ==(Object other) => identical(this, other) || other is ActivityResponseDto && - other.assetId == assetId && - other.comment == comment && - other.createdAt == createdAt && - other.id == id && - other.type == type && - other.user == user; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId == null ? 0 : assetId!.hashCode) + - (comment == null ? 0 : comment!.hashCode) + - (createdAt.hashCode) + - (id.hashCode) + - (type.hashCode) + - (user.hashCode); - - @override - String toString() => 'ActivityResponseDto[assetId=$assetId, comment=$comment, createdAt=$createdAt, id=$id, type=$type, user=$user]'; - - Map toJson() { - final json = {}; - if (this.assetId != null) { - json[r'assetId'] = this.assetId; - } else { - json[r'assetId'] = null; - } - if (this.comment.isPresent) { - final value = this.comment.value; - json[r'comment'] = value; - } - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'type'] = this.type; - json[r'user'] = this.user; - return json; - } - - /// Returns a new [ActivityResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ActivityResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ActivityResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ActivityResponseDto( - assetId: mapValueOfType(json, r'assetId'), - comment: json.containsKey(r'comment') ? Optional.present(mapValueOfType(json, r'comment')) : const Optional.absent(), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - type: ReactionType.fromJson(json[r'type'])!, - user: UserResponseDto.fromJson(json[r'user'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ActivityResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ActivityResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ActivityResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ActivityResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'createdAt', - 'id', - 'type', - 'user', - }; -} - diff --git a/mobile/openapi/lib/model/activity_statistics_response_dto.dart b/mobile/openapi/lib/model/activity_statistics_response_dto.dart deleted file mode 100644 index d9ac019ee2..0000000000 --- a/mobile/openapi/lib/model/activity_statistics_response_dto.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ActivityStatisticsResponseDto { - /// Returns a new [ActivityStatisticsResponseDto] instance. - ActivityStatisticsResponseDto({ - required this.comments, - required this.likes, - }); - - /// Number of comments - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int comments; - - /// Number of likes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int likes; - - @override - bool operator ==(Object other) => identical(this, other) || other is ActivityStatisticsResponseDto && - other.comments == comments && - other.likes == likes; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (comments.hashCode) + - (likes.hashCode); - - @override - String toString() => 'ActivityStatisticsResponseDto[comments=$comments, likes=$likes]'; - - Map toJson() { - final json = {}; - json[r'comments'] = this.comments; - json[r'likes'] = this.likes; - return json; - } - - /// Returns a new [ActivityStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ActivityStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ActivityStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ActivityStatisticsResponseDto( - comments: mapValueOfType(json, r'comments')!, - likes: mapValueOfType(json, r'likes')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ActivityStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ActivityStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ActivityStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ActivityStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'comments', - 'likes', - }; -} - diff --git a/mobile/openapi/lib/model/add_users_dto.dart b/mobile/openapi/lib/model/add_users_dto.dart deleted file mode 100644 index 1dad234811..0000000000 --- a/mobile/openapi/lib/model/add_users_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AddUsersDto { - /// Returns a new [AddUsersDto] instance. - AddUsersDto({ - this.albumUsers = const [], - }); - - /// Album users to add - List albumUsers; - - @override - bool operator ==(Object other) => identical(this, other) || other is AddUsersDto && - _deepEquality.equals(other.albumUsers, albumUsers); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumUsers.hashCode); - - @override - String toString() => 'AddUsersDto[albumUsers=$albumUsers]'; - - Map toJson() { - final json = {}; - json[r'albumUsers'] = this.albumUsers; - return json; - } - - /// Returns a new [AddUsersDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AddUsersDto? fromJson(dynamic value) { - upgradeDto(value, "AddUsersDto"); - if (value is Map) { - final json = value.cast(); - - return AddUsersDto( - albumUsers: AlbumUserAddDto.listFromJson(json[r'albumUsers']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AddUsersDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AddUsersDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AddUsersDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AddUsersDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumUsers', - }; -} - diff --git a/mobile/openapi/lib/model/admin_onboarding_update_dto.dart b/mobile/openapi/lib/model/admin_onboarding_update_dto.dart deleted file mode 100644 index 6daba2a796..0000000000 --- a/mobile/openapi/lib/model/admin_onboarding_update_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AdminOnboardingUpdateDto { - /// Returns a new [AdminOnboardingUpdateDto] instance. - AdminOnboardingUpdateDto({ - required this.isOnboarded, - }); - - /// Is admin onboarded - bool isOnboarded; - - @override - bool operator ==(Object other) => identical(this, other) || other is AdminOnboardingUpdateDto && - other.isOnboarded == isOnboarded; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isOnboarded.hashCode); - - @override - String toString() => 'AdminOnboardingUpdateDto[isOnboarded=$isOnboarded]'; - - Map toJson() { - final json = {}; - json[r'isOnboarded'] = this.isOnboarded; - return json; - } - - /// Returns a new [AdminOnboardingUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AdminOnboardingUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "AdminOnboardingUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return AdminOnboardingUpdateDto( - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AdminOnboardingUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AdminOnboardingUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AdminOnboardingUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AdminOnboardingUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isOnboarded', - }; -} - diff --git a/mobile/openapi/lib/model/album_response_dto.dart b/mobile/openapi/lib/model/album_response_dto.dart deleted file mode 100644 index a7e350fd53..0000000000 --- a/mobile/openapi/lib/model/album_response_dto.dart +++ /dev/null @@ -1,274 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumResponseDto { - /// Returns a new [AlbumResponseDto] instance. - AlbumResponseDto({ - required this.albumName, - required this.albumThumbnailAssetId, - this.albumUsers = const [], - required this.assetCount, - this.contributorCounts = const Optional.present(const []), - required this.createdAt, - required this.description, - this.endDate = const Optional.absent(), - required this.hasSharedLink, - required this.id, - required this.isActivityEnabled, - this.lastModifiedAssetTimestamp = const Optional.absent(), - this.order = const Optional.absent(), - required this.shared, - this.startDate = const Optional.absent(), - required this.updatedAt, - }); - - /// Album name - String albumName; - - /// Thumbnail asset ID - String? albumThumbnailAssetId; - - /// First entry is always the album owner. Second entry is the auth user, if it differs from the owner. The rest are ordered alphabetically. - List albumUsers; - - /// Number of assets - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int assetCount; - - Optional?> contributorCounts; - - /// Creation date - DateTime createdAt; - - /// Album description - String description; - - /// End date (latest asset) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional endDate; - - /// Has shared link - bool hasSharedLink; - - /// Album ID - String id; - - /// Activity feed enabled - bool isActivityEnabled; - - /// Last modified asset timestamp - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional lastModifiedAssetTimestamp; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional order; - - /// Is shared album - bool shared; - - /// Start date (earliest asset) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional startDate; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumResponseDto && - other.albumName == albumName && - other.albumThumbnailAssetId == albumThumbnailAssetId && - _deepEquality.equals(other.albumUsers, albumUsers) && - other.assetCount == assetCount && - _deepEquality.equals(other.contributorCounts, contributorCounts) && - other.createdAt == createdAt && - other.description == description && - other.endDate == endDate && - other.hasSharedLink == hasSharedLink && - other.id == id && - other.isActivityEnabled == isActivityEnabled && - other.lastModifiedAssetTimestamp == lastModifiedAssetTimestamp && - other.order == order && - other.shared == shared && - other.startDate == startDate && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName.hashCode) + - (albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) + - (albumUsers.hashCode) + - (assetCount.hashCode) + - (contributorCounts.hashCode) + - (createdAt.hashCode) + - (description.hashCode) + - (endDate == null ? 0 : endDate!.hashCode) + - (hasSharedLink.hashCode) + - (id.hashCode) + - (isActivityEnabled.hashCode) + - (lastModifiedAssetTimestamp == null ? 0 : lastModifiedAssetTimestamp!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (shared.hashCode) + - (startDate == null ? 0 : startDate!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, albumUsers=$albumUsers, assetCount=$assetCount, contributorCounts=$contributorCounts, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, shared=$shared, startDate=$startDate, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'albumName'] = this.albumName; - if (this.albumThumbnailAssetId != null) { - json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId; - } else { - json[r'albumThumbnailAssetId'] = null; - } - json[r'albumUsers'] = this.albumUsers; - json[r'assetCount'] = this.assetCount; - if (this.contributorCounts.isPresent) { - final value = this.contributorCounts.value; - json[r'contributorCounts'] = value; - } - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - json[r'description'] = this.description; - if (this.endDate.isPresent) { - final value = this.endDate.value; - json[r'endDate'] = value == null ? null : value.toUtc().toIso8601String(); - } - json[r'hasSharedLink'] = this.hasSharedLink; - json[r'id'] = this.id; - json[r'isActivityEnabled'] = this.isActivityEnabled; - if (this.lastModifiedAssetTimestamp.isPresent) { - final value = this.lastModifiedAssetTimestamp.value; - json[r'lastModifiedAssetTimestamp'] = value == null ? null : value.toUtc().toIso8601String(); - } - if (this.order.isPresent) { - final value = this.order.value; - json[r'order'] = value; - } - json[r'shared'] = this.shared; - if (this.startDate.isPresent) { - final value = this.startDate.value; - json[r'startDate'] = value == null ? null : value.toUtc().toIso8601String(); - } - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [AlbumResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumResponseDto( - albumName: mapValueOfType(json, r'albumName')!, - albumThumbnailAssetId: mapValueOfType(json, r'albumThumbnailAssetId'), - albumUsers: AlbumUserResponseDto.listFromJson(json[r'albumUsers']), - assetCount: mapValueOfType(json, r'assetCount')!, - contributorCounts: json.containsKey(r'contributorCounts') ? Optional.present(ContributorCountResponseDto.listFromJson(json[r'contributorCounts'])) : const Optional.absent(), - createdAt: mapDateTime(json, r'createdAt', r'')!, - description: mapValueOfType(json, r'description')!, - endDate: json.containsKey(r'endDate') ? Optional.present(mapDateTime(json, r'endDate', r'')) : const Optional.absent(), - hasSharedLink: mapValueOfType(json, r'hasSharedLink')!, - id: mapValueOfType(json, r'id')!, - isActivityEnabled: mapValueOfType(json, r'isActivityEnabled')!, - lastModifiedAssetTimestamp: json.containsKey(r'lastModifiedAssetTimestamp') ? Optional.present(mapDateTime(json, r'lastModifiedAssetTimestamp', r'')) : const Optional.absent(), - order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), - shared: mapValueOfType(json, r'shared')!, - startDate: json.containsKey(r'startDate') ? Optional.present(mapDateTime(json, r'startDate', r'')) : const Optional.absent(), - updatedAt: mapDateTime(json, r'updatedAt', r'')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumName', - 'albumThumbnailAssetId', - 'albumUsers', - 'assetCount', - 'createdAt', - 'description', - 'hasSharedLink', - 'id', - 'isActivityEnabled', - 'shared', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/album_statistics_response_dto.dart b/mobile/openapi/lib/model/album_statistics_response_dto.dart deleted file mode 100644 index 0f440d572d..0000000000 --- a/mobile/openapi/lib/model/album_statistics_response_dto.dart +++ /dev/null @@ -1,127 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumStatisticsResponseDto { - /// Returns a new [AlbumStatisticsResponseDto] instance. - AlbumStatisticsResponseDto({ - required this.notShared, - required this.owned, - required this.shared, - }); - - /// Number of non-shared albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int notShared; - - /// Number of owned albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int owned; - - /// Number of shared albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int shared; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumStatisticsResponseDto && - other.notShared == notShared && - other.owned == owned && - other.shared == shared; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (notShared.hashCode) + - (owned.hashCode) + - (shared.hashCode); - - @override - String toString() => 'AlbumStatisticsResponseDto[notShared=$notShared, owned=$owned, shared=$shared]'; - - Map toJson() { - final json = {}; - json[r'notShared'] = this.notShared; - json[r'owned'] = this.owned; - json[r'shared'] = this.shared; - return json; - } - - /// Returns a new [AlbumStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumStatisticsResponseDto( - notShared: mapValueOfType(json, r'notShared')!, - owned: mapValueOfType(json, r'owned')!, - shared: mapValueOfType(json, r'shared')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'notShared', - 'owned', - 'shared', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_add_dto.dart b/mobile/openapi/lib/model/album_user_add_dto.dart deleted file mode 100644 index e47ffc421c..0000000000 --- a/mobile/openapi/lib/model/album_user_add_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumUserAddDto { - /// Returns a new [AlbumUserAddDto] instance. - AlbumUserAddDto({ - this.role = const Optional.absent(), - required this.userId, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional role; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumUserAddDto && - other.role == role && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role == null ? 0 : role!.hashCode) + - (userId.hashCode); - - @override - String toString() => 'AlbumUserAddDto[role=$role, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.role.isPresent) { - final value = this.role.value; - json[r'role'] = value; - } - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [AlbumUserAddDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumUserAddDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumUserAddDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumUserAddDto( - role: json.containsKey(r'role') ? Optional.present(AlbumUserRole.fromJson(json[r'role'])) : const Optional.absent(), - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserAddDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumUserAddDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumUserAddDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumUserAddDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_create_dto.dart b/mobile/openapi/lib/model/album_user_create_dto.dart deleted file mode 100644 index 26aa35ae78..0000000000 --- a/mobile/openapi/lib/model/album_user_create_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumUserCreateDto { - /// Returns a new [AlbumUserCreateDto] instance. - AlbumUserCreateDto({ - required this.role, - required this.userId, - }); - - AlbumUserRole role; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumUserCreateDto && - other.role == role && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role.hashCode) + - (userId.hashCode); - - @override - String toString() => 'AlbumUserCreateDto[role=$role, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'role'] = this.role; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [AlbumUserCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumUserCreateDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumUserCreateDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumUserCreateDto( - role: AlbumUserRole.fromJson(json[r'role'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumUserCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumUserCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumUserCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'role', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_response_dto.dart b/mobile/openapi/lib/model/album_user_response_dto.dart deleted file mode 100644 index bbae03fba7..0000000000 --- a/mobile/openapi/lib/model/album_user_response_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumUserResponseDto { - /// Returns a new [AlbumUserResponseDto] instance. - AlbumUserResponseDto({ - required this.role, - required this.user, - }); - - AlbumUserRole role; - - UserResponseDto user; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumUserResponseDto && - other.role == role && - other.user == user; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role.hashCode) + - (user.hashCode); - - @override - String toString() => 'AlbumUserResponseDto[role=$role, user=$user]'; - - Map toJson() { - final json = {}; - json[r'role'] = this.role; - json[r'user'] = this.user; - return json; - } - - /// Returns a new [AlbumUserResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumUserResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumUserResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumUserResponseDto( - role: AlbumUserRole.fromJson(json[r'role'])!, - user: UserResponseDto.fromJson(json[r'user'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumUserResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumUserResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumUserResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'role', - 'user', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_role.dart b/mobile/openapi/lib/model/album_user_role.dart deleted file mode 100644 index b296cd950d..0000000000 --- a/mobile/openapi/lib/model/album_user_role.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Album user role -enum AlbumUserRole { - editor._(r'editor'), - owner._(r'owner'), - viewer._(r'viewer'), - ; - - /// Instantiate a new enum with the provided value. - const AlbumUserRole._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AlbumUserRole] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AlbumUserRole? fromJson(dynamic value) => AlbumUserRoleTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AlbumUserRole] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserRole.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AlbumUserRole] to String, -/// and [decode] dynamic data back to [AlbumUserRole]. -class AlbumUserRoleTypeTransformer { - factory AlbumUserRoleTypeTransformer() => _instance ??= const AlbumUserRoleTypeTransformer._(); - - const AlbumUserRoleTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AlbumUserRole data) => data._value; - - /// Returns the instance of [AlbumUserRole] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AlbumUserRole? decode(dynamic data, {bool allowNull = true}) { - if (data is AlbumUserRole) { - return data; - } - if (data != null) { - switch (data) { - case r'editor': return AlbumUserRole.editor; - case r'owner': return AlbumUserRole.owner; - case r'viewer': return AlbumUserRole.viewer; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AlbumUserRoleTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/albums_add_assets_dto.dart b/mobile/openapi/lib/model/albums_add_assets_dto.dart deleted file mode 100644 index d6aa3db1c1..0000000000 --- a/mobile/openapi/lib/model/albums_add_assets_dto.dart +++ /dev/null @@ -1,113 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumsAddAssetsDto { - /// Returns a new [AlbumsAddAssetsDto] instance. - AlbumsAddAssetsDto({ - this.albumIds = const [], - this.assetIds = const [], - }); - - /// Album IDs - List albumIds; - - /// Asset IDs - List assetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsAddAssetsDto && - _deepEquality.equals(other.albumIds, albumIds) && - _deepEquality.equals(other.assetIds, assetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (assetIds.hashCode); - - @override - String toString() => 'AlbumsAddAssetsDto[albumIds=$albumIds, assetIds=$assetIds]'; - - Map toJson() { - final json = {}; - json[r'albumIds'] = this.albumIds; - json[r'assetIds'] = this.assetIds; - return json; - } - - /// Returns a new [AlbumsAddAssetsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsAddAssetsDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumsAddAssetsDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumsAddAssetsDto( - albumIds: json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const [], - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsAddAssetsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsAddAssetsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsAddAssetsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsAddAssetsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumIds', - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/albums_add_assets_response_dto.dart b/mobile/openapi/lib/model/albums_add_assets_response_dto.dart deleted file mode 100644 index 943bd30bc5..0000000000 --- a/mobile/openapi/lib/model/albums_add_assets_response_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumsAddAssetsResponseDto { - /// Returns a new [AlbumsAddAssetsResponseDto] instance. - AlbumsAddAssetsResponseDto({ - this.error = const Optional.absent(), - required this.success, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional error; - - /// Operation success - bool success; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsAddAssetsResponseDto && - other.error == error && - other.success == success; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (error == null ? 0 : error!.hashCode) + - (success.hashCode); - - @override - String toString() => 'AlbumsAddAssetsResponseDto[error=$error, success=$success]'; - - Map toJson() { - final json = {}; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - json[r'success'] = this.success; - return json; - } - - /// Returns a new [AlbumsAddAssetsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsAddAssetsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumsAddAssetsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumsAddAssetsResponseDto( - error: json.containsKey(r'error') ? Optional.present(BulkIdErrorReason.fromJson(json[r'error'])) : const Optional.absent(), - success: mapValueOfType(json, r'success')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsAddAssetsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsAddAssetsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsAddAssetsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsAddAssetsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'success', - }; -} - diff --git a/mobile/openapi/lib/model/albums_response.dart b/mobile/openapi/lib/model/albums_response.dart deleted file mode 100644 index def205de90..0000000000 --- a/mobile/openapi/lib/model/albums_response.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumsResponse { - /// Returns a new [AlbumsResponse] instance. - AlbumsResponse({ - required this.defaultAssetOrder, - }); - - AssetOrder defaultAssetOrder; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsResponse && - other.defaultAssetOrder == defaultAssetOrder; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (defaultAssetOrder.hashCode); - - @override - String toString() => 'AlbumsResponse[defaultAssetOrder=$defaultAssetOrder]'; - - Map toJson() { - final json = {}; - json[r'defaultAssetOrder'] = this.defaultAssetOrder; - return json; - } - - /// Returns a new [AlbumsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsResponse? fromJson(dynamic value) { - upgradeDto(value, "AlbumsResponse"); - if (value is Map) { - final json = value.cast(); - - return AlbumsResponse( - defaultAssetOrder: AssetOrder.fromJson(json[r'defaultAssetOrder'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'defaultAssetOrder', - }; -} - diff --git a/mobile/openapi/lib/model/albums_update.dart b/mobile/openapi/lib/model/albums_update.dart deleted file mode 100644 index 46bb3ef66d..0000000000 --- a/mobile/openapi/lib/model/albums_update.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumsUpdate { - /// Returns a new [AlbumsUpdate] instance. - AlbumsUpdate({ - this.defaultAssetOrder = const Optional.absent(), - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional defaultAssetOrder; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsUpdate && - other.defaultAssetOrder == defaultAssetOrder; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (defaultAssetOrder == null ? 0 : defaultAssetOrder!.hashCode); - - @override - String toString() => 'AlbumsUpdate[defaultAssetOrder=$defaultAssetOrder]'; - - Map toJson() { - final json = {}; - if (this.defaultAssetOrder.isPresent) { - final value = this.defaultAssetOrder.value; - json[r'defaultAssetOrder'] = value; - } - return json; - } - - /// Returns a new [AlbumsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsUpdate? fromJson(dynamic value) { - upgradeDto(value, "AlbumsUpdate"); - if (value is Map) { - final json = value.cast(); - - return AlbumsUpdate( - defaultAssetOrder: json.containsKey(r'defaultAssetOrder') ? Optional.present(AssetOrder.fromJson(json[r'defaultAssetOrder'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/api_key_create_dto.dart b/mobile/openapi/lib/model/api_key_create_dto.dart deleted file mode 100644 index e1a50fecd5..0000000000 --- a/mobile/openapi/lib/model/api_key_create_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyCreateDto { - /// Returns a new [ApiKeyCreateDto] instance. - ApiKeyCreateDto({ - this.name = const Optional.absent(), - this.permissions = const [], - }); - - /// API key name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// List of permissions - List permissions; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyCreateDto && - other.name == name && - _deepEquality.equals(other.permissions, permissions); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (name == null ? 0 : name!.hashCode) + - (permissions.hashCode); - - @override - String toString() => 'ApiKeyCreateDto[name=$name, permissions=$permissions]'; - - Map toJson() { - final json = {}; - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - json[r'permissions'] = this.permissions; - return json; - } - - /// Returns a new [ApiKeyCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyCreateDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyCreateDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyCreateDto( - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - permissions: Permission.listFromJson(json[r'permissions']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'permissions', - }; -} - diff --git a/mobile/openapi/lib/model/api_key_create_response_dto.dart b/mobile/openapi/lib/model/api_key_create_response_dto.dart deleted file mode 100644 index 77b19ebfd2..0000000000 --- a/mobile/openapi/lib/model/api_key_create_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyCreateResponseDto { - /// Returns a new [ApiKeyCreateResponseDto] instance. - ApiKeyCreateResponseDto({ - required this.apiKey, - required this.secret, - }); - - ApiKeyResponseDto apiKey; - - /// API key secret (only shown once) - String secret; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyCreateResponseDto && - other.apiKey == apiKey && - other.secret == secret; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (apiKey.hashCode) + - (secret.hashCode); - - @override - String toString() => 'ApiKeyCreateResponseDto[apiKey=$apiKey, secret=$secret]'; - - Map toJson() { - final json = {}; - json[r'apiKey'] = this.apiKey; - json[r'secret'] = this.secret; - return json; - } - - /// Returns a new [ApiKeyCreateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyCreateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyCreateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyCreateResponseDto( - apiKey: ApiKeyResponseDto.fromJson(json[r'apiKey'])!, - secret: mapValueOfType(json, r'secret')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyCreateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyCreateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyCreateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyCreateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'apiKey', - 'secret', - }; -} - diff --git a/mobile/openapi/lib/model/api_key_response_dto.dart b/mobile/openapi/lib/model/api_key_response_dto.dart deleted file mode 100644 index 4005ca9f12..0000000000 --- a/mobile/openapi/lib/model/api_key_response_dto.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyResponseDto { - /// Returns a new [ApiKeyResponseDto] instance. - ApiKeyResponseDto({ - required this.createdAt, - required this.id, - required this.name, - this.permissions = const [], - required this.updatedAt, - }); - - /// Creation date - DateTime createdAt; - - /// API key ID - String id; - - /// API key name - String name; - - /// List of permissions - List permissions; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyResponseDto && - other.createdAt == createdAt && - other.id == id && - other.name == name && - _deepEquality.equals(other.permissions, permissions) && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (id.hashCode) + - (name.hashCode) + - (permissions.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'ApiKeyResponseDto[createdAt=$createdAt, id=$id, name=$name, permissions=$permissions, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'name'] = this.name; - json[r'permissions'] = this.permissions; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [ApiKeyResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyResponseDto( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - permissions: Permission.listFromJson(json[r'permissions']), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'name', - 'permissions', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/api_key_update_dto.dart b/mobile/openapi/lib/model/api_key_update_dto.dart deleted file mode 100644 index c6b0b5ed3c..0000000000 --- a/mobile/openapi/lib/model/api_key_update_dto.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyUpdateDto { - /// Returns a new [ApiKeyUpdateDto] instance. - ApiKeyUpdateDto({ - this.name = const Optional.absent(), - this.permissions = const Optional.present(const []), - }); - - /// API key name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// List of permissions - Optional?> permissions; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyUpdateDto && - other.name == name && - _deepEquality.equals(other.permissions, permissions); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (name == null ? 0 : name!.hashCode) + - (permissions.hashCode); - - @override - String toString() => 'ApiKeyUpdateDto[name=$name, permissions=$permissions]'; - - Map toJson() { - final json = {}; - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.permissions.isPresent) { - final value = this.permissions.value; - json[r'permissions'] = value; - } - return json; - } - - /// Returns a new [ApiKeyUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyUpdateDto( - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - permissions: json.containsKey(r'permissions') ? Optional.present(Permission.listFromJson(json[r'permissions'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_delete_dto.dart b/mobile/openapi/lib/model/asset_bulk_delete_dto.dart deleted file mode 100644 index bfe51e1779..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_delete_dto.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkDeleteDto { - /// Returns a new [AssetBulkDeleteDto] instance. - AssetBulkDeleteDto({ - this.force = const Optional.absent(), - this.ids = const [], - }); - - /// Force delete even if in use - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional force; - - /// IDs to process - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkDeleteDto && - other.force == force && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (force == null ? 0 : force!.hashCode) + - (ids.hashCode); - - @override - String toString() => 'AssetBulkDeleteDto[force=$force, ids=$ids]'; - - Map toJson() { - final json = {}; - if (this.force.isPresent) { - final value = this.force.value; - json[r'force'] = value; - } - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [AssetBulkDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkDeleteDto( - force: json.containsKey(r'force') ? Optional.present(mapValueOfType(json, r'force')) : const Optional.absent(), - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_update_dto.dart b/mobile/openapi/lib/model/asset_bulk_update_dto.dart deleted file mode 100644 index fe34c3a14c..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_update_dto.dart +++ /dev/null @@ -1,271 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUpdateDto { - /// Returns a new [AssetBulkUpdateDto] instance. - AssetBulkUpdateDto({ - this.dateTimeOriginal = const Optional.absent(), - this.dateTimeRelative = const Optional.absent(), - this.description = const Optional.absent(), - this.duplicateId = const Optional.absent(), - this.ids = const [], - this.isFavorite = const Optional.absent(), - this.latitude = const Optional.absent(), - this.longitude = const Optional.absent(), - this.rating = const Optional.absent(), - this.timeZone = const Optional.absent(), - this.visibility = const Optional.absent(), - }); - - /// Original date and time - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional dateTimeOriginal; - - /// Relative time offset in minutes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional dateTimeRelative; - - /// Asset description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Duplicate ID - Optional duplicateId; - - /// Asset IDs to update - List ids; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Latitude coordinate - /// - /// Minimum value: -90 - /// Maximum value: 90 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional latitude; - - /// Longitude coordinate - /// - /// Minimum value: -180 - /// Maximum value: 180 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional longitude; - - /// Rating in range [1-5] (starred), -1 (rejected), or null (unrated) - /// - /// Minimum value: -1 - /// Maximum value: 5 - Optional rating; - - /// Time zone (IANA timezone) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional timeZone; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUpdateDto && - other.dateTimeOriginal == dateTimeOriginal && - other.dateTimeRelative == dateTimeRelative && - other.description == description && - other.duplicateId == duplicateId && - _deepEquality.equals(other.ids, ids) && - other.isFavorite == isFavorite && - other.latitude == latitude && - other.longitude == longitude && - other.rating == rating && - other.timeZone == timeZone && - other.visibility == visibility; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (dateTimeRelative == null ? 0 : dateTimeRelative!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (duplicateId == null ? 0 : duplicateId!.hashCode) + - (ids.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode); - - @override - String toString() => 'AssetBulkUpdateDto[dateTimeOriginal=$dateTimeOriginal, dateTimeRelative=$dateTimeRelative, description=$description, duplicateId=$duplicateId, ids=$ids, isFavorite=$isFavorite, latitude=$latitude, longitude=$longitude, rating=$rating, timeZone=$timeZone, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.dateTimeOriginal.isPresent) { - final value = this.dateTimeOriginal.value; - json[r'dateTimeOriginal'] = value; - } - if (this.dateTimeRelative.isPresent) { - final value = this.dateTimeRelative.value; - json[r'dateTimeRelative'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.duplicateId.isPresent) { - final value = this.duplicateId.value; - json[r'duplicateId'] = value; - } - json[r'ids'] = this.ids; - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.timeZone.isPresent) { - final value = this.timeZone.value; - json[r'timeZone'] = value; - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - return json; - } - - /// Returns a new [AssetBulkUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUpdateDto( - dateTimeOriginal: json.containsKey(r'dateTimeOriginal') ? Optional.present(mapValueOfType(json, r'dateTimeOriginal')) : const Optional.absent(), - dateTimeRelative: json.containsKey(r'dateTimeRelative') ? Optional.present(json[r'dateTimeRelative'] == null ? null : int.parse('${json[r'dateTimeRelative']}')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - duplicateId: json.containsKey(r'duplicateId') ? Optional.present(mapValueOfType(json, r'duplicateId')) : const Optional.absent(), - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] == null ? null : num.parse('${json[r'latitude']}')) : const Optional.absent(), - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] == null ? null : num.parse('${json[r'longitude']}')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - timeZone: json.containsKey(r'timeZone') ? Optional.present(mapValueOfType(json, r'timeZone')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart deleted file mode 100644 index 66f46795e8..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUploadCheckDto { - /// Returns a new [AssetBulkUploadCheckDto] instance. - AssetBulkUploadCheckDto({ - this.assets = const [], - }); - - /// Assets to check - List assets; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckDto && - _deepEquality.equals(other.assets, assets); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckDto[assets=$assets]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - return json; - } - - /// Returns a new [AssetBulkUploadCheckDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckDto( - assets: AssetBulkUploadCheckItem.listFromJson(json[r'assets']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart deleted file mode 100644 index a3d928b0d8..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUploadCheckItem { - /// Returns a new [AssetBulkUploadCheckItem] instance. - AssetBulkUploadCheckItem({ - required this.checksum, - required this.id, - }); - - /// Base64 or hex encoded SHA1 hash - String checksum; - - /// Client-side identifier echoed in the response to match results to inputs (e.g. filename) - String id; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckItem && - other.checksum == checksum && - other.id == id; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (id.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckItem[checksum=$checksum, id=$id]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - json[r'id'] = this.id; - return json; - } - - /// Returns a new [AssetBulkUploadCheckItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckItem? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckItem"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckItem( - checksum: mapValueOfType(json, r'checksum')!, - id: mapValueOfType(json, r'id')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart deleted file mode 100644 index b37bb0de8a..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUploadCheckResponseDto { - /// Returns a new [AssetBulkUploadCheckResponseDto] instance. - AssetBulkUploadCheckResponseDto({ - this.results = const [], - }); - - /// Upload check results - List results; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckResponseDto && - _deepEquality.equals(other.results, results); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (results.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckResponseDto[results=$results]'; - - Map toJson() { - final json = {}; - json[r'results'] = this.results; - return json; - } - - /// Returns a new [AssetBulkUploadCheckResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckResponseDto( - results: AssetBulkUploadCheckResult.listFromJson(json[r'results']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'results', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart deleted file mode 100644 index 572c99c11e..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart +++ /dev/null @@ -1,158 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUploadCheckResult { - /// Returns a new [AssetBulkUploadCheckResult] instance. - AssetBulkUploadCheckResult({ - required this.action, - this.assetId = const Optional.absent(), - required this.id, - this.isTrashed = const Optional.absent(), - this.reason = const Optional.absent(), - }); - - AssetUploadAction action; - - /// Existing asset ID if duplicate - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional assetId; - - /// Client-side identifier echoed from the request to match results to inputs - String id; - - /// Whether existing asset is trashed - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isTrashed; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional reason; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckResult && - other.action == action && - other.assetId == assetId && - other.id == id && - other.isTrashed == isTrashed && - other.reason == reason; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (assetId == null ? 0 : assetId!.hashCode) + - (id.hashCode) + - (isTrashed == null ? 0 : isTrashed!.hashCode) + - (reason == null ? 0 : reason!.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckResult[action=$action, assetId=$assetId, id=$id, isTrashed=$isTrashed, reason=$reason]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - if (this.assetId.isPresent) { - final value = this.assetId.value; - json[r'assetId'] = value; - } - json[r'id'] = this.id; - if (this.isTrashed.isPresent) { - final value = this.isTrashed.value; - json[r'isTrashed'] = value; - } - if (this.reason.isPresent) { - final value = this.reason.value; - json[r'reason'] = value; - } - return json; - } - - /// Returns a new [AssetBulkUploadCheckResult] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckResult? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckResult"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckResult( - action: AssetUploadAction.fromJson(json[r'action'])!, - assetId: json.containsKey(r'assetId') ? Optional.present(mapValueOfType(json, r'assetId')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isTrashed: json.containsKey(r'isTrashed') ? Optional.present(mapValueOfType(json, r'isTrashed')) : const Optional.absent(), - reason: json.containsKey(r'reason') ? Optional.present(AssetRejectReason.fromJson(json[r'reason'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckResult.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckResult.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckResult-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckResult.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/asset_copy_dto.dart b/mobile/openapi/lib/model/asset_copy_dto.dart deleted file mode 100644 index 577ba9ffa6..0000000000 --- a/mobile/openapi/lib/model/asset_copy_dto.dart +++ /dev/null @@ -1,164 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetCopyDto { - /// Returns a new [AssetCopyDto] instance. - AssetCopyDto({ - this.albums = const Optional.present(true), - this.favorite = const Optional.present(true), - this.sharedLinks = const Optional.present(true), - this.sidecar = const Optional.present(true), - required this.sourceId, - this.stack = const Optional.present(true), - required this.targetId, - }); - - /// Copy album associations - Optional albums; - - /// Copy favorite status - Optional favorite; - - /// Copy shared links - Optional sharedLinks; - - /// Copy sidecar file - Optional sidecar; - - /// Source asset ID - String sourceId; - - /// Copy stack association - Optional stack; - - /// Target asset ID - String targetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetCopyDto && - other.albums == albums && - other.favorite == favorite && - other.sharedLinks == sharedLinks && - other.sidecar == sidecar && - other.sourceId == sourceId && - other.stack == stack && - other.targetId == targetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (favorite.hashCode) + - (sharedLinks.hashCode) + - (sidecar.hashCode) + - (sourceId.hashCode) + - (stack.hashCode) + - (targetId.hashCode); - - @override - String toString() => 'AssetCopyDto[albums=$albums, favorite=$favorite, sharedLinks=$sharedLinks, sidecar=$sidecar, sourceId=$sourceId, stack=$stack, targetId=$targetId]'; - - Map toJson() { - final json = {}; - if (this.albums.isPresent) { - final value = this.albums.value; - json[r'albums'] = value; - } - if (this.favorite.isPresent) { - final value = this.favorite.value; - json[r'favorite'] = value; - } - if (this.sharedLinks.isPresent) { - final value = this.sharedLinks.value; - json[r'sharedLinks'] = value; - } - if (this.sidecar.isPresent) { - final value = this.sidecar.value; - json[r'sidecar'] = value; - } - json[r'sourceId'] = this.sourceId; - if (this.stack.isPresent) { - final value = this.stack.value; - json[r'stack'] = value; - } - json[r'targetId'] = this.targetId; - return json; - } - - /// Returns a new [AssetCopyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetCopyDto? fromJson(dynamic value) { - upgradeDto(value, "AssetCopyDto"); - if (value is Map) { - final json = value.cast(); - - return AssetCopyDto( - albums: json.containsKey(r'albums') ? Optional.present(mapValueOfType(json, r'albums')) : const Optional.absent(), - favorite: json.containsKey(r'favorite') ? Optional.present(mapValueOfType(json, r'favorite')) : const Optional.absent(), - sharedLinks: json.containsKey(r'sharedLinks') ? Optional.present(mapValueOfType(json, r'sharedLinks')) : const Optional.absent(), - sidecar: json.containsKey(r'sidecar') ? Optional.present(mapValueOfType(json, r'sidecar')) : const Optional.absent(), - sourceId: mapValueOfType(json, r'sourceId')!, - stack: json.containsKey(r'stack') ? Optional.present(mapValueOfType(json, r'stack')) : const Optional.absent(), - targetId: mapValueOfType(json, r'targetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetCopyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetCopyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetCopyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetCopyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sourceId', - 'targetId', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action.dart b/mobile/openapi/lib/model/asset_edit_action.dart deleted file mode 100644 index ffe33e5457..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Type of edit action to perform -enum AssetEditAction { - crop._(r'crop'), - rotate._(r'rotate'), - mirror._(r'mirror'), - ; - - /// Instantiate a new enum with the provided value. - const AssetEditAction._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetEditAction] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetEditAction? fromJson(dynamic value) => AssetEditActionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetEditAction] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditAction.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetEditAction] to String, -/// and [decode] dynamic data back to [AssetEditAction]. -class AssetEditActionTypeTransformer { - factory AssetEditActionTypeTransformer() => _instance ??= const AssetEditActionTypeTransformer._(); - - const AssetEditActionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetEditAction data) => data._value; - - /// Returns the instance of [AssetEditAction] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetEditAction? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetEditAction) { - return data; - } - if (data != null) { - switch (data) { - case r'crop': return AssetEditAction.crop; - case r'rotate': return AssetEditAction.rotate; - case r'mirror': return AssetEditAction.mirror; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetEditActionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action_item_dto.dart b/mobile/openapi/lib/model/asset_edit_action_item_dto.dart deleted file mode 100644 index 1b19612bf3..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action_item_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditActionItemDto { - /// Returns a new [AssetEditActionItemDto] instance. - AssetEditActionItemDto({ - required this.action, - required this.parameters, - }); - - AssetEditAction action; - - Map parameters; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDto && - other.action == action && - other.parameters == parameters; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (parameters.hashCode); - - @override - String toString() => 'AssetEditActionItemDto[action=$action, parameters=$parameters]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'parameters'] = this.parameters; - return json; - } - - /// Returns a new [AssetEditActionItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditActionItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditActionItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditActionItemDto( - action: AssetEditAction.fromJson(json[r'action'])!, - parameters: json[r'parameters'], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditActionItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditActionItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditActionItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditActionItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'parameters', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart b/mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart deleted file mode 100644 index 6f2811e89d..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart +++ /dev/null @@ -1,156 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditActionItemDtoParameters { - /// Returns a new [AssetEditActionItemDtoParameters] instance. - AssetEditActionItemDtoParameters({ - required this.height, - required this.width, - required this.x, - required this.y, - required this.angle, - required this.axis, - }); - - /// Height of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int height; - - /// Width of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int width; - - /// Top-Left X coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int x; - - /// Top-Left Y coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int y; - - /// Rotation angle in degrees - num angle; - - MirrorAxis axis; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDtoParameters && - other.height == height && - other.width == width && - other.x == x && - other.y == y && - other.angle == angle && - other.axis == axis; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (height.hashCode) + - (width.hashCode) + - (x.hashCode) + - (y.hashCode) + - (angle.hashCode) + - (axis.hashCode); - - @override - String toString() => 'AssetEditActionItemDtoParameters[height=$height, width=$width, x=$x, y=$y, angle=$angle, axis=$axis]'; - - Map toJson() { - final json = {}; - json[r'height'] = this.height; - json[r'width'] = this.width; - json[r'x'] = this.x; - json[r'y'] = this.y; - json[r'angle'] = this.angle; - json[r'axis'] = this.axis; - return json; - } - - /// Returns a new [AssetEditActionItemDtoParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditActionItemDtoParameters? fromJson(dynamic value) { - upgradeDto(value, "AssetEditActionItemDtoParameters"); - if (value is Map) { - final json = value.cast(); - - return AssetEditActionItemDtoParameters( - height: mapValueOfType(json, r'height')!, - width: mapValueOfType(json, r'width')!, - x: mapValueOfType(json, r'x')!, - y: mapValueOfType(json, r'y')!, - angle: num.parse('${json[r'angle']}'), - axis: MirrorAxis.fromJson(json[r'axis'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditActionItemDtoParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditActionItemDtoParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditActionItemDtoParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditActionItemDtoParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'height', - 'width', - 'x', - 'y', - 'angle', - 'axis', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart b/mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart deleted file mode 100644 index 3315fe8579..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditActionItemResponseDto { - /// Returns a new [AssetEditActionItemResponseDto] instance. - AssetEditActionItemResponseDto({ - required this.action, - required this.id, - required this.parameters, - }); - - AssetEditAction action; - - /// Asset edit ID - String id; - - AssetEditActionItemDtoParameters parameters; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemResponseDto && - other.action == action && - other.id == id && - other.parameters == parameters; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (id.hashCode) + - (parameters.hashCode); - - @override - String toString() => 'AssetEditActionItemResponseDto[action=$action, id=$id, parameters=$parameters]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'id'] = this.id; - json[r'parameters'] = this.parameters; - return json; - } - - /// Returns a new [AssetEditActionItemResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditActionItemResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditActionItemResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditActionItemResponseDto( - action: AssetEditAction.fromJson(json[r'action'])!, - id: mapValueOfType(json, r'id')!, - parameters: AssetEditActionItemDtoParameters.fromJson(json[r'parameters'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditActionItemResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditActionItemResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditActionItemResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditActionItemResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'id', - 'parameters', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edits_create_dto.dart b/mobile/openapi/lib/model/asset_edits_create_dto.dart deleted file mode 100644 index 9f6fc66904..0000000000 --- a/mobile/openapi/lib/model/asset_edits_create_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditsCreateDto { - /// Returns a new [AssetEditsCreateDto] instance. - AssetEditsCreateDto({ - this.edits = const [], - }); - - /// List of edit actions to apply (crop, rotate, or mirror) - List edits; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditsCreateDto && - _deepEquality.equals(other.edits, edits); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (edits.hashCode); - - @override - String toString() => 'AssetEditsCreateDto[edits=$edits]'; - - Map toJson() { - final json = {}; - json[r'edits'] = this.edits; - return json; - } - - /// Returns a new [AssetEditsCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditsCreateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditsCreateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditsCreateDto( - edits: AssetEditActionItemDto.listFromJson(json[r'edits']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditsCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditsCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditsCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditsCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'edits', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edits_response_dto.dart b/mobile/openapi/lib/model/asset_edits_response_dto.dart deleted file mode 100644 index 322b4c0a4c..0000000000 --- a/mobile/openapi/lib/model/asset_edits_response_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditsResponseDto { - /// Returns a new [AssetEditsResponseDto] instance. - AssetEditsResponseDto({ - required this.assetId, - this.edits = const [], - }); - - /// Asset ID these edits belong to - String assetId; - - /// List of edit actions applied to the asset - List edits; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditsResponseDto && - other.assetId == assetId && - _deepEquality.equals(other.edits, edits); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (edits.hashCode); - - @override - String toString() => 'AssetEditsResponseDto[assetId=$assetId, edits=$edits]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'edits'] = this.edits; - return json; - } - - /// Returns a new [AssetEditsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditsResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - edits: AssetEditActionItemResponseDto.listFromJson(json[r'edits']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'edits', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_create_dto.dart b/mobile/openapi/lib/model/asset_face_create_dto.dart deleted file mode 100644 index 29c28175cd..0000000000 --- a/mobile/openapi/lib/model/asset_face_create_dto.dart +++ /dev/null @@ -1,181 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceCreateDto { - /// Returns a new [AssetFaceCreateDto] instance. - AssetFaceCreateDto({ - required this.assetId, - required this.height, - required this.imageHeight, - required this.imageWidth, - required this.personId, - required this.width, - required this.x, - required this.y, - }); - - /// Asset ID - String assetId; - - /// Face bounding box height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int height; - - /// Image height in pixels - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width in pixels - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageWidth; - - /// Person ID - String personId; - - /// Face bounding box width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int width; - - /// Face bounding box X coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int x; - - /// Face bounding box Y coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int y; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceCreateDto && - other.assetId == assetId && - other.height == height && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.personId == personId && - other.width == width && - other.x == x && - other.y == y; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (height.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (personId.hashCode) + - (width.hashCode) + - (x.hashCode) + - (y.hashCode); - - @override - String toString() => 'AssetFaceCreateDto[assetId=$assetId, height=$height, imageHeight=$imageHeight, imageWidth=$imageWidth, personId=$personId, width=$width, x=$x, y=$y]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'height'] = this.height; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - json[r'personId'] = this.personId; - json[r'width'] = this.width; - json[r'x'] = this.x; - json[r'y'] = this.y; - return json; - } - - /// Returns a new [AssetFaceCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceCreateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceCreateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceCreateDto( - assetId: mapValueOfType(json, r'assetId')!, - height: mapValueOfType(json, r'height')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - personId: mapValueOfType(json, r'personId')!, - width: mapValueOfType(json, r'width')!, - x: mapValueOfType(json, r'x')!, - y: mapValueOfType(json, r'y')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'height', - 'imageHeight', - 'imageWidth', - 'personId', - 'width', - 'x', - 'y', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_delete_dto.dart b/mobile/openapi/lib/model/asset_face_delete_dto.dart deleted file mode 100644 index a1f3731bea..0000000000 --- a/mobile/openapi/lib/model/asset_face_delete_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceDeleteDto { - /// Returns a new [AssetFaceDeleteDto] instance. - AssetFaceDeleteDto({ - required this.force, - }); - - /// Force delete even if person has other faces - bool force; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceDeleteDto && - other.force == force; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (force.hashCode); - - @override - String toString() => 'AssetFaceDeleteDto[force=$force]'; - - Map toJson() { - final json = {}; - json[r'force'] = this.force; - return json; - } - - /// Returns a new [AssetFaceDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceDeleteDto( - force: mapValueOfType(json, r'force')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'force', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_response_dto.dart b/mobile/openapi/lib/model/asset_face_response_dto.dart deleted file mode 100644 index aa7b8b65f0..0000000000 --- a/mobile/openapi/lib/model/asset_face_response_dto.dart +++ /dev/null @@ -1,200 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceResponseDto { - /// Returns a new [AssetFaceResponseDto] instance. - AssetFaceResponseDto({ - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - required this.id, - required this.imageHeight, - required this.imageWidth, - required this.person, - this.sourceType = const Optional.absent(), - }); - - /// Bounding box X1 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX1; - - /// Bounding box X2 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX2; - - /// Bounding box Y1 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY1; - - /// Bounding box Y2 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY2; - - /// Face ID - String id; - - /// Image height in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int imageWidth; - - PersonResponseDto? person; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sourceType; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceResponseDto && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.id == id && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.person == person && - other.sourceType == sourceType; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (id.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (person == null ? 0 : person!.hashCode) + - (sourceType == null ? 0 : sourceType!.hashCode); - - @override - String toString() => 'AssetFaceResponseDto[boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, id=$id, imageHeight=$imageHeight, imageWidth=$imageWidth, person=$person, sourceType=$sourceType]'; - - Map toJson() { - final json = {}; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - json[r'id'] = this.id; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - if (this.person != null) { - json[r'person'] = this.person; - } else { - json[r'person'] = null; - } - if (this.sourceType.isPresent) { - final value = this.sourceType.value; - json[r'sourceType'] = value; - } - return json; - } - - /// Returns a new [AssetFaceResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceResponseDto( - boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, - boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, - boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, - boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, - id: mapValueOfType(json, r'id')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - person: PersonResponseDto.fromJson(json[r'person']), - sourceType: json.containsKey(r'sourceType') ? Optional.present(SourceType.fromJson(json[r'sourceType'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'id', - 'imageHeight', - 'imageWidth', - 'person', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_update_dto.dart b/mobile/openapi/lib/model/asset_face_update_dto.dart deleted file mode 100644 index 1027627552..0000000000 --- a/mobile/openapi/lib/model/asset_face_update_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceUpdateDto { - /// Returns a new [AssetFaceUpdateDto] instance. - AssetFaceUpdateDto({ - this.data = const [], - }); - - /// Face update items - List data; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceUpdateDto && - _deepEquality.equals(other.data, data); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode); - - @override - String toString() => 'AssetFaceUpdateDto[data=$data]'; - - Map toJson() { - final json = {}; - json[r'data'] = this.data; - return json; - } - - /// Returns a new [AssetFaceUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceUpdateDto( - data: AssetFaceUpdateItem.listFromJson(json[r'data']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_update_item.dart b/mobile/openapi/lib/model/asset_face_update_item.dart deleted file mode 100644 index a81b21e139..0000000000 --- a/mobile/openapi/lib/model/asset_face_update_item.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceUpdateItem { - /// Returns a new [AssetFaceUpdateItem] instance. - AssetFaceUpdateItem({ - required this.assetId, - required this.personId, - }); - - /// Asset ID - String assetId; - - /// Person ID - String personId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceUpdateItem && - other.assetId == assetId && - other.personId == personId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (personId.hashCode); - - @override - String toString() => 'AssetFaceUpdateItem[assetId=$assetId, personId=$personId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'personId'] = this.personId; - return json; - } - - /// Returns a new [AssetFaceUpdateItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceUpdateItem? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceUpdateItem"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceUpdateItem( - assetId: mapValueOfType(json, r'assetId')!, - personId: mapValueOfType(json, r'personId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceUpdateItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceUpdateItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceUpdateItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceUpdateItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'personId', - }; -} - diff --git a/mobile/openapi/lib/model/asset_id_error_reason.dart b/mobile/openapi/lib/model/asset_id_error_reason.dart deleted file mode 100644 index 26ee546e32..0000000000 --- a/mobile/openapi/lib/model/asset_id_error_reason.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Error reason if failed -enum AssetIdErrorReason { - duplicate._(r'duplicate'), - noPermission._(r'no_permission'), - notFound._(r'not_found'), - ; - - /// Instantiate a new enum with the provided value. - const AssetIdErrorReason._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetIdErrorReason] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetIdErrorReason? fromJson(dynamic value) => AssetIdErrorReasonTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetIdErrorReason] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetIdErrorReason.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetIdErrorReason] to String, -/// and [decode] dynamic data back to [AssetIdErrorReason]. -class AssetIdErrorReasonTypeTransformer { - factory AssetIdErrorReasonTypeTransformer() => _instance ??= const AssetIdErrorReasonTypeTransformer._(); - - const AssetIdErrorReasonTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetIdErrorReason data) => data._value; - - /// Returns the instance of [AssetIdErrorReason] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetIdErrorReason? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetIdErrorReason) { - return data; - } - if (data != null) { - switch (data) { - case r'duplicate': return AssetIdErrorReason.duplicate; - case r'no_permission': return AssetIdErrorReason.noPermission; - case r'not_found': return AssetIdErrorReason.notFound; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetIdErrorReasonTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_ids_dto.dart b/mobile/openapi/lib/model/asset_ids_dto.dart deleted file mode 100644 index 85e5cc3aee..0000000000 --- a/mobile/openapi/lib/model/asset_ids_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetIdsDto { - /// Returns a new [AssetIdsDto] instance. - AssetIdsDto({ - this.assetIds = const [], - }); - - /// Asset IDs - List assetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetIdsDto && - _deepEquality.equals(other.assetIds, assetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode); - - @override - String toString() => 'AssetIdsDto[assetIds=$assetIds]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - return json; - } - - /// Returns a new [AssetIdsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetIdsDto? fromJson(dynamic value) { - upgradeDto(value, "AssetIdsDto"); - if (value is Map) { - final json = value.cast(); - - return AssetIdsDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetIdsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetIdsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetIdsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetIdsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/asset_ids_response_dto.dart b/mobile/openapi/lib/model/asset_ids_response_dto.dart deleted file mode 100644 index 6d8076952e..0000000000 --- a/mobile/openapi/lib/model/asset_ids_response_dto.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetIdsResponseDto { - /// Returns a new [AssetIdsResponseDto] instance. - AssetIdsResponseDto({ - required this.assetId, - this.error = const Optional.absent(), - required this.success, - }); - - /// Asset ID - String assetId; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional error; - - /// Whether operation succeeded - bool success; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetIdsResponseDto && - other.assetId == assetId && - other.error == error && - other.success == success; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (error == null ? 0 : error!.hashCode) + - (success.hashCode); - - @override - String toString() => 'AssetIdsResponseDto[assetId=$assetId, error=$error, success=$success]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - json[r'success'] = this.success; - return json; - } - - /// Returns a new [AssetIdsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetIdsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetIdsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetIdsResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - error: json.containsKey(r'error') ? Optional.present(AssetIdErrorReason.fromJson(json[r'error'])) : const Optional.absent(), - success: mapValueOfType(json, r'success')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetIdsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetIdsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetIdsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetIdsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'success', - }; -} - diff --git a/mobile/openapi/lib/model/asset_job_name.dart b/mobile/openapi/lib/model/asset_job_name.dart deleted file mode 100644 index 6c32d6b1e4..0000000000 --- a/mobile/openapi/lib/model/asset_job_name.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Job name -enum AssetJobName { - refreshFaces._(r'refresh-faces'), - refreshMetadata._(r'refresh-metadata'), - regenerateThumbnail._(r'regenerate-thumbnail'), - transcodeVideo._(r'transcode-video'), - ; - - /// Instantiate a new enum with the provided value. - const AssetJobName._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetJobName] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetJobName? fromJson(dynamic value) => AssetJobNameTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetJobName] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetJobName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetJobName] to String, -/// and [decode] dynamic data back to [AssetJobName]. -class AssetJobNameTypeTransformer { - factory AssetJobNameTypeTransformer() => _instance ??= const AssetJobNameTypeTransformer._(); - - const AssetJobNameTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetJobName data) => data._value; - - /// Returns the instance of [AssetJobName] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetJobName? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetJobName) { - return data; - } - if (data != null) { - switch (data) { - case r'refresh-faces': return AssetJobName.refreshFaces; - case r'refresh-metadata': return AssetJobName.refreshMetadata; - case r'regenerate-thumbnail': return AssetJobName.regenerateThumbnail; - case r'transcode-video': return AssetJobName.transcodeVideo; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetJobNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_jobs_dto.dart b/mobile/openapi/lib/model/asset_jobs_dto.dart deleted file mode 100644 index 5085e3820c..0000000000 --- a/mobile/openapi/lib/model/asset_jobs_dto.dart +++ /dev/null @@ -1,110 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetJobsDto { - /// Returns a new [AssetJobsDto] instance. - AssetJobsDto({ - this.assetIds = const [], - required this.name, - }); - - /// Asset IDs - List assetIds; - - AssetJobName name; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetJobsDto && - _deepEquality.equals(other.assetIds, assetIds) && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (name.hashCode); - - @override - String toString() => 'AssetJobsDto[assetIds=$assetIds, name=$name]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [AssetJobsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetJobsDto? fromJson(dynamic value) { - upgradeDto(value, "AssetJobsDto"); - if (value is Map) { - final json = value.cast(); - - return AssetJobsDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - name: AssetJobName.fromJson(json[r'name'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetJobsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetJobsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetJobsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetJobsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/asset_media_response_dto.dart b/mobile/openapi/lib/model/asset_media_response_dto.dart deleted file mode 100644 index 6dc5cd3c92..0000000000 --- a/mobile/openapi/lib/model/asset_media_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMediaResponseDto { - /// Returns a new [AssetMediaResponseDto] instance. - AssetMediaResponseDto({ - required this.id, - required this.status, - }); - - /// Asset media ID - String id; - - AssetMediaStatus status; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMediaResponseDto && - other.id == id && - other.status == status; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (id.hashCode) + - (status.hashCode); - - @override - String toString() => 'AssetMediaResponseDto[id=$id, status=$status]'; - - Map toJson() { - final json = {}; - json[r'id'] = this.id; - json[r'status'] = this.status; - return json; - } - - /// Returns a new [AssetMediaResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMediaResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMediaResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMediaResponseDto( - id: mapValueOfType(json, r'id')!, - status: AssetMediaStatus.fromJson(json[r'status'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMediaResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMediaResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMediaResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMediaResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - 'status', - }; -} - diff --git a/mobile/openapi/lib/model/asset_media_size.dart b/mobile/openapi/lib/model/asset_media_size.dart deleted file mode 100644 index 3c81db4931..0000000000 --- a/mobile/openapi/lib/model/asset_media_size.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset media size -enum AssetMediaSize { - original._(r'original'), - fullsize._(r'fullsize'), - preview._(r'preview'), - thumbnail._(r'thumbnail'), - ; - - /// Instantiate a new enum with the provided value. - const AssetMediaSize._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetMediaSize] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetMediaSize? fromJson(dynamic value) => AssetMediaSizeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetMediaSize] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMediaSize.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetMediaSize] to String, -/// and [decode] dynamic data back to [AssetMediaSize]. -class AssetMediaSizeTypeTransformer { - factory AssetMediaSizeTypeTransformer() => _instance ??= const AssetMediaSizeTypeTransformer._(); - - const AssetMediaSizeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetMediaSize data) => data._value; - - /// Returns the instance of [AssetMediaSize] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetMediaSize? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetMediaSize) { - return data; - } - if (data != null) { - switch (data) { - case r'original': return AssetMediaSize.original; - case r'fullsize': return AssetMediaSize.fullsize; - case r'preview': return AssetMediaSize.preview; - case r'thumbnail': return AssetMediaSize.thumbnail; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetMediaSizeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_media_status.dart b/mobile/openapi/lib/model/asset_media_status.dart deleted file mode 100644 index b727daad2d..0000000000 --- a/mobile/openapi/lib/model/asset_media_status.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Upload status -enum AssetMediaStatus { - created._(r'created'), - duplicate._(r'duplicate'), - ; - - /// Instantiate a new enum with the provided value. - const AssetMediaStatus._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetMediaStatus] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetMediaStatus? fromJson(dynamic value) => AssetMediaStatusTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetMediaStatus] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMediaStatus.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetMediaStatus] to String, -/// and [decode] dynamic data back to [AssetMediaStatus]. -class AssetMediaStatusTypeTransformer { - factory AssetMediaStatusTypeTransformer() => _instance ??= const AssetMediaStatusTypeTransformer._(); - - const AssetMediaStatusTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetMediaStatus data) => data._value; - - /// Returns the instance of [AssetMediaStatus] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetMediaStatus? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetMediaStatus) { - return data; - } - if (data != null) { - switch (data) { - case r'created': return AssetMediaStatus.created; - case r'duplicate': return AssetMediaStatus.duplicate; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetMediaStatusTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart deleted file mode 100644 index 6376ebc531..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkDeleteDto { - /// Returns a new [AssetMetadataBulkDeleteDto] instance. - AssetMetadataBulkDeleteDto({ - this.items = const [], - }); - - /// Metadata items to delete - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteDto && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode); - - @override - String toString() => 'AssetMetadataBulkDeleteDto[items=$items]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [AssetMetadataBulkDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkDeleteDto( - items: AssetMetadataBulkDeleteItemDto.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart deleted file mode 100644 index 90417b79e0..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkDeleteItemDto { - /// Returns a new [AssetMetadataBulkDeleteItemDto] instance. - AssetMetadataBulkDeleteItemDto({ - required this.assetId, - required this.key, - }); - - /// Asset ID - String assetId; - - /// Metadata key - String key; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteItemDto && - other.assetId == assetId && - other.key == key; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode); - - @override - String toString() => 'AssetMetadataBulkDeleteItemDto[assetId=$assetId, key=$key]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - return json; - } - - /// Returns a new [AssetMetadataBulkDeleteItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkDeleteItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkDeleteItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkDeleteItemDto( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkDeleteItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkDeleteItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkDeleteItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkDeleteItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart deleted file mode 100644 index 9afb8dda3f..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart +++ /dev/null @@ -1,129 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkResponseDto { - /// Returns a new [AssetMetadataBulkResponseDto] instance. - AssetMetadataBulkResponseDto({ - required this.assetId, - required this.key, - required this.updatedAt, - this.value = const {}, - }); - - /// Asset ID - String assetId; - - /// Metadata key - String key; - - /// Last update date - DateTime updatedAt; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkResponseDto && - other.assetId == assetId && - other.key == key && - other.updatedAt == updatedAt && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode) + - (updatedAt.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataBulkResponseDto[assetId=$assetId, key=$key, updatedAt=$updatedAt, value=$value]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataBulkResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - 'updatedAt', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart deleted file mode 100644 index a5e770b02a..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkUpsertDto { - /// Returns a new [AssetMetadataBulkUpsertDto] instance. - AssetMetadataBulkUpsertDto({ - this.items = const [], - }); - - /// Metadata items to upsert - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertDto && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode); - - @override - String toString() => 'AssetMetadataBulkUpsertDto[items=$items]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [AssetMetadataBulkUpsertDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkUpsertDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkUpsertDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkUpsertDto( - items: AssetMetadataBulkUpsertItemDto.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkUpsertDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkUpsertDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkUpsertDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkUpsertDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart deleted file mode 100644 index e4eab08bf1..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkUpsertItemDto { - /// Returns a new [AssetMetadataBulkUpsertItemDto] instance. - AssetMetadataBulkUpsertItemDto({ - required this.assetId, - required this.key, - this.value = const {}, - }); - - /// Asset ID - String assetId; - - /// Metadata key - String key; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertItemDto && - other.assetId == assetId && - other.key == key && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataBulkUpsertItemDto[assetId=$assetId, key=$key, value=$value]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataBulkUpsertItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkUpsertItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkUpsertItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkUpsertItemDto( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkUpsertItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkUpsertItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkUpsertItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkUpsertItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_response_dto.dart b/mobile/openapi/lib/model/asset_metadata_response_dto.dart deleted file mode 100644 index 6b6a255ae4..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_response_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataResponseDto { - /// Returns a new [AssetMetadataResponseDto] instance. - AssetMetadataResponseDto({ - required this.key, - required this.updatedAt, - this.value = const {}, - }); - - /// Metadata key - String key; - - /// Last update date - DateTime updatedAt; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataResponseDto && - other.key == key && - other.updatedAt == updatedAt && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (updatedAt.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataResponseDto[key=$key, updatedAt=$updatedAt, value=$value]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataResponseDto( - key: mapValueOfType(json, r'key')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'updatedAt', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_upsert_dto.dart b/mobile/openapi/lib/model/asset_metadata_upsert_dto.dart deleted file mode 100644 index b1473d4826..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_upsert_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataUpsertDto { - /// Returns a new [AssetMetadataUpsertDto] instance. - AssetMetadataUpsertDto({ - this.items = const [], - }); - - /// Metadata items to upsert - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataUpsertDto && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode); - - @override - String toString() => 'AssetMetadataUpsertDto[items=$items]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [AssetMetadataUpsertDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataUpsertDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataUpsertDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataUpsertDto( - items: AssetMetadataUpsertItemDto.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataUpsertDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataUpsertDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataUpsertDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataUpsertDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart b/mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart deleted file mode 100644 index 70de1941f3..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataUpsertItemDto { - /// Returns a new [AssetMetadataUpsertItemDto] instance. - AssetMetadataUpsertItemDto({ - required this.key, - this.value = const {}, - }); - - /// Metadata key - String key; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataUpsertItemDto && - other.key == key && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataUpsertItemDto[key=$key, value=$value]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataUpsertItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataUpsertItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataUpsertItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataUpsertItemDto( - key: mapValueOfType(json, r'key')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataUpsertItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataUpsertItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataUpsertItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataUpsertItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_ocr_response_dto.dart b/mobile/openapi/lib/model/asset_ocr_response_dto.dart deleted file mode 100644 index 23c51f054c..0000000000 --- a/mobile/openapi/lib/model/asset_ocr_response_dto.dart +++ /dev/null @@ -1,206 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetOcrResponseDto { - /// Returns a new [AssetOcrResponseDto] instance. - AssetOcrResponseDto({ - required this.assetId, - required this.boxScore, - required this.id, - required this.text, - required this.textScore, - required this.x1, - required this.x2, - required this.x3, - required this.x4, - required this.y1, - required this.y2, - required this.y3, - required this.y4, - }); - - String assetId; - - /// Confidence score for text detection box - double boxScore; - - String id; - - /// Recognized text - String text; - - /// Confidence score for text recognition - double textScore; - - /// Normalized x coordinate of box corner 1 (0-1) - double x1; - - /// Normalized x coordinate of box corner 2 (0-1) - double x2; - - /// Normalized x coordinate of box corner 3 (0-1) - double x3; - - /// Normalized x coordinate of box corner 4 (0-1) - double x4; - - /// Normalized y coordinate of box corner 1 (0-1) - double y1; - - /// Normalized y coordinate of box corner 2 (0-1) - double y2; - - /// Normalized y coordinate of box corner 3 (0-1) - double y3; - - /// Normalized y coordinate of box corner 4 (0-1) - double y4; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetOcrResponseDto && - other.assetId == assetId && - other.boxScore == boxScore && - other.id == id && - other.text == text && - other.textScore == textScore && - other.x1 == x1 && - other.x2 == x2 && - other.x3 == x3 && - other.x4 == x4 && - other.y1 == y1 && - other.y2 == y2 && - other.y3 == y3 && - other.y4 == y4; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boxScore.hashCode) + - (id.hashCode) + - (text.hashCode) + - (textScore.hashCode) + - (x1.hashCode) + - (x2.hashCode) + - (x3.hashCode) + - (x4.hashCode) + - (y1.hashCode) + - (y2.hashCode) + - (y3.hashCode) + - (y4.hashCode); - - @override - String toString() => 'AssetOcrResponseDto[assetId=$assetId, boxScore=$boxScore, id=$id, text=$text, textScore=$textScore, x1=$x1, x2=$x2, x3=$x3, x4=$x4, y1=$y1, y2=$y2, y3=$y3, y4=$y4]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boxScore'] = this.boxScore; - json[r'id'] = this.id; - json[r'text'] = this.text; - json[r'textScore'] = this.textScore; - json[r'x1'] = this.x1; - json[r'x2'] = this.x2; - json[r'x3'] = this.x3; - json[r'x4'] = this.x4; - json[r'y1'] = this.y1; - json[r'y2'] = this.y2; - json[r'y3'] = this.y3; - json[r'y4'] = this.y4; - return json; - } - - /// Returns a new [AssetOcrResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetOcrResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetOcrResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetOcrResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - boxScore: mapValueOfType(json, r'boxScore')!, - id: mapValueOfType(json, r'id')!, - text: mapValueOfType(json, r'text')!, - textScore: mapValueOfType(json, r'textScore')!, - x1: mapValueOfType(json, r'x1')!, - x2: mapValueOfType(json, r'x2')!, - x3: mapValueOfType(json, r'x3')!, - x4: mapValueOfType(json, r'x4')!, - y1: mapValueOfType(json, r'y1')!, - y2: mapValueOfType(json, r'y2')!, - y3: mapValueOfType(json, r'y3')!, - y4: mapValueOfType(json, r'y4')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetOcrResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetOcrResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetOcrResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetOcrResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boxScore', - 'id', - 'text', - 'textScore', - 'x1', - 'x2', - 'x3', - 'x4', - 'y1', - 'y2', - 'y3', - 'y4', - }; -} - diff --git a/mobile/openapi/lib/model/asset_order.dart b/mobile/openapi/lib/model/asset_order.dart deleted file mode 100644 index a0d8af0823..0000000000 --- a/mobile/openapi/lib/model/asset_order.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset sort order -enum AssetOrder { - asc._(r'asc'), - desc._(r'desc'), - ; - - /// Instantiate a new enum with the provided value. - const AssetOrder._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetOrder] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetOrder? fromJson(dynamic value) => AssetOrderTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetOrder] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetOrder.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetOrder] to String, -/// and [decode] dynamic data back to [AssetOrder]. -class AssetOrderTypeTransformer { - factory AssetOrderTypeTransformer() => _instance ??= const AssetOrderTypeTransformer._(); - - const AssetOrderTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetOrder data) => data._value; - - /// Returns the instance of [AssetOrder] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetOrder? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetOrder) { - return data; - } - if (data != null) { - switch (data) { - case r'asc': return AssetOrder.asc; - case r'desc': return AssetOrder.desc; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetOrderTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_order_by.dart b/mobile/openapi/lib/model/asset_order_by.dart deleted file mode 100644 index 4c00003d3e..0000000000 --- a/mobile/openapi/lib/model/asset_order_by.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset sorting property -enum AssetOrderBy { - takenAt._(r'takenAt'), - createdAt._(r'createdAt'), - ; - - /// Instantiate a new enum with the provided value. - const AssetOrderBy._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetOrderBy] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetOrderBy? fromJson(dynamic value) => AssetOrderByTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetOrderBy] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetOrderBy.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetOrderBy] to String, -/// and [decode] dynamic data back to [AssetOrderBy]. -class AssetOrderByTypeTransformer { - factory AssetOrderByTypeTransformer() => _instance ??= const AssetOrderByTypeTransformer._(); - - const AssetOrderByTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetOrderBy data) => data._value; - - /// Returns the instance of [AssetOrderBy] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetOrderBy? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetOrderBy) { - return data; - } - if (data != null) { - switch (data) { - case r'takenAt': return AssetOrderBy.takenAt; - case r'createdAt': return AssetOrderBy.createdAt; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetOrderByTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_reject_reason.dart b/mobile/openapi/lib/model/asset_reject_reason.dart deleted file mode 100644 index 885f5b7218..0000000000 --- a/mobile/openapi/lib/model/asset_reject_reason.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Rejection reason if rejected -enum AssetRejectReason { - duplicate._(r'duplicate'), - unsupportedFormat._(r'unsupported-format'), - ; - - /// Instantiate a new enum with the provided value. - const AssetRejectReason._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetRejectReason] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetRejectReason? fromJson(dynamic value) => AssetRejectReasonTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetRejectReason] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetRejectReason.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetRejectReason] to String, -/// and [decode] dynamic data back to [AssetRejectReason]. -class AssetRejectReasonTypeTransformer { - factory AssetRejectReasonTypeTransformer() => _instance ??= const AssetRejectReasonTypeTransformer._(); - - const AssetRejectReasonTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetRejectReason data) => data._value; - - /// Returns the instance of [AssetRejectReason] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetRejectReason? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetRejectReason) { - return data; - } - if (data != null) { - switch (data) { - case r'duplicate': return AssetRejectReason.duplicate; - case r'unsupported-format': return AssetRejectReason.unsupportedFormat; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetRejectReasonTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_response_dto.dart b/mobile/openapi/lib/model/asset_response_dto.dart deleted file mode 100644 index 3c09de3f15..0000000000 --- a/mobile/openapi/lib/model/asset_response_dto.dart +++ /dev/null @@ -1,441 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetResponseDto { - /// Returns a new [AssetResponseDto] instance. - AssetResponseDto({ - required this.checksum, - required this.createdAt, - this.duplicateId = const Optional.absent(), - required this.duration, - this.exifInfo = const Optional.absent(), - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.hasMetadata, - required this.height, - required this.id, - required this.isArchived, - required this.isEdited, - required this.isFavorite, - required this.isOffline, - required this.isTrashed, - this.libraryId = const Optional.absent(), - this.livePhotoVideoId = const Optional.absent(), - required this.localDateTime, - required this.originalFileName, - this.originalMimeType = const Optional.absent(), - required this.originalPath, - this.owner = const Optional.absent(), - required this.ownerId, - this.people = const Optional.present(const []), - this.resized = const Optional.absent(), - this.stack = const Optional.absent(), - this.tags = const Optional.present(const []), - required this.thumbhash, - required this.type, - required this.updatedAt, - required this.visibility, - required this.width, - }); - - /// Base64 encoded SHA1 hash - String checksum; - - /// The UTC timestamp when the asset was originally uploaded to Immich. - DateTime createdAt; - - /// Duplicate group ID - Optional duplicateId; - - /// Video/gif duration in milliseconds (null for static images) - /// - /// Minimum value: 0 - /// Maximum value: 2147483647 - int? duration; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional exifInfo; - - /// The actual UTC timestamp when the file was created/captured, preserving timezone information. This is the authoritative timestamp for chronological sorting within timeline groups. Combined with timezone data, this can be used to determine the exact moment the photo was taken. - DateTime fileCreatedAt; - - /// The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken. - DateTime fileModifiedAt; - - /// Whether asset has metadata - bool hasMetadata; - - /// Asset height - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? height; - - /// Asset ID - String id; - - /// Is archived - bool isArchived; - - /// Is edited - bool isEdited; - - /// Is favorite - bool isFavorite; - - /// Is offline - bool isOffline; - - /// Is trashed - bool isTrashed; - - /// Library ID - Optional libraryId; - - /// Live photo video ID - Optional livePhotoVideoId; - - /// The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by \"local\" days and months. - DateTime localDateTime; - - /// Original file name - String originalFileName; - - /// Original MIME type - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional originalMimeType; - - /// Original file path - String originalPath; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional owner; - - /// Owner user ID - String ownerId; - - Optional?> people; - - /// Is resized - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional resized; - - Optional stack; - - Optional?> tags; - - /// Thumbhash for thumbnail generation (base64) also used as the c query param for thumbnail cache busting. - String? thumbhash; - - AssetTypeEnum type; - - /// The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified. - DateTime updatedAt; - - AssetVisibility visibility; - - /// Asset width - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? width; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetResponseDto && - other.checksum == checksum && - other.createdAt == createdAt && - other.duplicateId == duplicateId && - other.duration == duration && - other.exifInfo == exifInfo && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.hasMetadata == hasMetadata && - other.height == height && - other.id == id && - other.isArchived == isArchived && - other.isEdited == isEdited && - other.isFavorite == isFavorite && - other.isOffline == isOffline && - other.isTrashed == isTrashed && - other.libraryId == libraryId && - other.livePhotoVideoId == livePhotoVideoId && - other.localDateTime == localDateTime && - other.originalFileName == originalFileName && - other.originalMimeType == originalMimeType && - other.originalPath == originalPath && - other.owner == owner && - other.ownerId == ownerId && - _deepEquality.equals(other.people, people) && - other.resized == resized && - other.stack == stack && - _deepEquality.equals(other.tags, tags) && - other.thumbhash == thumbhash && - other.type == type && - other.updatedAt == updatedAt && - other.visibility == visibility && - other.width == width; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (createdAt.hashCode) + - (duplicateId == null ? 0 : duplicateId!.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (exifInfo == null ? 0 : exifInfo!.hashCode) + - (fileCreatedAt.hashCode) + - (fileModifiedAt.hashCode) + - (hasMetadata.hashCode) + - (height == null ? 0 : height!.hashCode) + - (id.hashCode) + - (isArchived.hashCode) + - (isEdited.hashCode) + - (isFavorite.hashCode) + - (isOffline.hashCode) + - (isTrashed.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (localDateTime.hashCode) + - (originalFileName.hashCode) + - (originalMimeType == null ? 0 : originalMimeType!.hashCode) + - (originalPath.hashCode) + - (owner == null ? 0 : owner!.hashCode) + - (ownerId.hashCode) + - (people.hashCode) + - (resized == null ? 0 : resized!.hashCode) + - (stack == null ? 0 : stack!.hashCode) + - (tags.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode) + - (visibility.hashCode) + - (width == null ? 0 : width!.hashCode); - - @override - String toString() => 'AssetResponseDto[checksum=$checksum, createdAt=$createdAt, duplicateId=$duplicateId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, hasMetadata=$hasMetadata, height=$height, id=$id, isArchived=$isArchived, isEdited=$isEdited, isFavorite=$isFavorite, isOffline=$isOffline, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalMimeType=$originalMimeType, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, stack=$stack, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt, visibility=$visibility, width=$width]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - if (this.duplicateId.isPresent) { - final value = this.duplicateId.value; - json[r'duplicateId'] = value; - } - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - json[r'duration'] = null; - } - if (this.exifInfo.isPresent) { - final value = this.exifInfo.value; - json[r'exifInfo'] = value; - } - json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String(); - json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String(); - json[r'hasMetadata'] = this.hasMetadata; - if (this.height != null) { - json[r'height'] = this.height; - } else { - json[r'height'] = null; - } - json[r'id'] = this.id; - json[r'isArchived'] = this.isArchived; - json[r'isEdited'] = this.isEdited; - json[r'isFavorite'] = this.isFavorite; - json[r'isOffline'] = this.isOffline; - json[r'isTrashed'] = this.isTrashed; - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.livePhotoVideoId.isPresent) { - final value = this.livePhotoVideoId.value; - json[r'livePhotoVideoId'] = value; - } - json[r'localDateTime'] = this.localDateTime.toUtc().toIso8601String(); - json[r'originalFileName'] = this.originalFileName; - if (this.originalMimeType.isPresent) { - final value = this.originalMimeType.value; - json[r'originalMimeType'] = value; - } - json[r'originalPath'] = this.originalPath; - if (this.owner.isPresent) { - final value = this.owner.value; - json[r'owner'] = value; - } - json[r'ownerId'] = this.ownerId; - if (this.people.isPresent) { - final value = this.people.value; - json[r'people'] = value; - } - if (this.resized.isPresent) { - final value = this.resized.value; - json[r'resized'] = value; - } - if (this.stack.isPresent) { - final value = this.stack.value; - json[r'stack'] = value; - } - if (this.tags.isPresent) { - final value = this.tags.value; - json[r'tags'] = value; - } - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - json[r'visibility'] = this.visibility; - if (this.width != null) { - json[r'width'] = this.width; - } else { - json[r'width'] = null; - } - return json; - } - - /// Returns a new [AssetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetResponseDto( - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', r'')!, - duplicateId: json.containsKey(r'duplicateId') ? Optional.present(mapValueOfType(json, r'duplicateId')) : const Optional.absent(), - duration: mapValueOfType(json, r'duration'), - exifInfo: json.containsKey(r'exifInfo') ? Optional.present(ExifResponseDto.fromJson(json[r'exifInfo'])) : const Optional.absent(), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'')!, - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'')!, - hasMetadata: mapValueOfType(json, r'hasMetadata')!, - height: mapValueOfType(json, r'height'), - id: mapValueOfType(json, r'id')!, - isArchived: mapValueOfType(json, r'isArchived')!, - isEdited: mapValueOfType(json, r'isEdited')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - isOffline: mapValueOfType(json, r'isOffline')!, - isTrashed: mapValueOfType(json, r'isTrashed')!, - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - livePhotoVideoId: json.containsKey(r'livePhotoVideoId') ? Optional.present(mapValueOfType(json, r'livePhotoVideoId')) : const Optional.absent(), - localDateTime: mapDateTime(json, r'localDateTime', r'')!, - originalFileName: mapValueOfType(json, r'originalFileName')!, - originalMimeType: json.containsKey(r'originalMimeType') ? Optional.present(mapValueOfType(json, r'originalMimeType')) : const Optional.absent(), - originalPath: mapValueOfType(json, r'originalPath')!, - owner: json.containsKey(r'owner') ? Optional.present(UserResponseDto.fromJson(json[r'owner'])) : const Optional.absent(), - ownerId: mapValueOfType(json, r'ownerId')!, - people: json.containsKey(r'people') ? Optional.present(PersonResponseDto.listFromJson(json[r'people'])) : const Optional.absent(), - resized: json.containsKey(r'resized') ? Optional.present(mapValueOfType(json, r'resized')) : const Optional.absent(), - stack: json.containsKey(r'stack') ? Optional.present(AssetStackResponseDto.fromJson(json[r'stack'])) : const Optional.absent(), - tags: json.containsKey(r'tags') ? Optional.present(TagResponseDto.listFromJson(json[r'tags'])) : const Optional.absent(), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetTypeEnum.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', r'')!, - visibility: AssetVisibility.fromJson(json[r'visibility'])!, - width: mapValueOfType(json, r'width'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'duration', - 'fileCreatedAt', - 'fileModifiedAt', - 'hasMetadata', - 'height', - 'id', - 'isArchived', - 'isEdited', - 'isFavorite', - 'isOffline', - 'isTrashed', - 'localDateTime', - 'originalFileName', - 'originalPath', - 'ownerId', - 'thumbhash', - 'type', - 'updatedAt', - 'visibility', - 'width', - }; -} - diff --git a/mobile/openapi/lib/model/asset_stack_response_dto.dart b/mobile/openapi/lib/model/asset_stack_response_dto.dart deleted file mode 100644 index 96fd66a392..0000000000 --- a/mobile/openapi/lib/model/asset_stack_response_dto.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetStackResponseDto { - /// Returns a new [AssetStackResponseDto] instance. - AssetStackResponseDto({ - required this.assetCount, - required this.id, - required this.primaryAssetId, - }); - - /// Number of assets in stack - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int assetCount; - - /// Stack ID - String id; - - /// Primary asset ID - String primaryAssetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetStackResponseDto && - other.assetCount == assetCount && - other.id == id && - other.primaryAssetId == primaryAssetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetCount.hashCode) + - (id.hashCode) + - (primaryAssetId.hashCode); - - @override - String toString() => 'AssetStackResponseDto[assetCount=$assetCount, id=$id, primaryAssetId=$primaryAssetId]'; - - Map toJson() { - final json = {}; - json[r'assetCount'] = this.assetCount; - json[r'id'] = this.id; - json[r'primaryAssetId'] = this.primaryAssetId; - return json; - } - - /// Returns a new [AssetStackResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetStackResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetStackResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetStackResponseDto( - assetCount: mapValueOfType(json, r'assetCount')!, - id: mapValueOfType(json, r'id')!, - primaryAssetId: mapValueOfType(json, r'primaryAssetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetStackResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetStackResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetStackResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetStackResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetCount', - 'id', - 'primaryAssetId', - }; -} - diff --git a/mobile/openapi/lib/model/asset_stats_response_dto.dart b/mobile/openapi/lib/model/asset_stats_response_dto.dart deleted file mode 100644 index df2762a2f3..0000000000 --- a/mobile/openapi/lib/model/asset_stats_response_dto.dart +++ /dev/null @@ -1,127 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetStatsResponseDto { - /// Returns a new [AssetStatsResponseDto] instance. - AssetStatsResponseDto({ - required this.images, - required this.total, - required this.videos, - }); - - /// Number of images - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int images; - - /// Total number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - /// Number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetStatsResponseDto && - other.images == images && - other.total == total && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (images.hashCode) + - (total.hashCode) + - (videos.hashCode); - - @override - String toString() => 'AssetStatsResponseDto[images=$images, total=$total, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'images'] = this.images; - json[r'total'] = this.total; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [AssetStatsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetStatsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetStatsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetStatsResponseDto( - images: mapValueOfType(json, r'images')!, - total: mapValueOfType(json, r'total')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetStatsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetStatsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetStatsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetStatsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'images', - 'total', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/asset_type_enum.dart b/mobile/openapi/lib/model/asset_type_enum.dart deleted file mode 100644 index 615d7fb692..0000000000 --- a/mobile/openapi/lib/model/asset_type_enum.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset type -enum AssetTypeEnum { - IMAGE._(r'IMAGE'), - VIDEO._(r'VIDEO'), - AUDIO._(r'AUDIO'), - OTHER._(r'OTHER'), - ; - - /// Instantiate a new enum with the provided value. - const AssetTypeEnum._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetTypeEnum] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetTypeEnum? fromJson(dynamic value) => AssetTypeEnumTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetTypeEnum] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetTypeEnum.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetTypeEnum] to String, -/// and [decode] dynamic data back to [AssetTypeEnum]. -class AssetTypeEnumTypeTransformer { - factory AssetTypeEnumTypeTransformer() => _instance ??= const AssetTypeEnumTypeTransformer._(); - - const AssetTypeEnumTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetTypeEnum data) => data._value; - - /// Returns the instance of [AssetTypeEnum] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetTypeEnum? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetTypeEnum) { - return data; - } - if (data != null) { - switch (data) { - case r'IMAGE': return AssetTypeEnum.IMAGE; - case r'VIDEO': return AssetTypeEnum.VIDEO; - case r'AUDIO': return AssetTypeEnum.AUDIO; - case r'OTHER': return AssetTypeEnum.OTHER; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetTypeEnumTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_upload_action.dart b/mobile/openapi/lib/model/asset_upload_action.dart deleted file mode 100644 index 806292d31b..0000000000 --- a/mobile/openapi/lib/model/asset_upload_action.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Upload action -enum AssetUploadAction { - accept._(r'accept'), - reject._(r'reject'), - ; - - /// Instantiate a new enum with the provided value. - const AssetUploadAction._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetUploadAction] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetUploadAction? fromJson(dynamic value) => AssetUploadActionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetUploadAction] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetUploadAction.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetUploadAction] to String, -/// and [decode] dynamic data back to [AssetUploadAction]. -class AssetUploadActionTypeTransformer { - factory AssetUploadActionTypeTransformer() => _instance ??= const AssetUploadActionTypeTransformer._(); - - const AssetUploadActionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetUploadAction data) => data._value; - - /// Returns the instance of [AssetUploadAction] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetUploadAction? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetUploadAction) { - return data; - } - if (data != null) { - switch (data) { - case r'accept': return AssetUploadAction.accept; - case r'reject': return AssetUploadAction.reject; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetUploadActionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_visibility.dart b/mobile/openapi/lib/model/asset_visibility.dart deleted file mode 100644 index 5ff5e865b8..0000000000 --- a/mobile/openapi/lib/model/asset_visibility.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset visibility -enum AssetVisibility { - archive._(r'archive'), - timeline._(r'timeline'), - hidden._(r'hidden'), - locked._(r'locked'), - ; - - /// Instantiate a new enum with the provided value. - const AssetVisibility._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetVisibility] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetVisibility? fromJson(dynamic value) => AssetVisibilityTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetVisibility] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetVisibility.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetVisibility] to String, -/// and [decode] dynamic data back to [AssetVisibility]. -class AssetVisibilityTypeTransformer { - factory AssetVisibilityTypeTransformer() => _instance ??= const AssetVisibilityTypeTransformer._(); - - const AssetVisibilityTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetVisibility data) => data._value; - - /// Returns the instance of [AssetVisibility] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetVisibility? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetVisibility) { - return data; - } - if (data != null) { - switch (data) { - case r'archive': return AssetVisibility.archive; - case r'timeline': return AssetVisibility.timeline; - case r'hidden': return AssetVisibility.hidden; - case r'locked': return AssetVisibility.locked; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetVisibilityTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/audio_codec.dart b/mobile/openapi/lib/model/audio_codec.dart deleted file mode 100644 index 7860208dcc..0000000000 --- a/mobile/openapi/lib/model/audio_codec.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Target audio codec -enum AudioCodec { - mp3._(r'mp3'), - aac._(r'aac'), - opus._(r'opus'), - pcmS16le._(r'pcm_s16le'), - ; - - /// Instantiate a new enum with the provided value. - const AudioCodec._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AudioCodec] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AudioCodec? fromJson(dynamic value) => AudioCodecTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AudioCodec] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AudioCodec.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AudioCodec] to String, -/// and [decode] dynamic data back to [AudioCodec]. -class AudioCodecTypeTransformer { - factory AudioCodecTypeTransformer() => _instance ??= const AudioCodecTypeTransformer._(); - - const AudioCodecTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AudioCodec data) => data._value; - - /// Returns the instance of [AudioCodec] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AudioCodec? decode(dynamic data, {bool allowNull = true}) { - if (data is AudioCodec) { - return data; - } - if (data != null) { - switch (data) { - case r'mp3': return AudioCodec.mp3; - case r'aac': return AudioCodec.aac; - case r'opus': return AudioCodec.opus; - case r'pcm_s16le': return AudioCodec.pcmS16le; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AudioCodecTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/auth_status_response_dto.dart b/mobile/openapi/lib/model/auth_status_response_dto.dart deleted file mode 100644 index f0dc61215e..0000000000 --- a/mobile/openapi/lib/model/auth_status_response_dto.dart +++ /dev/null @@ -1,152 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AuthStatusResponseDto { - /// Returns a new [AuthStatusResponseDto] instance. - AuthStatusResponseDto({ - this.expiresAt = const Optional.absent(), - required this.isElevated, - required this.password, - required this.pinCode, - this.pinExpiresAt = const Optional.absent(), - }); - - /// Session expiration date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional expiresAt; - - /// Is elevated session - bool isElevated; - - /// Has password set - bool password; - - /// Has PIN code set - bool pinCode; - - /// PIN expiration date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional pinExpiresAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is AuthStatusResponseDto && - other.expiresAt == expiresAt && - other.isElevated == isElevated && - other.password == password && - other.pinCode == pinCode && - other.pinExpiresAt == pinExpiresAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (isElevated.hashCode) + - (password.hashCode) + - (pinCode.hashCode) + - (pinExpiresAt == null ? 0 : pinExpiresAt!.hashCode); - - @override - String toString() => 'AuthStatusResponseDto[expiresAt=$expiresAt, isElevated=$isElevated, password=$password, pinCode=$pinCode, pinExpiresAt=$pinExpiresAt]'; - - Map toJson() { - final json = {}; - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value; - } - json[r'isElevated'] = this.isElevated; - json[r'password'] = this.password; - json[r'pinCode'] = this.pinCode; - if (this.pinExpiresAt.isPresent) { - final value = this.pinExpiresAt.value; - json[r'pinExpiresAt'] = value; - } - return json; - } - - /// Returns a new [AuthStatusResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AuthStatusResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AuthStatusResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AuthStatusResponseDto( - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapValueOfType(json, r'expiresAt')) : const Optional.absent(), - isElevated: mapValueOfType(json, r'isElevated')!, - password: mapValueOfType(json, r'password')!, - pinCode: mapValueOfType(json, r'pinCode')!, - pinExpiresAt: json.containsKey(r'pinExpiresAt') ? Optional.present(mapValueOfType(json, r'pinExpiresAt')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AuthStatusResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AuthStatusResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AuthStatusResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AuthStatusResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isElevated', - 'password', - 'pinCode', - }; -} - diff --git a/mobile/openapi/lib/model/avatar_update.dart b/mobile/openapi/lib/model/avatar_update.dart deleted file mode 100644 index 1075f0df46..0000000000 --- a/mobile/openapi/lib/model/avatar_update.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AvatarUpdate { - /// Returns a new [AvatarUpdate] instance. - AvatarUpdate({ - this.color = const Optional.absent(), - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional color; - - @override - bool operator ==(Object other) => identical(this, other) || other is AvatarUpdate && - other.color == color; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode); - - @override - String toString() => 'AvatarUpdate[color=$color]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - return json; - } - - /// Returns a new [AvatarUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AvatarUpdate? fromJson(dynamic value) { - upgradeDto(value, "AvatarUpdate"); - if (value is Map) { - final json = value.cast(); - - return AvatarUpdate( - color: json.containsKey(r'color') ? Optional.present(UserAvatarColor.fromJson(json[r'color'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AvatarUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AvatarUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AvatarUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AvatarUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/bulk_id_error_reason.dart b/mobile/openapi/lib/model/bulk_id_error_reason.dart deleted file mode 100644 index 81d040316b..0000000000 --- a/mobile/openapi/lib/model/bulk_id_error_reason.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Error reason -enum BulkIdErrorReason { - duplicate._(r'duplicate'), - noPermission._(r'no_permission'), - notFound._(r'not_found'), - unknown._(r'unknown'), - validation._(r'validation'), - ; - - /// Instantiate a new enum with the provided value. - const BulkIdErrorReason._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [BulkIdErrorReason] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static BulkIdErrorReason? fromJson(dynamic value) => BulkIdErrorReasonTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [BulkIdErrorReason] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = BulkIdErrorReason.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [BulkIdErrorReason] to String, -/// and [decode] dynamic data back to [BulkIdErrorReason]. -class BulkIdErrorReasonTypeTransformer { - factory BulkIdErrorReasonTypeTransformer() => _instance ??= const BulkIdErrorReasonTypeTransformer._(); - - const BulkIdErrorReasonTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(BulkIdErrorReason data) => data._value; - - /// Returns the instance of [BulkIdErrorReason] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - BulkIdErrorReason? decode(dynamic data, {bool allowNull = true}) { - if (data is BulkIdErrorReason) { - return data; - } - if (data != null) { - switch (data) { - case r'duplicate': return BulkIdErrorReason.duplicate; - case r'no_permission': return BulkIdErrorReason.noPermission; - case r'not_found': return BulkIdErrorReason.notFound; - case r'unknown': return BulkIdErrorReason.unknown; - case r'validation': return BulkIdErrorReason.validation; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static BulkIdErrorReasonTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/bulk_id_response_dto.dart b/mobile/openapi/lib/model/bulk_id_response_dto.dart deleted file mode 100644 index 301400fa5e..0000000000 --- a/mobile/openapi/lib/model/bulk_id_response_dto.dart +++ /dev/null @@ -1,141 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class BulkIdResponseDto { - /// Returns a new [BulkIdResponseDto] instance. - BulkIdResponseDto({ - this.error = const Optional.absent(), - this.errorMessage = const Optional.absent(), - required this.id, - required this.success, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional error; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional errorMessage; - - /// ID - String id; - - /// Whether operation succeeded - bool success; - - @override - bool operator ==(Object other) => identical(this, other) || other is BulkIdResponseDto && - other.error == error && - other.errorMessage == errorMessage && - other.id == id && - other.success == success; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (error == null ? 0 : error!.hashCode) + - (errorMessage == null ? 0 : errorMessage!.hashCode) + - (id.hashCode) + - (success.hashCode); - - @override - String toString() => 'BulkIdResponseDto[error=$error, errorMessage=$errorMessage, id=$id, success=$success]'; - - Map toJson() { - final json = {}; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - if (this.errorMessage.isPresent) { - final value = this.errorMessage.value; - json[r'errorMessage'] = value; - } - json[r'id'] = this.id; - json[r'success'] = this.success; - return json; - } - - /// Returns a new [BulkIdResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static BulkIdResponseDto? fromJson(dynamic value) { - upgradeDto(value, "BulkIdResponseDto"); - if (value is Map) { - final json = value.cast(); - - return BulkIdResponseDto( - error: json.containsKey(r'error') ? Optional.present(BulkIdErrorReason.fromJson(json[r'error'])) : const Optional.absent(), - errorMessage: json.containsKey(r'errorMessage') ? Optional.present(mapValueOfType(json, r'errorMessage')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - success: mapValueOfType(json, r'success')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = BulkIdResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = BulkIdResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of BulkIdResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = BulkIdResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - 'success', - }; -} - diff --git a/mobile/openapi/lib/model/bulk_ids_dto.dart b/mobile/openapi/lib/model/bulk_ids_dto.dart deleted file mode 100644 index 7e7864a285..0000000000 --- a/mobile/openapi/lib/model/bulk_ids_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class BulkIdsDto { - /// Returns a new [BulkIdsDto] instance. - BulkIdsDto({ - this.ids = const [], - }); - - /// IDs to process - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is BulkIdsDto && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode); - - @override - String toString() => 'BulkIdsDto[ids=$ids]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [BulkIdsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static BulkIdsDto? fromJson(dynamic value) { - upgradeDto(value, "BulkIdsDto"); - if (value is Map) { - final json = value.cast(); - - return BulkIdsDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = BulkIdsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = BulkIdsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of BulkIdsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = BulkIdsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/calendar_heatmap_response_dto.dart b/mobile/openapi/lib/model/calendar_heatmap_response_dto.dart deleted file mode 100644 index 2da9c411d4..0000000000 --- a/mobile/openapi/lib/model/calendar_heatmap_response_dto.dart +++ /dev/null @@ -1,129 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CalendarHeatmapResponseDto { - /// Returns a new [CalendarHeatmapResponseDto] instance. - CalendarHeatmapResponseDto({ - required this.from, - this.series = const [], - required this.to, - required this.totalCount, - }); - - /// Start date in UTC - String from; - - List series; - - /// End date in UTC - String to; - - /// Total activity count over the period - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int totalCount; - - @override - bool operator ==(Object other) => identical(this, other) || other is CalendarHeatmapResponseDto && - other.from == from && - _deepEquality.equals(other.series, series) && - other.to == to && - other.totalCount == totalCount; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (from.hashCode) + - (series.hashCode) + - (to.hashCode) + - (totalCount.hashCode); - - @override - String toString() => 'CalendarHeatmapResponseDto[from=$from, series=$series, to=$to, totalCount=$totalCount]'; - - Map toJson() { - final json = {}; - json[r'from'] = this.from; - json[r'series'] = this.series; - json[r'to'] = this.to; - json[r'totalCount'] = this.totalCount; - return json; - } - - /// Returns a new [CalendarHeatmapResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CalendarHeatmapResponseDto? fromJson(dynamic value) { - upgradeDto(value, "CalendarHeatmapResponseDto"); - if (value is Map) { - final json = value.cast(); - - return CalendarHeatmapResponseDto( - from: mapValueOfType(json, r'from')!, - series: CalendarHeatmapResponseDtoSeriesInner.listFromJson(json[r'series']), - to: mapValueOfType(json, r'to')!, - totalCount: mapValueOfType(json, r'totalCount')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CalendarHeatmapResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CalendarHeatmapResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CalendarHeatmapResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CalendarHeatmapResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'from', - 'series', - 'to', - 'totalCount', - }; -} - diff --git a/mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart b/mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart deleted file mode 100644 index d1bdd467d4..0000000000 --- a/mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CalendarHeatmapResponseDtoSeriesInner { - /// Returns a new [CalendarHeatmapResponseDtoSeriesInner] instance. - CalendarHeatmapResponseDtoSeriesInner({ - required this.count, - required this.date, - }); - - /// Activity count - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - /// Date in UTC - String date; - - @override - bool operator ==(Object other) => identical(this, other) || other is CalendarHeatmapResponseDtoSeriesInner && - other.count == count && - other.date == date; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (date.hashCode); - - @override - String toString() => 'CalendarHeatmapResponseDtoSeriesInner[count=$count, date=$date]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'date'] = this.date; - return json; - } - - /// Returns a new [CalendarHeatmapResponseDtoSeriesInner] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CalendarHeatmapResponseDtoSeriesInner? fromJson(dynamic value) { - upgradeDto(value, "CalendarHeatmapResponseDtoSeriesInner"); - if (value is Map) { - final json = value.cast(); - - return CalendarHeatmapResponseDtoSeriesInner( - count: mapValueOfType(json, r'count')!, - date: mapValueOfType(json, r'date')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CalendarHeatmapResponseDtoSeriesInner.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CalendarHeatmapResponseDtoSeriesInner.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CalendarHeatmapResponseDtoSeriesInner-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CalendarHeatmapResponseDtoSeriesInner.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'date', - }; -} - diff --git a/mobile/openapi/lib/model/calendar_heatmap_type.dart b/mobile/openapi/lib/model/calendar_heatmap_type.dart deleted file mode 100644 index d34bc8d699..0000000000 --- a/mobile/openapi/lib/model/calendar_heatmap_type.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Type of calendar heatmap -enum CalendarHeatmapType { - upload._(r'Upload'), - taken._(r'Taken'), - ; - - /// Instantiate a new enum with the provided value. - const CalendarHeatmapType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [CalendarHeatmapType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static CalendarHeatmapType? fromJson(dynamic value) => CalendarHeatmapTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [CalendarHeatmapType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CalendarHeatmapType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [CalendarHeatmapType] to String, -/// and [decode] dynamic data back to [CalendarHeatmapType]. -class CalendarHeatmapTypeTypeTransformer { - factory CalendarHeatmapTypeTypeTransformer() => _instance ??= const CalendarHeatmapTypeTypeTransformer._(); - - const CalendarHeatmapTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(CalendarHeatmapType data) => data._value; - - /// Returns the instance of [CalendarHeatmapType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - CalendarHeatmapType? decode(dynamic data, {bool allowNull = true}) { - if (data is CalendarHeatmapType) { - return data; - } - if (data != null) { - switch (data) { - case r'Upload': return CalendarHeatmapType.upload; - case r'Taken': return CalendarHeatmapType.taken; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static CalendarHeatmapTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/cast_response.dart b/mobile/openapi/lib/model/cast_response.dart deleted file mode 100644 index 796138b0bf..0000000000 --- a/mobile/openapi/lib/model/cast_response.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CastResponse { - /// Returns a new [CastResponse] instance. - CastResponse({ - required this.gCastEnabled, - }); - - /// Whether Google Cast is enabled - bool gCastEnabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is CastResponse && - other.gCastEnabled == gCastEnabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (gCastEnabled.hashCode); - - @override - String toString() => 'CastResponse[gCastEnabled=$gCastEnabled]'; - - Map toJson() { - final json = {}; - json[r'gCastEnabled'] = this.gCastEnabled; - return json; - } - - /// Returns a new [CastResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CastResponse? fromJson(dynamic value) { - upgradeDto(value, "CastResponse"); - if (value is Map) { - final json = value.cast(); - - return CastResponse( - gCastEnabled: mapValueOfType(json, r'gCastEnabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CastResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CastResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CastResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CastResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'gCastEnabled', - }; -} - diff --git a/mobile/openapi/lib/model/cast_update.dart b/mobile/openapi/lib/model/cast_update.dart deleted file mode 100644 index f9eb5be382..0000000000 --- a/mobile/openapi/lib/model/cast_update.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CastUpdate { - /// Returns a new [CastUpdate] instance. - CastUpdate({ - this.gCastEnabled = const Optional.absent(), - }); - - /// Whether Google Cast is enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional gCastEnabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is CastUpdate && - other.gCastEnabled == gCastEnabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (gCastEnabled == null ? 0 : gCastEnabled!.hashCode); - - @override - String toString() => 'CastUpdate[gCastEnabled=$gCastEnabled]'; - - Map toJson() { - final json = {}; - if (this.gCastEnabled.isPresent) { - final value = this.gCastEnabled.value; - json[r'gCastEnabled'] = value; - } - return json; - } - - /// Returns a new [CastUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CastUpdate? fromJson(dynamic value) { - upgradeDto(value, "CastUpdate"); - if (value is Map) { - final json = value.cast(); - - return CastUpdate( - gCastEnabled: json.containsKey(r'gCastEnabled') ? Optional.present(mapValueOfType(json, r'gCastEnabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CastUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CastUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CastUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CastUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/change_password_dto.dart b/mobile/openapi/lib/model/change_password_dto.dart deleted file mode 100644 index 369e960dac..0000000000 --- a/mobile/openapi/lib/model/change_password_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ChangePasswordDto { - /// Returns a new [ChangePasswordDto] instance. - ChangePasswordDto({ - this.invalidateSessions = const Optional.present(false), - required this.newPassword, - required this.password, - }); - - /// Invalidate all other sessions - Optional invalidateSessions; - - /// New password (min 8 characters) - String newPassword; - - /// Current password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is ChangePasswordDto && - other.invalidateSessions == invalidateSessions && - other.newPassword == newPassword && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (invalidateSessions.hashCode) + - (newPassword.hashCode) + - (password.hashCode); - - @override - String toString() => 'ChangePasswordDto[invalidateSessions=$invalidateSessions, newPassword=$newPassword, password=$password]'; - - Map toJson() { - final json = {}; - if (this.invalidateSessions.isPresent) { - final value = this.invalidateSessions.value; - json[r'invalidateSessions'] = value; - } - json[r'newPassword'] = this.newPassword; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [ChangePasswordDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ChangePasswordDto? fromJson(dynamic value) { - upgradeDto(value, "ChangePasswordDto"); - if (value is Map) { - final json = value.cast(); - - return ChangePasswordDto( - invalidateSessions: json.containsKey(r'invalidateSessions') ? Optional.present(mapValueOfType(json, r'invalidateSessions')) : const Optional.absent(), - newPassword: mapValueOfType(json, r'newPassword')!, - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ChangePasswordDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ChangePasswordDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ChangePasswordDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ChangePasswordDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'newPassword', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/clip_config.dart b/mobile/openapi/lib/model/clip_config.dart deleted file mode 100644 index 915e4975ed..0000000000 --- a/mobile/openapi/lib/model/clip_config.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CLIPConfig { - /// Returns a new [CLIPConfig] instance. - CLIPConfig({ - required this.enabled, - required this.modelName, - }); - - /// Whether the task is enabled - bool enabled; - - /// Name of the model to use - String modelName; - - @override - bool operator ==(Object other) => identical(this, other) || other is CLIPConfig && - other.enabled == enabled && - other.modelName == modelName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (modelName.hashCode); - - @override - String toString() => 'CLIPConfig[enabled=$enabled, modelName=$modelName]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'modelName'] = this.modelName; - return json; - } - - /// Returns a new [CLIPConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CLIPConfig? fromJson(dynamic value) { - upgradeDto(value, "CLIPConfig"); - if (value is Map) { - final json = value.cast(); - - return CLIPConfig( - enabled: mapValueOfType(json, r'enabled')!, - modelName: mapValueOfType(json, r'modelName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CLIPConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CLIPConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CLIPConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CLIPConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'modelName', - }; -} - diff --git a/mobile/openapi/lib/model/colorspace.dart b/mobile/openapi/lib/model/colorspace.dart deleted file mode 100644 index c97da27dda..0000000000 --- a/mobile/openapi/lib/model/colorspace.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Colorspace -enum Colorspace { - srgb._(r'srgb'), - p3._(r'p3'), - ; - - /// Instantiate a new enum with the provided value. - const Colorspace._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [Colorspace] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static Colorspace? fromJson(dynamic value) => ColorspaceTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [Colorspace] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = Colorspace.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [Colorspace] to String, -/// and [decode] dynamic data back to [Colorspace]. -class ColorspaceTypeTransformer { - factory ColorspaceTypeTransformer() => _instance ??= const ColorspaceTypeTransformer._(); - - const ColorspaceTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(Colorspace data) => data._value; - - /// Returns the instance of [Colorspace] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - Colorspace? decode(dynamic data, {bool allowNull = true}) { - if (data is Colorspace) { - return data; - } - if (data != null) { - switch (data) { - case r'srgb': return Colorspace.srgb; - case r'p3': return Colorspace.p3; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ColorspaceTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/contributor_count_response_dto.dart b/mobile/openapi/lib/model/contributor_count_response_dto.dart deleted file mode 100644 index af5b2cbf68..0000000000 --- a/mobile/openapi/lib/model/contributor_count_response_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ContributorCountResponseDto { - /// Returns a new [ContributorCountResponseDto] instance. - ContributorCountResponseDto({ - required this.assetCount, - required this.userId, - }); - - /// Number of assets contributed - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int assetCount; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is ContributorCountResponseDto && - other.assetCount == assetCount && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetCount.hashCode) + - (userId.hashCode); - - @override - String toString() => 'ContributorCountResponseDto[assetCount=$assetCount, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'assetCount'] = this.assetCount; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [ContributorCountResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ContributorCountResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ContributorCountResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ContributorCountResponseDto( - assetCount: mapValueOfType(json, r'assetCount')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ContributorCountResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ContributorCountResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ContributorCountResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ContributorCountResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetCount', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/cq_mode.dart b/mobile/openapi/lib/model/cq_mode.dart deleted file mode 100644 index 906657aced..0000000000 --- a/mobile/openapi/lib/model/cq_mode.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// CQ mode -enum CQMode { - auto._(r'auto'), - cqp._(r'cqp'), - icq._(r'icq'), - ; - - /// Instantiate a new enum with the provided value. - const CQMode._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [CQMode] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static CQMode? fromJson(dynamic value) => CQModeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [CQMode] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CQMode.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [CQMode] to String, -/// and [decode] dynamic data back to [CQMode]. -class CQModeTypeTransformer { - factory CQModeTypeTransformer() => _instance ??= const CQModeTypeTransformer._(); - - const CQModeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(CQMode data) => data._value; - - /// Returns the instance of [CQMode] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - CQMode? decode(dynamic data, {bool allowNull = true}) { - if (data is CQMode) { - return data; - } - if (data != null) { - switch (data) { - case r'auto': return CQMode.auto; - case r'cqp': return CQMode.cqp; - case r'icq': return CQMode.icq; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static CQModeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/create_album_dto.dart b/mobile/openapi/lib/model/create_album_dto.dart deleted file mode 100644 index a028146964..0000000000 --- a/mobile/openapi/lib/model/create_album_dto.dart +++ /dev/null @@ -1,141 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CreateAlbumDto { - /// Returns a new [CreateAlbumDto] instance. - CreateAlbumDto({ - required this.albumName, - this.albumUsers = const Optional.present(const []), - this.assetIds = const Optional.present(const []), - this.description = const Optional.absent(), - }); - - /// Album name - String albumName; - - /// Album users - Optional?> albumUsers; - - /// Initial asset IDs - Optional?> assetIds; - - /// Album description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - @override - bool operator ==(Object other) => identical(this, other) || other is CreateAlbumDto && - other.albumName == albumName && - _deepEquality.equals(other.albumUsers, albumUsers) && - _deepEquality.equals(other.assetIds, assetIds) && - other.description == description; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName.hashCode) + - (albumUsers.hashCode) + - (assetIds.hashCode) + - (description == null ? 0 : description!.hashCode); - - @override - String toString() => 'CreateAlbumDto[albumName=$albumName, albumUsers=$albumUsers, assetIds=$assetIds, description=$description]'; - - Map toJson() { - final json = {}; - json[r'albumName'] = this.albumName; - if (this.albumUsers.isPresent) { - final value = this.albumUsers.value; - json[r'albumUsers'] = value; - } - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - return json; - } - - /// Returns a new [CreateAlbumDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CreateAlbumDto? fromJson(dynamic value) { - upgradeDto(value, "CreateAlbumDto"); - if (value is Map) { - final json = value.cast(); - - return CreateAlbumDto( - albumName: mapValueOfType(json, r'albumName')!, - albumUsers: json.containsKey(r'albumUsers') ? Optional.present(AlbumUserCreateDto.listFromJson(json[r'albumUsers'])) : const Optional.absent(), - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CreateAlbumDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CreateAlbumDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CreateAlbumDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CreateAlbumDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumName', - }; -} - diff --git a/mobile/openapi/lib/model/create_library_dto.dart b/mobile/openapi/lib/model/create_library_dto.dart deleted file mode 100644 index 61eb9867b8..0000000000 --- a/mobile/openapi/lib/model/create_library_dto.dart +++ /dev/null @@ -1,143 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CreateLibraryDto { - /// Returns a new [CreateLibraryDto] instance. - CreateLibraryDto({ - this.exclusionPatterns = const Optional.present(const []), - this.importPaths = const Optional.present(const []), - this.name = const Optional.absent(), - required this.ownerId, - }); - - /// Exclusion patterns (max 128) - Optional?> exclusionPatterns; - - /// Import paths (max 128) - Optional?> importPaths; - - /// Library name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// Owner user ID - String ownerId; - - @override - bool operator ==(Object other) => identical(this, other) || other is CreateLibraryDto && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - _deepEquality.equals(other.importPaths, importPaths) && - other.name == name && - other.ownerId == ownerId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (exclusionPatterns.hashCode) + - (importPaths.hashCode) + - (name == null ? 0 : name!.hashCode) + - (ownerId.hashCode); - - @override - String toString() => 'CreateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, name=$name, ownerId=$ownerId]'; - - Map toJson() { - final json = {}; - if (this.exclusionPatterns.isPresent) { - final value = this.exclusionPatterns.value; - json[r'exclusionPatterns'] = value; - } - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - json[r'ownerId'] = this.ownerId; - return json; - } - - /// Returns a new [CreateLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CreateLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "CreateLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return CreateLibraryDto( - exclusionPatterns: json.containsKey(r'exclusionPatterns') ? Optional.present(json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - importPaths: json.containsKey(r'importPaths') ? Optional.present(json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ownerId: mapValueOfType(json, r'ownerId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CreateLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CreateLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CreateLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CreateLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ownerId', - }; -} - diff --git a/mobile/openapi/lib/model/create_profile_image_response_dto.dart b/mobile/openapi/lib/model/create_profile_image_response_dto.dart deleted file mode 100644 index 68700400e4..0000000000 --- a/mobile/openapi/lib/model/create_profile_image_response_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CreateProfileImageResponseDto { - /// Returns a new [CreateProfileImageResponseDto] instance. - CreateProfileImageResponseDto({ - required this.profileChangedAt, - required this.profileImagePath, - required this.userId, - }); - - /// Profile image change date - DateTime profileChangedAt; - - /// Profile image file path - String profileImagePath; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is CreateProfileImageResponseDto && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (profileChangedAt.hashCode) + - (profileImagePath.hashCode) + - (userId.hashCode); - - @override - String toString() => 'CreateProfileImageResponseDto[profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'profileChangedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.profileChangedAt.millisecondsSinceEpoch - : this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [CreateProfileImageResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CreateProfileImageResponseDto? fromJson(dynamic value) { - upgradeDto(value, "CreateProfileImageResponseDto"); - if (value is Map) { - final json = value.cast(); - - return CreateProfileImageResponseDto( - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CreateProfileImageResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CreateProfileImageResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CreateProfileImageResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CreateProfileImageResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'profileChangedAt', - 'profileImagePath', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/crop_parameters.dart b/mobile/openapi/lib/model/crop_parameters.dart deleted file mode 100644 index d19c23562b..0000000000 --- a/mobile/openapi/lib/model/crop_parameters.dart +++ /dev/null @@ -1,139 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CropParameters { - /// Returns a new [CropParameters] instance. - CropParameters({ - required this.height, - required this.width, - required this.x, - required this.y, - }); - - /// Height of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int height; - - /// Width of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int width; - - /// Top-Left X coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int x; - - /// Top-Left Y coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int y; - - @override - bool operator ==(Object other) => identical(this, other) || other is CropParameters && - other.height == height && - other.width == width && - other.x == x && - other.y == y; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (height.hashCode) + - (width.hashCode) + - (x.hashCode) + - (y.hashCode); - - @override - String toString() => 'CropParameters[height=$height, width=$width, x=$x, y=$y]'; - - Map toJson() { - final json = {}; - json[r'height'] = this.height; - json[r'width'] = this.width; - json[r'x'] = this.x; - json[r'y'] = this.y; - return json; - } - - /// Returns a new [CropParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CropParameters? fromJson(dynamic value) { - upgradeDto(value, "CropParameters"); - if (value is Map) { - final json = value.cast(); - - return CropParameters( - height: mapValueOfType(json, r'height')!, - width: mapValueOfType(json, r'width')!, - x: mapValueOfType(json, r'x')!, - y: mapValueOfType(json, r'y')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CropParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CropParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CropParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CropParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'height', - 'width', - 'x', - 'y', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_config.dart b/mobile/openapi/lib/model/database_backup_config.dart deleted file mode 100644 index 4beb32849e..0000000000 --- a/mobile/openapi/lib/model/database_backup_config.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DatabaseBackupConfig { - /// Returns a new [DatabaseBackupConfig] instance. - DatabaseBackupConfig({ - required this.cronExpression, - required this.enabled, - required this.keepLastAmount, - }); - - /// Cron expression - String cronExpression; - - /// Enabled - bool enabled; - - /// Keep last amount - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int keepLastAmount; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupConfig && - other.cronExpression == cronExpression && - other.enabled == enabled && - other.keepLastAmount == keepLastAmount; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode) + - (keepLastAmount.hashCode); - - @override - String toString() => 'DatabaseBackupConfig[cronExpression=$cronExpression, enabled=$enabled, keepLastAmount=$keepLastAmount]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - json[r'keepLastAmount'] = this.keepLastAmount; - return json; - } - - /// Returns a new [DatabaseBackupConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupConfig? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupConfig"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupConfig( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - keepLastAmount: mapValueOfType(json, r'keepLastAmount')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - 'keepLastAmount', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_delete_dto.dart b/mobile/openapi/lib/model/database_backup_delete_dto.dart deleted file mode 100644 index c336270b84..0000000000 --- a/mobile/openapi/lib/model/database_backup_delete_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DatabaseBackupDeleteDto { - /// Returns a new [DatabaseBackupDeleteDto] instance. - DatabaseBackupDeleteDto({ - this.backups = const [], - }); - - /// Backup filenames to delete - List backups; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupDeleteDto && - _deepEquality.equals(other.backups, backups); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backups.hashCode); - - @override - String toString() => 'DatabaseBackupDeleteDto[backups=$backups]'; - - Map toJson() { - final json = {}; - json[r'backups'] = this.backups; - return json; - } - - /// Returns a new [DatabaseBackupDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupDeleteDto( - backups: json[r'backups'] is Iterable - ? (json[r'backups'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backups', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_dto.dart b/mobile/openapi/lib/model/database_backup_dto.dart deleted file mode 100644 index 5a2590da40..0000000000 --- a/mobile/openapi/lib/model/database_backup_dto.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DatabaseBackupDto { - /// Returns a new [DatabaseBackupDto] instance. - DatabaseBackupDto({ - required this.filename, - required this.filesize, - required this.timezone, - }); - - /// Backup filename - String filename; - - /// Backup file size - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int filesize; - - /// Backup timezone - String timezone; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupDto && - other.filename == filename && - other.filesize == filesize && - other.timezone == timezone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (filename.hashCode) + - (filesize.hashCode) + - (timezone.hashCode); - - @override - String toString() => 'DatabaseBackupDto[filename=$filename, filesize=$filesize, timezone=$timezone]'; - - Map toJson() { - final json = {}; - json[r'filename'] = this.filename; - json[r'filesize'] = this.filesize; - json[r'timezone'] = this.timezone; - return json; - } - - /// Returns a new [DatabaseBackupDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupDto? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupDto"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupDto( - filename: mapValueOfType(json, r'filename')!, - filesize: mapValueOfType(json, r'filesize')!, - timezone: mapValueOfType(json, r'timezone')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'filename', - 'filesize', - 'timezone', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_list_response_dto.dart b/mobile/openapi/lib/model/database_backup_list_response_dto.dart deleted file mode 100644 index de7bf78d5a..0000000000 --- a/mobile/openapi/lib/model/database_backup_list_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DatabaseBackupListResponseDto { - /// Returns a new [DatabaseBackupListResponseDto] instance. - DatabaseBackupListResponseDto({ - this.backups = const [], - }); - - /// List of backups - List backups; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupListResponseDto && - _deepEquality.equals(other.backups, backups); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backups.hashCode); - - @override - String toString() => 'DatabaseBackupListResponseDto[backups=$backups]'; - - Map toJson() { - final json = {}; - json[r'backups'] = this.backups; - return json; - } - - /// Returns a new [DatabaseBackupListResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupListResponseDto? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupListResponseDto"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupListResponseDto( - backups: DatabaseBackupDto.listFromJson(json[r'backups']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupListResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupListResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupListResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupListResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backups', - }; -} - diff --git a/mobile/openapi/lib/model/download_archive_dto.dart b/mobile/openapi/lib/model/download_archive_dto.dart deleted file mode 100644 index f89ac8c867..0000000000 --- a/mobile/openapi/lib/model/download_archive_dto.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadArchiveDto { - /// Returns a new [DownloadArchiveDto] instance. - DownloadArchiveDto({ - this.assetIds = const [], - this.edited = const Optional.absent(), - }); - - /// Asset IDs - List assetIds; - - /// Download edited asset if available - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional edited; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadArchiveDto && - _deepEquality.equals(other.assetIds, assetIds) && - other.edited == edited; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (edited == null ? 0 : edited!.hashCode); - - @override - String toString() => 'DownloadArchiveDto[assetIds=$assetIds, edited=$edited]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - if (this.edited.isPresent) { - final value = this.edited.value; - json[r'edited'] = value; - } - return json; - } - - /// Returns a new [DownloadArchiveDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadArchiveDto? fromJson(dynamic value) { - upgradeDto(value, "DownloadArchiveDto"); - if (value is Map) { - final json = value.cast(); - - return DownloadArchiveDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - edited: json.containsKey(r'edited') ? Optional.present(mapValueOfType(json, r'edited')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadArchiveDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadArchiveDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadArchiveDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadArchiveDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/download_archive_info.dart b/mobile/openapi/lib/model/download_archive_info.dart deleted file mode 100644 index dcb1258457..0000000000 --- a/mobile/openapi/lib/model/download_archive_info.dart +++ /dev/null @@ -1,114 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadArchiveInfo { - /// Returns a new [DownloadArchiveInfo] instance. - DownloadArchiveInfo({ - this.assetIds = const [], - required this.size, - }); - - /// Asset IDs in this archive - List assetIds; - - /// Archive size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int size; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadArchiveInfo && - _deepEquality.equals(other.assetIds, assetIds) && - other.size == size; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (size.hashCode); - - @override - String toString() => 'DownloadArchiveInfo[assetIds=$assetIds, size=$size]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - json[r'size'] = this.size; - return json; - } - - /// Returns a new [DownloadArchiveInfo] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadArchiveInfo? fromJson(dynamic value) { - upgradeDto(value, "DownloadArchiveInfo"); - if (value is Map) { - final json = value.cast(); - - return DownloadArchiveInfo( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - size: mapValueOfType(json, r'size')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadArchiveInfo.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadArchiveInfo.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadArchiveInfo-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadArchiveInfo.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - 'size', - }; -} - diff --git a/mobile/openapi/lib/model/download_info_dto.dart b/mobile/openapi/lib/model/download_info_dto.dart deleted file mode 100644 index 47e09de05a..0000000000 --- a/mobile/openapi/lib/model/download_info_dto.dart +++ /dev/null @@ -1,158 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadInfoDto { - /// Returns a new [DownloadInfoDto] instance. - DownloadInfoDto({ - this.albumId = const Optional.absent(), - this.archiveSize = const Optional.absent(), - this.assetIds = const Optional.present(const []), - this.userId = const Optional.absent(), - }); - - /// Album ID to download - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumId; - - /// Archive size limit in bytes - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional archiveSize; - - /// Asset IDs to download - Optional?> assetIds; - - /// User ID to download assets from - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadInfoDto && - other.albumId == albumId && - other.archiveSize == archiveSize && - _deepEquality.equals(other.assetIds, assetIds) && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId == null ? 0 : albumId!.hashCode) + - (archiveSize == null ? 0 : archiveSize!.hashCode) + - (assetIds.hashCode) + - (userId == null ? 0 : userId!.hashCode); - - @override - String toString() => 'DownloadInfoDto[albumId=$albumId, archiveSize=$archiveSize, assetIds=$assetIds, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.albumId.isPresent) { - final value = this.albumId.value; - json[r'albumId'] = value; - } - if (this.archiveSize.isPresent) { - final value = this.archiveSize.value; - json[r'archiveSize'] = value; - } - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - if (this.userId.isPresent) { - final value = this.userId.value; - json[r'userId'] = value; - } - return json; - } - - /// Returns a new [DownloadInfoDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadInfoDto? fromJson(dynamic value) { - upgradeDto(value, "DownloadInfoDto"); - if (value is Map) { - final json = value.cast(); - - return DownloadInfoDto( - albumId: json.containsKey(r'albumId') ? Optional.present(mapValueOfType(json, r'albumId')) : const Optional.absent(), - archiveSize: json.containsKey(r'archiveSize') ? Optional.present(json[r'archiveSize'] == null ? null : int.parse('${json[r'archiveSize']}')) : const Optional.absent(), - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - userId: json.containsKey(r'userId') ? Optional.present(mapValueOfType(json, r'userId')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadInfoDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadInfoDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadInfoDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadInfoDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/download_response.dart b/mobile/openapi/lib/model/download_response.dart deleted file mode 100644 index bc1d7b4047..0000000000 --- a/mobile/openapi/lib/model/download_response.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadResponse { - /// Returns a new [DownloadResponse] instance. - DownloadResponse({ - required this.archiveSize, - required this.includeEmbeddedVideos, - }); - - /// Maximum archive size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int archiveSize; - - /// Whether to include embedded videos in downloads - bool includeEmbeddedVideos; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadResponse && - other.archiveSize == archiveSize && - other.includeEmbeddedVideos == includeEmbeddedVideos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (archiveSize.hashCode) + - (includeEmbeddedVideos.hashCode); - - @override - String toString() => 'DownloadResponse[archiveSize=$archiveSize, includeEmbeddedVideos=$includeEmbeddedVideos]'; - - Map toJson() { - final json = {}; - json[r'archiveSize'] = this.archiveSize; - json[r'includeEmbeddedVideos'] = this.includeEmbeddedVideos; - return json; - } - - /// Returns a new [DownloadResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadResponse? fromJson(dynamic value) { - upgradeDto(value, "DownloadResponse"); - if (value is Map) { - final json = value.cast(); - - return DownloadResponse( - archiveSize: mapValueOfType(json, r'archiveSize')!, - includeEmbeddedVideos: mapValueOfType(json, r'includeEmbeddedVideos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'archiveSize', - 'includeEmbeddedVideos', - }; -} - diff --git a/mobile/openapi/lib/model/download_response_dto.dart b/mobile/openapi/lib/model/download_response_dto.dart deleted file mode 100644 index bfe32307fa..0000000000 --- a/mobile/openapi/lib/model/download_response_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadResponseDto { - /// Returns a new [DownloadResponseDto] instance. - DownloadResponseDto({ - this.archives = const [], - required this.totalSize, - }); - - /// Archive information - List archives; - - /// Total size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int totalSize; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadResponseDto && - _deepEquality.equals(other.archives, archives) && - other.totalSize == totalSize; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (archives.hashCode) + - (totalSize.hashCode); - - @override - String toString() => 'DownloadResponseDto[archives=$archives, totalSize=$totalSize]'; - - Map toJson() { - final json = {}; - json[r'archives'] = this.archives; - json[r'totalSize'] = this.totalSize; - return json; - } - - /// Returns a new [DownloadResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadResponseDto? fromJson(dynamic value) { - upgradeDto(value, "DownloadResponseDto"); - if (value is Map) { - final json = value.cast(); - - return DownloadResponseDto( - archives: DownloadArchiveInfo.listFromJson(json[r'archives']), - totalSize: mapValueOfType(json, r'totalSize')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'archives', - 'totalSize', - }; -} - diff --git a/mobile/openapi/lib/model/download_update.dart b/mobile/openapi/lib/model/download_update.dart deleted file mode 100644 index 08369ef0fb..0000000000 --- a/mobile/openapi/lib/model/download_update.dart +++ /dev/null @@ -1,128 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadUpdate { - /// Returns a new [DownloadUpdate] instance. - DownloadUpdate({ - this.archiveSize = const Optional.absent(), - this.includeEmbeddedVideos = const Optional.absent(), - }); - - /// Maximum archive size in bytes - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional archiveSize; - - /// Whether to include embedded videos in downloads - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional includeEmbeddedVideos; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadUpdate && - other.archiveSize == archiveSize && - other.includeEmbeddedVideos == includeEmbeddedVideos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (archiveSize == null ? 0 : archiveSize!.hashCode) + - (includeEmbeddedVideos == null ? 0 : includeEmbeddedVideos!.hashCode); - - @override - String toString() => 'DownloadUpdate[archiveSize=$archiveSize, includeEmbeddedVideos=$includeEmbeddedVideos]'; - - Map toJson() { - final json = {}; - if (this.archiveSize.isPresent) { - final value = this.archiveSize.value; - json[r'archiveSize'] = value; - } - if (this.includeEmbeddedVideos.isPresent) { - final value = this.includeEmbeddedVideos.value; - json[r'includeEmbeddedVideos'] = value; - } - return json; - } - - /// Returns a new [DownloadUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadUpdate? fromJson(dynamic value) { - upgradeDto(value, "DownloadUpdate"); - if (value is Map) { - final json = value.cast(); - - return DownloadUpdate( - archiveSize: json.containsKey(r'archiveSize') ? Optional.present(json[r'archiveSize'] == null ? null : int.parse('${json[r'archiveSize']}')) : const Optional.absent(), - includeEmbeddedVideos: json.containsKey(r'includeEmbeddedVideos') ? Optional.present(mapValueOfType(json, r'includeEmbeddedVideos')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_detection_config.dart b/mobile/openapi/lib/model/duplicate_detection_config.dart deleted file mode 100644 index d0f016a4f3..0000000000 --- a/mobile/openapi/lib/model/duplicate_detection_config.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DuplicateDetectionConfig { - /// Returns a new [DuplicateDetectionConfig] instance. - DuplicateDetectionConfig({ - required this.enabled, - required this.maxDistance, - }); - - /// Whether the task is enabled - bool enabled; - - /// Maximum distance threshold for duplicate detection - /// - /// Minimum value: 0.001 - /// Maximum value: 0.1 - double maxDistance; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateDetectionConfig && - other.enabled == enabled && - other.maxDistance == maxDistance; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (maxDistance.hashCode); - - @override - String toString() => 'DuplicateDetectionConfig[enabled=$enabled, maxDistance=$maxDistance]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'maxDistance'] = this.maxDistance; - return json; - } - - /// Returns a new [DuplicateDetectionConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateDetectionConfig? fromJson(dynamic value) { - upgradeDto(value, "DuplicateDetectionConfig"); - if (value is Map) { - final json = value.cast(); - - return DuplicateDetectionConfig( - enabled: mapValueOfType(json, r'enabled')!, - maxDistance: mapValueOfType(json, r'maxDistance')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateDetectionConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateDetectionConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateDetectionConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateDetectionConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'maxDistance', - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_resolve_dto.dart b/mobile/openapi/lib/model/duplicate_resolve_dto.dart deleted file mode 100644 index 3466d3a620..0000000000 --- a/mobile/openapi/lib/model/duplicate_resolve_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DuplicateResolveDto { - /// Returns a new [DuplicateResolveDto] instance. - DuplicateResolveDto({ - this.groups = const [], - }); - - /// List of duplicate groups to resolve - List groups; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateResolveDto && - _deepEquality.equals(other.groups, groups); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (groups.hashCode); - - @override - String toString() => 'DuplicateResolveDto[groups=$groups]'; - - Map toJson() { - final json = {}; - json[r'groups'] = this.groups; - return json; - } - - /// Returns a new [DuplicateResolveDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateResolveDto? fromJson(dynamic value) { - upgradeDto(value, "DuplicateResolveDto"); - if (value is Map) { - final json = value.cast(); - - return DuplicateResolveDto( - groups: DuplicateResolveGroupDto.listFromJson(json[r'groups']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateResolveDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateResolveDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateResolveDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateResolveDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'groups', - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_resolve_group_dto.dart b/mobile/openapi/lib/model/duplicate_resolve_group_dto.dart deleted file mode 100644 index 94ca53eb7d..0000000000 --- a/mobile/openapi/lib/model/duplicate_resolve_group_dto.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DuplicateResolveGroupDto { - /// Returns a new [DuplicateResolveGroupDto] instance. - DuplicateResolveGroupDto({ - required this.duplicateId, - this.keepAssetIds = const [], - this.trashAssetIds = const [], - }); - - String duplicateId; - - /// Asset IDs to keep - List keepAssetIds; - - /// Asset IDs to trash or delete - List trashAssetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateResolveGroupDto && - other.duplicateId == duplicateId && - _deepEquality.equals(other.keepAssetIds, keepAssetIds) && - _deepEquality.equals(other.trashAssetIds, trashAssetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (duplicateId.hashCode) + - (keepAssetIds.hashCode) + - (trashAssetIds.hashCode); - - @override - String toString() => 'DuplicateResolveGroupDto[duplicateId=$duplicateId, keepAssetIds=$keepAssetIds, trashAssetIds=$trashAssetIds]'; - - Map toJson() { - final json = {}; - json[r'duplicateId'] = this.duplicateId; - json[r'keepAssetIds'] = this.keepAssetIds; - json[r'trashAssetIds'] = this.trashAssetIds; - return json; - } - - /// Returns a new [DuplicateResolveGroupDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateResolveGroupDto? fromJson(dynamic value) { - upgradeDto(value, "DuplicateResolveGroupDto"); - if (value is Map) { - final json = value.cast(); - - return DuplicateResolveGroupDto( - duplicateId: mapValueOfType(json, r'duplicateId')!, - keepAssetIds: json[r'keepAssetIds'] is Iterable - ? (json[r'keepAssetIds'] as Iterable).cast().toList(growable: false) - : const [], - trashAssetIds: json[r'trashAssetIds'] is Iterable - ? (json[r'trashAssetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateResolveGroupDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateResolveGroupDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateResolveGroupDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateResolveGroupDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'duplicateId', - 'keepAssetIds', - 'trashAssetIds', - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_response_dto.dart b/mobile/openapi/lib/model/duplicate_response_dto.dart deleted file mode 100644 index f0ddbb4fdd..0000000000 --- a/mobile/openapi/lib/model/duplicate_response_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DuplicateResponseDto { - /// Returns a new [DuplicateResponseDto] instance. - DuplicateResponseDto({ - this.assets = const [], - required this.duplicateId, - this.suggestedKeepAssetIds = const [], - }); - - /// Duplicate assets - List assets; - - /// Duplicate group ID - String duplicateId; - - /// Suggested asset IDs to keep based on file size and EXIF data - List suggestedKeepAssetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateResponseDto && - _deepEquality.equals(other.assets, assets) && - other.duplicateId == duplicateId && - _deepEquality.equals(other.suggestedKeepAssetIds, suggestedKeepAssetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (duplicateId.hashCode) + - (suggestedKeepAssetIds.hashCode); - - @override - String toString() => 'DuplicateResponseDto[assets=$assets, duplicateId=$duplicateId, suggestedKeepAssetIds=$suggestedKeepAssetIds]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'duplicateId'] = this.duplicateId; - json[r'suggestedKeepAssetIds'] = this.suggestedKeepAssetIds; - return json; - } - - /// Returns a new [DuplicateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "DuplicateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return DuplicateResponseDto( - assets: AssetResponseDto.listFromJson(json[r'assets']), - duplicateId: mapValueOfType(json, r'duplicateId')!, - suggestedKeepAssetIds: json[r'suggestedKeepAssetIds'] is Iterable - ? (json[r'suggestedKeepAssetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'duplicateId', - 'suggestedKeepAssetIds', - }; -} - diff --git a/mobile/openapi/lib/model/email_notifications_response.dart b/mobile/openapi/lib/model/email_notifications_response.dart deleted file mode 100644 index 08a3d580c6..0000000000 --- a/mobile/openapi/lib/model/email_notifications_response.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class EmailNotificationsResponse { - /// Returns a new [EmailNotificationsResponse] instance. - EmailNotificationsResponse({ - required this.albumInvite, - required this.albumUpdate, - required this.enabled, - }); - - /// Whether to receive email notifications for album invites - bool albumInvite; - - /// Whether to receive email notifications for album updates - bool albumUpdate; - - /// Whether email notifications are enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is EmailNotificationsResponse && - other.albumInvite == albumInvite && - other.albumUpdate == albumUpdate && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumInvite.hashCode) + - (albumUpdate.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'EmailNotificationsResponse[albumInvite=$albumInvite, albumUpdate=$albumUpdate, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'albumInvite'] = this.albumInvite; - json[r'albumUpdate'] = this.albumUpdate; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [EmailNotificationsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static EmailNotificationsResponse? fromJson(dynamic value) { - upgradeDto(value, "EmailNotificationsResponse"); - if (value is Map) { - final json = value.cast(); - - return EmailNotificationsResponse( - albumInvite: mapValueOfType(json, r'albumInvite')!, - albumUpdate: mapValueOfType(json, r'albumUpdate')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = EmailNotificationsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = EmailNotificationsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of EmailNotificationsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = EmailNotificationsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumInvite', - 'albumUpdate', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/email_notifications_update.dart b/mobile/openapi/lib/model/email_notifications_update.dart deleted file mode 100644 index 89724e0552..0000000000 --- a/mobile/openapi/lib/model/email_notifications_update.dart +++ /dev/null @@ -1,142 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class EmailNotificationsUpdate { - /// Returns a new [EmailNotificationsUpdate] instance. - EmailNotificationsUpdate({ - this.albumInvite = const Optional.absent(), - this.albumUpdate = const Optional.absent(), - this.enabled = const Optional.absent(), - }); - - /// Whether to receive email notifications for album invites - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumInvite; - - /// Whether to receive email notifications for album updates - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumUpdate; - - /// Whether email notifications are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is EmailNotificationsUpdate && - other.albumInvite == albumInvite && - other.albumUpdate == albumUpdate && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumInvite == null ? 0 : albumInvite!.hashCode) + - (albumUpdate == null ? 0 : albumUpdate!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode); - - @override - String toString() => 'EmailNotificationsUpdate[albumInvite=$albumInvite, albumUpdate=$albumUpdate, enabled=$enabled]'; - - Map toJson() { - final json = {}; - if (this.albumInvite.isPresent) { - final value = this.albumInvite.value; - json[r'albumInvite'] = value; - } - if (this.albumUpdate.isPresent) { - final value = this.albumUpdate.value; - json[r'albumUpdate'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - return json; - } - - /// Returns a new [EmailNotificationsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static EmailNotificationsUpdate? fromJson(dynamic value) { - upgradeDto(value, "EmailNotificationsUpdate"); - if (value is Map) { - final json = value.cast(); - - return EmailNotificationsUpdate( - albumInvite: json.containsKey(r'albumInvite') ? Optional.present(mapValueOfType(json, r'albumInvite')) : const Optional.absent(), - albumUpdate: json.containsKey(r'albumUpdate') ? Optional.present(mapValueOfType(json, r'albumUpdate')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = EmailNotificationsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = EmailNotificationsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of EmailNotificationsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = EmailNotificationsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/exif_response_dto.dart b/mobile/openapi/lib/model/exif_response_dto.dart deleted file mode 100644 index 2cec6f5161..0000000000 --- a/mobile/openapi/lib/model/exif_response_dto.dart +++ /dev/null @@ -1,348 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ExifResponseDto { - /// Returns a new [ExifResponseDto] instance. - ExifResponseDto({ - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.dateTimeOriginal = const Optional.absent(), - this.description = const Optional.absent(), - this.exifImageHeight = const Optional.absent(), - this.exifImageWidth = const Optional.absent(), - this.exposureTime = const Optional.absent(), - this.fNumber = const Optional.absent(), - this.fileSizeInByte = const Optional.absent(), - this.focalLength = const Optional.absent(), - this.iso = const Optional.absent(), - this.latitude = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.longitude = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.modifyDate = const Optional.absent(), - this.orientation = const Optional.absent(), - this.projectionType = const Optional.absent(), - this.rating = const Optional.absent(), - this.state = const Optional.absent(), - this.timeZone = const Optional.absent(), - }); - - /// City name - Optional city; - - /// Country name - Optional country; - - /// Original date/time - Optional dateTimeOriginal; - - /// Image description - Optional description; - - /// Image height in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional exifImageHeight; - - /// Image width in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional exifImageWidth; - - /// Exposure time - Optional exposureTime; - - /// F-number (aperture) - Optional fNumber; - - /// File size in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional fileSizeInByte; - - /// Focal length in mm - Optional focalLength; - - /// ISO sensitivity - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - Optional iso; - - /// GPS latitude - Optional latitude; - - /// Lens model - Optional lensModel; - - /// GPS longitude - Optional longitude; - - /// Camera make - Optional make; - - /// Camera model - Optional model; - - /// Modification date/time - Optional modifyDate; - - /// Image orientation - Optional orientation; - - /// Projection type - Optional projectionType; - - /// Rating - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// State/province name - Optional state; - - /// Time zone - Optional timeZone; - - @override - bool operator ==(Object other) => identical(this, other) || other is ExifResponseDto && - other.city == city && - other.country == country && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.exifImageHeight == exifImageHeight && - other.exifImageWidth == exifImageWidth && - other.exposureTime == exposureTime && - other.fNumber == fNumber && - other.fileSizeInByte == fileSizeInByte && - other.focalLength == focalLength && - other.iso == iso && - other.latitude == latitude && - other.lensModel == lensModel && - other.longitude == longitude && - other.make == make && - other.model == model && - other.modifyDate == modifyDate && - other.orientation == orientation && - other.projectionType == projectionType && - other.rating == rating && - other.state == state && - other.timeZone == timeZone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (exifImageHeight == null ? 0 : exifImageHeight!.hashCode) + - (exifImageWidth == null ? 0 : exifImageWidth!.hashCode) + - (exposureTime == null ? 0 : exposureTime!.hashCode) + - (fNumber == null ? 0 : fNumber!.hashCode) + - (fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) + - (focalLength == null ? 0 : focalLength!.hashCode) + - (iso == null ? 0 : iso!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (modifyDate == null ? 0 : modifyDate!.hashCode) + - (orientation == null ? 0 : orientation!.hashCode) + - (projectionType == null ? 0 : projectionType!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode); - - @override - String toString() => 'ExifResponseDto[city=$city, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, iso=$iso, latitude=$latitude, lensModel=$lensModel, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, projectionType=$projectionType, rating=$rating, state=$state, timeZone=$timeZone]'; - - Map toJson() { - final json = {}; - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.dateTimeOriginal.isPresent) { - final value = this.dateTimeOriginal.value; - json[r'dateTimeOriginal'] = value == null ? null : value.toUtc().toIso8601String(); - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.exifImageHeight.isPresent) { - final value = this.exifImageHeight.value; - json[r'exifImageHeight'] = value; - } - if (this.exifImageWidth.isPresent) { - final value = this.exifImageWidth.value; - json[r'exifImageWidth'] = value; - } - if (this.exposureTime.isPresent) { - final value = this.exposureTime.value; - json[r'exposureTime'] = value; - } - if (this.fNumber.isPresent) { - final value = this.fNumber.value; - json[r'fNumber'] = value; - } - if (this.fileSizeInByte.isPresent) { - final value = this.fileSizeInByte.value; - json[r'fileSizeInByte'] = value; - } - if (this.focalLength.isPresent) { - final value = this.focalLength.value; - json[r'focalLength'] = value; - } - if (this.iso.isPresent) { - final value = this.iso.value; - json[r'iso'] = value; - } - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.modifyDate.isPresent) { - final value = this.modifyDate.value; - json[r'modifyDate'] = value == null ? null : value.toUtc().toIso8601String(); - } - if (this.orientation.isPresent) { - final value = this.orientation.value; - json[r'orientation'] = value; - } - if (this.projectionType.isPresent) { - final value = this.projectionType.value; - json[r'projectionType'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.timeZone.isPresent) { - final value = this.timeZone.value; - json[r'timeZone'] = value; - } - return json; - } - - /// Returns a new [ExifResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ExifResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ExifResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ExifResponseDto( - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - dateTimeOriginal: json.containsKey(r'dateTimeOriginal') ? Optional.present(mapDateTime(json, r'dateTimeOriginal', r'')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - exifImageHeight: json.containsKey(r'exifImageHeight') ? Optional.present(json[r'exifImageHeight'] == null ? null : int.parse('${json[r'exifImageHeight']}')) : const Optional.absent(), - exifImageWidth: json.containsKey(r'exifImageWidth') ? Optional.present(json[r'exifImageWidth'] == null ? null : int.parse('${json[r'exifImageWidth']}')) : const Optional.absent(), - exposureTime: json.containsKey(r'exposureTime') ? Optional.present(mapValueOfType(json, r'exposureTime')) : const Optional.absent(), - fNumber: json.containsKey(r'fNumber') ? Optional.present(json[r'fNumber'] == null ? null : num.parse('${json[r'fNumber']}')) : const Optional.absent(), - fileSizeInByte: json.containsKey(r'fileSizeInByte') ? Optional.present(json[r'fileSizeInByte'] == null ? null : int.parse('${json[r'fileSizeInByte']}')) : const Optional.absent(), - focalLength: json.containsKey(r'focalLength') ? Optional.present(json[r'focalLength'] == null ? null : num.parse('${json[r'focalLength']}')) : const Optional.absent(), - iso: json.containsKey(r'iso') ? Optional.present(json[r'iso'] == null ? null : int.parse('${json[r'iso']}')) : const Optional.absent(), - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] == null ? null : num.parse('${json[r'latitude']}')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] == null ? null : num.parse('${json[r'longitude']}')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - modifyDate: json.containsKey(r'modifyDate') ? Optional.present(mapDateTime(json, r'modifyDate', r'')) : const Optional.absent(), - orientation: json.containsKey(r'orientation') ? Optional.present(mapValueOfType(json, r'orientation')) : const Optional.absent(), - projectionType: json.containsKey(r'projectionType') ? Optional.present(mapValueOfType(json, r'projectionType')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - timeZone: json.containsKey(r'timeZone') ? Optional.present(mapValueOfType(json, r'timeZone')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ExifResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ExifResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ExifResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ExifResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/face_dto.dart b/mobile/openapi/lib/model/face_dto.dart deleted file mode 100644 index ec5f5c8a6c..0000000000 --- a/mobile/openapi/lib/model/face_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class FaceDto { - /// Returns a new [FaceDto] instance. - FaceDto({ - required this.id, - }); - - /// Face ID - String id; - - @override - bool operator ==(Object other) => identical(this, other) || other is FaceDto && - other.id == id; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (id.hashCode); - - @override - String toString() => 'FaceDto[id=$id]'; - - Map toJson() { - final json = {}; - json[r'id'] = this.id; - return json; - } - - /// Returns a new [FaceDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FaceDto? fromJson(dynamic value) { - upgradeDto(value, "FaceDto"); - if (value is Map) { - final json = value.cast(); - - return FaceDto( - id: mapValueOfType(json, r'id')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FaceDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FaceDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FaceDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FaceDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/facial_recognition_config.dart b/mobile/openapi/lib/model/facial_recognition_config.dart deleted file mode 100644 index c5f477e1d5..0000000000 --- a/mobile/openapi/lib/model/facial_recognition_config.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class FacialRecognitionConfig { - /// Returns a new [FacialRecognitionConfig] instance. - FacialRecognitionConfig({ - required this.enabled, - required this.maxDistance, - required this.minFaces, - required this.minScore, - required this.modelName, - }); - - /// Whether the task is enabled - bool enabled; - - /// Maximum distance threshold for face recognition - /// - /// Minimum value: 0.1 - /// Maximum value: 2 - double maxDistance; - - /// Minimum number of faces required for recognition - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int minFaces; - - /// Minimum confidence score for face detection - /// - /// Minimum value: 0.1 - /// Maximum value: 1 - double minScore; - - /// Name of the model to use - String modelName; - - @override - bool operator ==(Object other) => identical(this, other) || other is FacialRecognitionConfig && - other.enabled == enabled && - other.maxDistance == maxDistance && - other.minFaces == minFaces && - other.minScore == minScore && - other.modelName == modelName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (maxDistance.hashCode) + - (minFaces.hashCode) + - (minScore.hashCode) + - (modelName.hashCode); - - @override - String toString() => 'FacialRecognitionConfig[enabled=$enabled, maxDistance=$maxDistance, minFaces=$minFaces, minScore=$minScore, modelName=$modelName]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'maxDistance'] = this.maxDistance; - json[r'minFaces'] = this.minFaces; - json[r'minScore'] = this.minScore; - json[r'modelName'] = this.modelName; - return json; - } - - /// Returns a new [FacialRecognitionConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FacialRecognitionConfig? fromJson(dynamic value) { - upgradeDto(value, "FacialRecognitionConfig"); - if (value is Map) { - final json = value.cast(); - - return FacialRecognitionConfig( - enabled: mapValueOfType(json, r'enabled')!, - maxDistance: mapValueOfType(json, r'maxDistance')!, - minFaces: mapValueOfType(json, r'minFaces')!, - minScore: mapValueOfType(json, r'minScore')!, - modelName: mapValueOfType(json, r'modelName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FacialRecognitionConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FacialRecognitionConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FacialRecognitionConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FacialRecognitionConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'maxDistance', - 'minFaces', - 'minScore', - 'modelName', - }; -} - diff --git a/mobile/openapi/lib/model/folders_response.dart b/mobile/openapi/lib/model/folders_response.dart deleted file mode 100644 index 873404c786..0000000000 --- a/mobile/openapi/lib/model/folders_response.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class FoldersResponse { - /// Returns a new [FoldersResponse] instance. - FoldersResponse({ - required this.enabled, - required this.sidebarWeb, - }); - - /// Whether folders are enabled - bool enabled; - - /// Whether folders appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is FoldersResponse && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'FoldersResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [FoldersResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FoldersResponse? fromJson(dynamic value) { - upgradeDto(value, "FoldersResponse"); - if (value is Map) { - final json = value.cast(); - - return FoldersResponse( - enabled: mapValueOfType(json, r'enabled')!, - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FoldersResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FoldersResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FoldersResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FoldersResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/folders_update.dart b/mobile/openapi/lib/model/folders_update.dart deleted file mode 100644 index 2ce0cde807..0000000000 --- a/mobile/openapi/lib/model/folders_update.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class FoldersUpdate { - /// Returns a new [FoldersUpdate] instance. - FoldersUpdate({ - this.enabled = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether folders are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Whether folders appear in web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is FoldersUpdate && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'FoldersUpdate[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [FoldersUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FoldersUpdate? fromJson(dynamic value) { - upgradeDto(value, "FoldersUpdate"); - if (value is Map) { - final json = value.cast(); - - return FoldersUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FoldersUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FoldersUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FoldersUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FoldersUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/hls_video_resolution.dart b/mobile/openapi/lib/model/hls_video_resolution.dart deleted file mode 100644 index 8bab0481ed..0000000000 --- a/mobile/openapi/lib/model/hls_video_resolution.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// HLS video resolution -enum HlsVideoResolution { - number480._(480), - number720._(720), - number1080._(1080), - number1440._(1440), - number2160._(2160), - ; - - /// Instantiate a new enum with the provided value. - const HlsVideoResolution._(this._value); - - /// The underlying value of this enum member. - final int _value; - - @override - String toString() => _value.toString(); - - /// Encodes this enum as a value suitable for JSON. - int toJson() => _value; - - /// Returns the instance of [HlsVideoResolution] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static HlsVideoResolution? fromJson(dynamic value) => HlsVideoResolutionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [HlsVideoResolution] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = HlsVideoResolution.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [HlsVideoResolution] to int, -/// and [decode] dynamic data back to [HlsVideoResolution]. -class HlsVideoResolutionTypeTransformer { - factory HlsVideoResolutionTypeTransformer() => _instance ??= const HlsVideoResolutionTypeTransformer._(); - - const HlsVideoResolutionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - int encode(HlsVideoResolution data) => data._value; - - /// Returns the instance of [HlsVideoResolution] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - HlsVideoResolution? decode(dynamic data, {bool allowNull = true}) { - if (data is HlsVideoResolution) { - return data; - } - if (data != null) { - switch (data) { - case 480: return HlsVideoResolution.number480; - case 720: return HlsVideoResolution.number720; - case 1080: return HlsVideoResolution.number1080; - case 1440: return HlsVideoResolution.number1440; - case 2160: return HlsVideoResolution.number2160; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static HlsVideoResolutionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/image_format.dart b/mobile/openapi/lib/model/image_format.dart deleted file mode 100644 index e20e1cbc8f..0000000000 --- a/mobile/openapi/lib/model/image_format.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Image format -enum ImageFormat { - jpeg._(r'jpeg'), - webp._(r'webp'), - ; - - /// Instantiate a new enum with the provided value. - const ImageFormat._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ImageFormat] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ImageFormat? fromJson(dynamic value) => ImageFormatTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ImageFormat] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ImageFormat.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ImageFormat] to String, -/// and [decode] dynamic data back to [ImageFormat]. -class ImageFormatTypeTransformer { - factory ImageFormatTypeTransformer() => _instance ??= const ImageFormatTypeTransformer._(); - - const ImageFormatTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ImageFormat data) => data._value; - - /// Returns the instance of [ImageFormat] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ImageFormat? decode(dynamic data, {bool allowNull = true}) { - if (data is ImageFormat) { - return data; - } - if (data != null) { - switch (data) { - case r'jpeg': return ImageFormat.jpeg; - case r'webp': return ImageFormat.webp; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ImageFormatTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/integrity_report.dart b/mobile/openapi/lib/model/integrity_report.dart deleted file mode 100644 index 9e9c4cfa22..0000000000 --- a/mobile/openapi/lib/model/integrity_report.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Integrity report type -enum IntegrityReport { - untrackedFile._(r'untracked_file'), - missingFile._(r'missing_file'), - checksumMismatch._(r'checksum_mismatch'), - ; - - /// Instantiate a new enum with the provided value. - const IntegrityReport._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [IntegrityReport] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static IntegrityReport? fromJson(dynamic value) => IntegrityReportTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [IntegrityReport] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReport.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [IntegrityReport] to String, -/// and [decode] dynamic data back to [IntegrityReport]. -class IntegrityReportTypeTransformer { - factory IntegrityReportTypeTransformer() => _instance ??= const IntegrityReportTypeTransformer._(); - - const IntegrityReportTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(IntegrityReport data) => data._value; - - /// Returns the instance of [IntegrityReport] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - IntegrityReport? decode(dynamic data, {bool allowNull = true}) { - if (data is IntegrityReport) { - return data; - } - if (data != null) { - switch (data) { - case r'untracked_file': return IntegrityReport.untrackedFile; - case r'missing_file': return IntegrityReport.missingFile; - case r'checksum_mismatch': return IntegrityReport.checksumMismatch; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static IntegrityReportTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/integrity_report_response_dto.dart b/mobile/openapi/lib/model/integrity_report_response_dto.dart deleted file mode 100644 index e9f8b91cca..0000000000 --- a/mobile/openapi/lib/model/integrity_report_response_dto.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class IntegrityReportResponseDto { - /// Returns a new [IntegrityReportResponseDto] instance. - IntegrityReportResponseDto({ - this.items = const [], - this.nextCursor = const Optional.absent(), - }); - - List items; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional nextCursor; - - @override - bool operator ==(Object other) => identical(this, other) || other is IntegrityReportResponseDto && - _deepEquality.equals(other.items, items) && - other.nextCursor == nextCursor; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode) + - (nextCursor == null ? 0 : nextCursor!.hashCode); - - @override - String toString() => 'IntegrityReportResponseDto[items=$items, nextCursor=$nextCursor]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - if (this.nextCursor.isPresent) { - final value = this.nextCursor.value; - json[r'nextCursor'] = value; - } - return json; - } - - /// Returns a new [IntegrityReportResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static IntegrityReportResponseDto? fromJson(dynamic value) { - upgradeDto(value, "IntegrityReportResponseDto"); - if (value is Map) { - final json = value.cast(); - - return IntegrityReportResponseDto( - items: IntegrityReportResponseDtoItemsInner.listFromJson(json[r'items']), - nextCursor: json.containsKey(r'nextCursor') ? Optional.present(mapValueOfType(json, r'nextCursor')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReportResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = IntegrityReportResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of IntegrityReportResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = IntegrityReportResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart b/mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart deleted file mode 100644 index db09f698f4..0000000000 --- a/mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class IntegrityReportResponseDtoItemsInner { - /// Returns a new [IntegrityReportResponseDtoItemsInner] instance. - IntegrityReportResponseDtoItemsInner({ - required this.id, - required this.path, - required this.type, - }); - - /// Integrity report item id - String id; - - /// Integrity report item path - String path; - - IntegrityReport type; - - @override - bool operator ==(Object other) => identical(this, other) || other is IntegrityReportResponseDtoItemsInner && - other.id == id && - other.path == path && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (id.hashCode) + - (path.hashCode) + - (type.hashCode); - - @override - String toString() => 'IntegrityReportResponseDtoItemsInner[id=$id, path=$path, type=$type]'; - - Map toJson() { - final json = {}; - json[r'id'] = this.id; - json[r'path'] = this.path; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [IntegrityReportResponseDtoItemsInner] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static IntegrityReportResponseDtoItemsInner? fromJson(dynamic value) { - upgradeDto(value, "IntegrityReportResponseDtoItemsInner"); - if (value is Map) { - final json = value.cast(); - - return IntegrityReportResponseDtoItemsInner( - id: mapValueOfType(json, r'id')!, - path: mapValueOfType(json, r'path')!, - type: IntegrityReport.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReportResponseDtoItemsInner.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = IntegrityReportResponseDtoItemsInner.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of IntegrityReportResponseDtoItemsInner-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = IntegrityReportResponseDtoItemsInner.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - 'path', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/integrity_report_summary_response_dto.dart b/mobile/openapi/lib/model/integrity_report_summary_response_dto.dart deleted file mode 100644 index f95c036d14..0000000000 --- a/mobile/openapi/lib/model/integrity_report_summary_response_dto.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class IntegrityReportSummaryResponseDto { - /// Returns a new [IntegrityReportSummaryResponseDto] instance. - IntegrityReportSummaryResponseDto({ - required this.checksumMismatch, - required this.missingFile, - required this.untrackedFile, - }); - - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int checksumMismatch; - - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int missingFile; - - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int untrackedFile; - - @override - bool operator ==(Object other) => identical(this, other) || other is IntegrityReportSummaryResponseDto && - other.checksumMismatch == checksumMismatch && - other.missingFile == missingFile && - other.untrackedFile == untrackedFile; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksumMismatch.hashCode) + - (missingFile.hashCode) + - (untrackedFile.hashCode); - - @override - String toString() => 'IntegrityReportSummaryResponseDto[checksumMismatch=$checksumMismatch, missingFile=$missingFile, untrackedFile=$untrackedFile]'; - - Map toJson() { - final json = {}; - json[r'checksum_mismatch'] = this.checksumMismatch; - json[r'missing_file'] = this.missingFile; - json[r'untracked_file'] = this.untrackedFile; - return json; - } - - /// Returns a new [IntegrityReportSummaryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static IntegrityReportSummaryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "IntegrityReportSummaryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return IntegrityReportSummaryResponseDto( - checksumMismatch: mapValueOfType(json, r'checksum_mismatch')!, - missingFile: mapValueOfType(json, r'missing_file')!, - untrackedFile: mapValueOfType(json, r'untracked_file')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReportSummaryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = IntegrityReportSummaryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of IntegrityReportSummaryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = IntegrityReportSummaryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum_mismatch', - 'missing_file', - 'untracked_file', - }; -} - diff --git a/mobile/openapi/lib/model/job_create_dto.dart b/mobile/openapi/lib/model/job_create_dto.dart deleted file mode 100644 index fe6743cba0..0000000000 --- a/mobile/openapi/lib/model/job_create_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class JobCreateDto { - /// Returns a new [JobCreateDto] instance. - JobCreateDto({ - required this.name, - }); - - ManualJobName name; - - @override - bool operator ==(Object other) => identical(this, other) || other is JobCreateDto && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (name.hashCode); - - @override - String toString() => 'JobCreateDto[name=$name]'; - - Map toJson() { - final json = {}; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [JobCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static JobCreateDto? fromJson(dynamic value) { - upgradeDto(value, "JobCreateDto"); - if (value is Map) { - final json = value.cast(); - - return JobCreateDto( - name: ManualJobName.fromJson(json[r'name'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = JobCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = JobCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of JobCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = JobCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/job_name.dart b/mobile/openapi/lib/model/job_name.dart deleted file mode 100644 index 7c97d42052..0000000000 --- a/mobile/openapi/lib/model/job_name.dart +++ /dev/null @@ -1,218 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Job name -enum JobName { - assetDelete._(r'AssetDelete'), - assetDeleteCheck._(r'AssetDeleteCheck'), - assetDetectFacesQueueAll._(r'AssetDetectFacesQueueAll'), - assetDetectFaces._(r'AssetDetectFaces'), - assetDetectDuplicatesQueueAll._(r'AssetDetectDuplicatesQueueAll'), - assetDetectDuplicates._(r'AssetDetectDuplicates'), - assetEditThumbnailGeneration._(r'AssetEditThumbnailGeneration'), - assetEncodeVideoQueueAll._(r'AssetEncodeVideoQueueAll'), - assetEncodeVideo._(r'AssetEncodeVideo'), - assetEmptyTrash._(r'AssetEmptyTrash'), - assetExtractMetadataQueueAll._(r'AssetExtractMetadataQueueAll'), - assetExtractMetadata._(r'AssetExtractMetadata'), - assetFileMigration._(r'AssetFileMigration'), - assetGenerateThumbnailsQueueAll._(r'AssetGenerateThumbnailsQueueAll'), - assetGenerateThumbnails._(r'AssetGenerateThumbnails'), - auditTableCleanup._(r'AuditTableCleanup'), - databaseBackup._(r'DatabaseBackup'), - facialRecognitionQueueAll._(r'FacialRecognitionQueueAll'), - facialRecognition._(r'FacialRecognition'), - fileDelete._(r'FileDelete'), - fileMigrationQueueAll._(r'FileMigrationQueueAll'), - libraryDeleteCheck._(r'LibraryDeleteCheck'), - libraryDelete._(r'LibraryDelete'), - libraryRemoveAsset._(r'LibraryRemoveAsset'), - libraryScanAssetsQueueAll._(r'LibraryScanAssetsQueueAll'), - librarySyncAssets._(r'LibrarySyncAssets'), - librarySyncFilesQueueAll._(r'LibrarySyncFilesQueueAll'), - librarySyncFiles._(r'LibrarySyncFiles'), - libraryScanQueueAll._(r'LibraryScanQueueAll'), - hlsSessionCleanup._(r'HlsSessionCleanup'), - memoryCleanup._(r'MemoryCleanup'), - memoryGenerate._(r'MemoryGenerate'), - notificationsCleanup._(r'NotificationsCleanup'), - notifyUserSignup._(r'NotifyUserSignup'), - notifyAlbumInvite._(r'NotifyAlbumInvite'), - notifyAlbumUpdate._(r'NotifyAlbumUpdate'), - userDelete._(r'UserDelete'), - userDeleteCheck._(r'UserDeleteCheck'), - userSyncUsage._(r'UserSyncUsage'), - personCleanup._(r'PersonCleanup'), - personFileMigration._(r'PersonFileMigration'), - personGenerateThumbnail._(r'PersonGenerateThumbnail'), - sessionCleanup._(r'SessionCleanup'), - sendMail._(r'SendMail'), - sidecarQueueAll._(r'SidecarQueueAll'), - sidecarCheck._(r'SidecarCheck'), - sidecarWrite._(r'SidecarWrite'), - smartSearchQueueAll._(r'SmartSearchQueueAll'), - smartSearch._(r'SmartSearch'), - storageTemplateMigration._(r'StorageTemplateMigration'), - storageTemplateMigrationSingle._(r'StorageTemplateMigrationSingle'), - tagCleanup._(r'TagCleanup'), - versionCheck._(r'VersionCheck'), - ocrQueueAll._(r'OcrQueueAll'), - ocr._(r'Ocr'), - workflowAssetTrigger._(r'WorkflowAssetTrigger'), - integrityUntrackedFilesQueueAll._(r'IntegrityUntrackedFilesQueueAll'), - integrityUntrackedFiles._(r'IntegrityUntrackedFiles'), - integrityUntrackedRefresh._(r'IntegrityUntrackedRefresh'), - integrityMissingFilesQueueAll._(r'IntegrityMissingFilesQueueAll'), - integrityMissingFiles._(r'IntegrityMissingFiles'), - integrityMissingFilesRefresh._(r'IntegrityMissingFilesRefresh'), - integrityChecksumFiles._(r'IntegrityChecksumFiles'), - integrityChecksumFilesRefresh._(r'IntegrityChecksumFilesRefresh'), - integrityDeleteReportType._(r'IntegrityDeleteReportType'), - integrityDeleteReports._(r'IntegrityDeleteReports'), - ; - - /// Instantiate a new enum with the provided value. - const JobName._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [JobName] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static JobName? fromJson(dynamic value) => JobNameTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [JobName] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = JobName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [JobName] to String, -/// and [decode] dynamic data back to [JobName]. -class JobNameTypeTransformer { - factory JobNameTypeTransformer() => _instance ??= const JobNameTypeTransformer._(); - - const JobNameTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(JobName data) => data._value; - - /// Returns the instance of [JobName] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - JobName? decode(dynamic data, {bool allowNull = true}) { - if (data is JobName) { - return data; - } - if (data != null) { - switch (data) { - case r'AssetDelete': return JobName.assetDelete; - case r'AssetDeleteCheck': return JobName.assetDeleteCheck; - case r'AssetDetectFacesQueueAll': return JobName.assetDetectFacesQueueAll; - case r'AssetDetectFaces': return JobName.assetDetectFaces; - case r'AssetDetectDuplicatesQueueAll': return JobName.assetDetectDuplicatesQueueAll; - case r'AssetDetectDuplicates': return JobName.assetDetectDuplicates; - case r'AssetEditThumbnailGeneration': return JobName.assetEditThumbnailGeneration; - case r'AssetEncodeVideoQueueAll': return JobName.assetEncodeVideoQueueAll; - case r'AssetEncodeVideo': return JobName.assetEncodeVideo; - case r'AssetEmptyTrash': return JobName.assetEmptyTrash; - case r'AssetExtractMetadataQueueAll': return JobName.assetExtractMetadataQueueAll; - case r'AssetExtractMetadata': return JobName.assetExtractMetadata; - case r'AssetFileMigration': return JobName.assetFileMigration; - case r'AssetGenerateThumbnailsQueueAll': return JobName.assetGenerateThumbnailsQueueAll; - case r'AssetGenerateThumbnails': return JobName.assetGenerateThumbnails; - case r'AuditTableCleanup': return JobName.auditTableCleanup; - case r'DatabaseBackup': return JobName.databaseBackup; - case r'FacialRecognitionQueueAll': return JobName.facialRecognitionQueueAll; - case r'FacialRecognition': return JobName.facialRecognition; - case r'FileDelete': return JobName.fileDelete; - case r'FileMigrationQueueAll': return JobName.fileMigrationQueueAll; - case r'LibraryDeleteCheck': return JobName.libraryDeleteCheck; - case r'LibraryDelete': return JobName.libraryDelete; - case r'LibraryRemoveAsset': return JobName.libraryRemoveAsset; - case r'LibraryScanAssetsQueueAll': return JobName.libraryScanAssetsQueueAll; - case r'LibrarySyncAssets': return JobName.librarySyncAssets; - case r'LibrarySyncFilesQueueAll': return JobName.librarySyncFilesQueueAll; - case r'LibrarySyncFiles': return JobName.librarySyncFiles; - case r'LibraryScanQueueAll': return JobName.libraryScanQueueAll; - case r'HlsSessionCleanup': return JobName.hlsSessionCleanup; - case r'MemoryCleanup': return JobName.memoryCleanup; - case r'MemoryGenerate': return JobName.memoryGenerate; - case r'NotificationsCleanup': return JobName.notificationsCleanup; - case r'NotifyUserSignup': return JobName.notifyUserSignup; - case r'NotifyAlbumInvite': return JobName.notifyAlbumInvite; - case r'NotifyAlbumUpdate': return JobName.notifyAlbumUpdate; - case r'UserDelete': return JobName.userDelete; - case r'UserDeleteCheck': return JobName.userDeleteCheck; - case r'UserSyncUsage': return JobName.userSyncUsage; - case r'PersonCleanup': return JobName.personCleanup; - case r'PersonFileMigration': return JobName.personFileMigration; - case r'PersonGenerateThumbnail': return JobName.personGenerateThumbnail; - case r'SessionCleanup': return JobName.sessionCleanup; - case r'SendMail': return JobName.sendMail; - case r'SidecarQueueAll': return JobName.sidecarQueueAll; - case r'SidecarCheck': return JobName.sidecarCheck; - case r'SidecarWrite': return JobName.sidecarWrite; - case r'SmartSearchQueueAll': return JobName.smartSearchQueueAll; - case r'SmartSearch': return JobName.smartSearch; - case r'StorageTemplateMigration': return JobName.storageTemplateMigration; - case r'StorageTemplateMigrationSingle': return JobName.storageTemplateMigrationSingle; - case r'TagCleanup': return JobName.tagCleanup; - case r'VersionCheck': return JobName.versionCheck; - case r'OcrQueueAll': return JobName.ocrQueueAll; - case r'Ocr': return JobName.ocr; - case r'WorkflowAssetTrigger': return JobName.workflowAssetTrigger; - case r'IntegrityUntrackedFilesQueueAll': return JobName.integrityUntrackedFilesQueueAll; - case r'IntegrityUntrackedFiles': return JobName.integrityUntrackedFiles; - case r'IntegrityUntrackedRefresh': return JobName.integrityUntrackedRefresh; - case r'IntegrityMissingFilesQueueAll': return JobName.integrityMissingFilesQueueAll; - case r'IntegrityMissingFiles': return JobName.integrityMissingFiles; - case r'IntegrityMissingFilesRefresh': return JobName.integrityMissingFilesRefresh; - case r'IntegrityChecksumFiles': return JobName.integrityChecksumFiles; - case r'IntegrityChecksumFilesRefresh': return JobName.integrityChecksumFilesRefresh; - case r'IntegrityDeleteReportType': return JobName.integrityDeleteReportType; - case r'IntegrityDeleteReports': return JobName.integrityDeleteReports; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static JobNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/job_settings_dto.dart b/mobile/openapi/lib/model/job_settings_dto.dart deleted file mode 100644 index 98fe3d3536..0000000000 --- a/mobile/openapi/lib/model/job_settings_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class JobSettingsDto { - /// Returns a new [JobSettingsDto] instance. - JobSettingsDto({ - required this.concurrency, - }); - - /// Concurrency - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int concurrency; - - @override - bool operator ==(Object other) => identical(this, other) || other is JobSettingsDto && - other.concurrency == concurrency; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (concurrency.hashCode); - - @override - String toString() => 'JobSettingsDto[concurrency=$concurrency]'; - - Map toJson() { - final json = {}; - json[r'concurrency'] = this.concurrency; - return json; - } - - /// Returns a new [JobSettingsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static JobSettingsDto? fromJson(dynamic value) { - upgradeDto(value, "JobSettingsDto"); - if (value is Map) { - final json = value.cast(); - - return JobSettingsDto( - concurrency: mapValueOfType(json, r'concurrency')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = JobSettingsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = JobSettingsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of JobSettingsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = JobSettingsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'concurrency', - }; -} - diff --git a/mobile/openapi/lib/model/library_response_dto.dart b/mobile/openapi/lib/model/library_response_dto.dart deleted file mode 100644 index 128469839a..0000000000 --- a/mobile/openapi/lib/model/library_response_dto.dart +++ /dev/null @@ -1,189 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LibraryResponseDto { - /// Returns a new [LibraryResponseDto] instance. - LibraryResponseDto({ - required this.assetCount, - required this.createdAt, - this.exclusionPatterns = const [], - required this.id, - this.importPaths = const [], - required this.name, - required this.ownerId, - required this.refreshedAt, - required this.updatedAt, - }); - - /// Number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int assetCount; - - /// Creation date - DateTime createdAt; - - /// Exclusion patterns - List exclusionPatterns; - - /// Library ID - String id; - - /// Import paths - List importPaths; - - /// Library name - String name; - - /// Owner user ID - String ownerId; - - /// Last refresh date - DateTime? refreshedAt; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is LibraryResponseDto && - other.assetCount == assetCount && - other.createdAt == createdAt && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - other.id == id && - _deepEquality.equals(other.importPaths, importPaths) && - other.name == name && - other.ownerId == ownerId && - other.refreshedAt == refreshedAt && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetCount.hashCode) + - (createdAt.hashCode) + - (exclusionPatterns.hashCode) + - (id.hashCode) + - (importPaths.hashCode) + - (name.hashCode) + - (ownerId.hashCode) + - (refreshedAt == null ? 0 : refreshedAt!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'LibraryResponseDto[assetCount=$assetCount, createdAt=$createdAt, exclusionPatterns=$exclusionPatterns, id=$id, importPaths=$importPaths, name=$name, ownerId=$ownerId, refreshedAt=$refreshedAt, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'assetCount'] = this.assetCount; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'exclusionPatterns'] = this.exclusionPatterns; - json[r'id'] = this.id; - json[r'importPaths'] = this.importPaths; - json[r'name'] = this.name; - json[r'ownerId'] = this.ownerId; - if (this.refreshedAt != null) { - json[r'refreshedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.refreshedAt!.millisecondsSinceEpoch - : this.refreshedAt!.toUtc().toIso8601String(); - } else { - json[r'refreshedAt'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [LibraryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LibraryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LibraryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LibraryResponseDto( - assetCount: mapValueOfType(json, r'assetCount')!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - exclusionPatterns: json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const [], - id: mapValueOfType(json, r'id')!, - importPaths: json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const [], - name: mapValueOfType(json, r'name')!, - ownerId: mapValueOfType(json, r'ownerId')!, - refreshedAt: mapDateTime(json, r'refreshedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LibraryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LibraryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LibraryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LibraryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetCount', - 'createdAt', - 'exclusionPatterns', - 'id', - 'importPaths', - 'name', - 'ownerId', - 'refreshedAt', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/library_stats_response_dto.dart b/mobile/openapi/lib/model/library_stats_response_dto.dart deleted file mode 100644 index 55adbc2b49..0000000000 --- a/mobile/openapi/lib/model/library_stats_response_dto.dart +++ /dev/null @@ -1,139 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LibraryStatsResponseDto { - /// Returns a new [LibraryStatsResponseDto] instance. - LibraryStatsResponseDto({ - required this.photos, - required this.total, - required this.usage, - required this.videos, - }); - - /// Number of photos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int photos; - - /// Total number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - /// Storage usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usage; - - /// Number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is LibraryStatsResponseDto && - other.photos == photos && - other.total == total && - other.usage == usage && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (photos.hashCode) + - (total.hashCode) + - (usage.hashCode) + - (videos.hashCode); - - @override - String toString() => 'LibraryStatsResponseDto[photos=$photos, total=$total, usage=$usage, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'photos'] = this.photos; - json[r'total'] = this.total; - json[r'usage'] = this.usage; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [LibraryStatsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LibraryStatsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LibraryStatsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LibraryStatsResponseDto( - photos: mapValueOfType(json, r'photos')!, - total: mapValueOfType(json, r'total')!, - usage: mapValueOfType(json, r'usage')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LibraryStatsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LibraryStatsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LibraryStatsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LibraryStatsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'photos', - 'total', - 'usage', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/license_key_dto.dart b/mobile/openapi/lib/model/license_key_dto.dart deleted file mode 100644 index d1818a2a43..0000000000 --- a/mobile/openapi/lib/model/license_key_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LicenseKeyDto { - /// Returns a new [LicenseKeyDto] instance. - LicenseKeyDto({ - required this.activationKey, - required this.licenseKey, - }); - - /// Activation key - String activationKey; - - /// License key (format: /^IM(SV|CL)(-[\\dA-Za-z]{4}){8}$/) - String licenseKey; - - @override - bool operator ==(Object other) => identical(this, other) || other is LicenseKeyDto && - other.activationKey == activationKey && - other.licenseKey == licenseKey; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (activationKey.hashCode) + - (licenseKey.hashCode); - - @override - String toString() => 'LicenseKeyDto[activationKey=$activationKey, licenseKey=$licenseKey]'; - - Map toJson() { - final json = {}; - json[r'activationKey'] = this.activationKey; - json[r'licenseKey'] = this.licenseKey; - return json; - } - - /// Returns a new [LicenseKeyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LicenseKeyDto? fromJson(dynamic value) { - upgradeDto(value, "LicenseKeyDto"); - if (value is Map) { - final json = value.cast(); - - return LicenseKeyDto( - activationKey: mapValueOfType(json, r'activationKey')!, - licenseKey: mapValueOfType(json, r'licenseKey')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LicenseKeyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LicenseKeyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LicenseKeyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LicenseKeyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'activationKey', - 'licenseKey', - }; -} - diff --git a/mobile/openapi/lib/model/log_level.dart b/mobile/openapi/lib/model/log_level.dart deleted file mode 100644 index 8e43b09d16..0000000000 --- a/mobile/openapi/lib/model/log_level.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Log level -enum LogLevel { - verbose._(r'verbose'), - debug._(r'debug'), - log._(r'log'), - warn._(r'warn'), - error._(r'error'), - fatal._(r'fatal'), - ; - - /// Instantiate a new enum with the provided value. - const LogLevel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [LogLevel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static LogLevel? fromJson(dynamic value) => LogLevelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [LogLevel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LogLevel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [LogLevel] to String, -/// and [decode] dynamic data back to [LogLevel]. -class LogLevelTypeTransformer { - factory LogLevelTypeTransformer() => _instance ??= const LogLevelTypeTransformer._(); - - const LogLevelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(LogLevel data) => data._value; - - /// Returns the instance of [LogLevel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - LogLevel? decode(dynamic data, {bool allowNull = true}) { - if (data is LogLevel) { - return data; - } - if (data != null) { - switch (data) { - case r'verbose': return LogLevel.verbose; - case r'debug': return LogLevel.debug; - case r'log': return LogLevel.log; - case r'warn': return LogLevel.warn; - case r'error': return LogLevel.error; - case r'fatal': return LogLevel.fatal; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static LogLevelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/login_credential_dto.dart b/mobile/openapi/lib/model/login_credential_dto.dart deleted file mode 100644 index 1fdfdc3d40..0000000000 --- a/mobile/openapi/lib/model/login_credential_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LoginCredentialDto { - /// Returns a new [LoginCredentialDto] instance. - LoginCredentialDto({ - required this.email, - required this.password, - }); - - /// User email - String email; - - /// User password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is LoginCredentialDto && - other.email == email && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (email.hashCode) + - (password.hashCode); - - @override - String toString() => 'LoginCredentialDto[email=$email, password=$password]'; - - Map toJson() { - final json = {}; - json[r'email'] = this.email; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [LoginCredentialDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LoginCredentialDto? fromJson(dynamic value) { - upgradeDto(value, "LoginCredentialDto"); - if (value is Map) { - final json = value.cast(); - - return LoginCredentialDto( - email: mapValueOfType(json, r'email')!, - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LoginCredentialDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LoginCredentialDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LoginCredentialDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LoginCredentialDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/login_response_dto.dart b/mobile/openapi/lib/model/login_response_dto.dart deleted file mode 100644 index c6938c2393..0000000000 --- a/mobile/openapi/lib/model/login_response_dto.dart +++ /dev/null @@ -1,163 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LoginResponseDto { - /// Returns a new [LoginResponseDto] instance. - LoginResponseDto({ - required this.accessToken, - required this.isAdmin, - required this.isOnboarded, - required this.name, - required this.profileImagePath, - required this.shouldChangePassword, - required this.userEmail, - required this.userId, - }); - - /// Access token - String accessToken; - - /// Is admin user - bool isAdmin; - - /// Is onboarded - bool isOnboarded; - - /// User name - String name; - - /// Profile image path - String profileImagePath; - - /// Should change password - bool shouldChangePassword; - - /// User email - String userEmail; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is LoginResponseDto && - other.accessToken == accessToken && - other.isAdmin == isAdmin && - other.isOnboarded == isOnboarded && - other.name == name && - other.profileImagePath == profileImagePath && - other.shouldChangePassword == shouldChangePassword && - other.userEmail == userEmail && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (accessToken.hashCode) + - (isAdmin.hashCode) + - (isOnboarded.hashCode) + - (name.hashCode) + - (profileImagePath.hashCode) + - (shouldChangePassword.hashCode) + - (userEmail.hashCode) + - (userId.hashCode); - - @override - String toString() => 'LoginResponseDto[accessToken=$accessToken, isAdmin=$isAdmin, isOnboarded=$isOnboarded, name=$name, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, userEmail=$userEmail, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'accessToken'] = this.accessToken; - json[r'isAdmin'] = this.isAdmin; - json[r'isOnboarded'] = this.isOnboarded; - json[r'name'] = this.name; - json[r'profileImagePath'] = this.profileImagePath; - json[r'shouldChangePassword'] = this.shouldChangePassword; - json[r'userEmail'] = this.userEmail; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [LoginResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LoginResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LoginResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LoginResponseDto( - accessToken: mapValueOfType(json, r'accessToken')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - name: mapValueOfType(json, r'name')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - shouldChangePassword: mapValueOfType(json, r'shouldChangePassword')!, - userEmail: mapValueOfType(json, r'userEmail')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LoginResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LoginResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LoginResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LoginResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'accessToken', - 'isAdmin', - 'isOnboarded', - 'name', - 'profileImagePath', - 'shouldChangePassword', - 'userEmail', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/logout_response_dto.dart b/mobile/openapi/lib/model/logout_response_dto.dart deleted file mode 100644 index b50db2c28b..0000000000 --- a/mobile/openapi/lib/model/logout_response_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LogoutResponseDto { - /// Returns a new [LogoutResponseDto] instance. - LogoutResponseDto({ - required this.redirectUri, - required this.successful, - }); - - /// Redirect URI - String redirectUri; - - /// Logout successful - bool successful; - - @override - bool operator ==(Object other) => identical(this, other) || other is LogoutResponseDto && - other.redirectUri == redirectUri && - other.successful == successful; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (redirectUri.hashCode) + - (successful.hashCode); - - @override - String toString() => 'LogoutResponseDto[redirectUri=$redirectUri, successful=$successful]'; - - Map toJson() { - final json = {}; - json[r'redirectUri'] = this.redirectUri; - json[r'successful'] = this.successful; - return json; - } - - /// Returns a new [LogoutResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LogoutResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LogoutResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LogoutResponseDto( - redirectUri: mapValueOfType(json, r'redirectUri')!, - successful: mapValueOfType(json, r'successful')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LogoutResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LogoutResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LogoutResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LogoutResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'redirectUri', - 'successful', - }; -} - diff --git a/mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart b/mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart deleted file mode 100644 index a9b8608ac1..0000000000 --- a/mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MachineLearningAvailabilityChecksDto { - /// Returns a new [MachineLearningAvailabilityChecksDto] instance. - MachineLearningAvailabilityChecksDto({ - required this.enabled, - required this.interval, - required this.timeout, - }); - - /// Enabled - bool enabled; - - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int interval; - - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int timeout; - - @override - bool operator ==(Object other) => identical(this, other) || other is MachineLearningAvailabilityChecksDto && - other.enabled == enabled && - other.interval == interval && - other.timeout == timeout; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (interval.hashCode) + - (timeout.hashCode); - - @override - String toString() => 'MachineLearningAvailabilityChecksDto[enabled=$enabled, interval=$interval, timeout=$timeout]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'interval'] = this.interval; - json[r'timeout'] = this.timeout; - return json; - } - - /// Returns a new [MachineLearningAvailabilityChecksDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MachineLearningAvailabilityChecksDto? fromJson(dynamic value) { - upgradeDto(value, "MachineLearningAvailabilityChecksDto"); - if (value is Map) { - final json = value.cast(); - - return MachineLearningAvailabilityChecksDto( - enabled: mapValueOfType(json, r'enabled')!, - interval: mapValueOfType(json, r'interval')!, - timeout: mapValueOfType(json, r'timeout')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MachineLearningAvailabilityChecksDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MachineLearningAvailabilityChecksDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MachineLearningAvailabilityChecksDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MachineLearningAvailabilityChecksDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'interval', - 'timeout', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_action.dart b/mobile/openapi/lib/model/maintenance_action.dart deleted file mode 100644 index d8dd6b8846..0000000000 --- a/mobile/openapi/lib/model/maintenance_action.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Maintenance action -enum MaintenanceAction { - start._(r'start'), - end._(r'end'), - selectDatabaseRestore._(r'select_database_restore'), - restoreDatabase._(r'restore_database'), - ; - - /// Instantiate a new enum with the provided value. - const MaintenanceAction._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [MaintenanceAction] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static MaintenanceAction? fromJson(dynamic value) => MaintenanceActionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [MaintenanceAction] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceAction.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MaintenanceAction] to String, -/// and [decode] dynamic data back to [MaintenanceAction]. -class MaintenanceActionTypeTransformer { - factory MaintenanceActionTypeTransformer() => _instance ??= const MaintenanceActionTypeTransformer._(); - - const MaintenanceActionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(MaintenanceAction data) => data._value; - - /// Returns the instance of [MaintenanceAction] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - MaintenanceAction? decode(dynamic data, {bool allowNull = true}) { - if (data is MaintenanceAction) { - return data; - } - if (data != null) { - switch (data) { - case r'start': return MaintenanceAction.start; - case r'end': return MaintenanceAction.end; - case r'select_database_restore': return MaintenanceAction.selectDatabaseRestore; - case r'restore_database': return MaintenanceAction.restoreDatabase; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static MaintenanceActionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/maintenance_auth_dto.dart b/mobile/openapi/lib/model/maintenance_auth_dto.dart deleted file mode 100644 index f9511bdd2b..0000000000 --- a/mobile/openapi/lib/model/maintenance_auth_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceAuthDto { - /// Returns a new [MaintenanceAuthDto] instance. - MaintenanceAuthDto({ - required this.username, - }); - - /// Maintenance username - String username; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceAuthDto && - other.username == username; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (username.hashCode); - - @override - String toString() => 'MaintenanceAuthDto[username=$username]'; - - Map toJson() { - final json = {}; - json[r'username'] = this.username; - return json; - } - - /// Returns a new [MaintenanceAuthDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceAuthDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceAuthDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceAuthDto( - username: mapValueOfType(json, r'username')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceAuthDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceAuthDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceAuthDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceAuthDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'username', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart b/mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart deleted file mode 100644 index 1c364a6fdc..0000000000 --- a/mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceDetectInstallResponseDto { - /// Returns a new [MaintenanceDetectInstallResponseDto] instance. - MaintenanceDetectInstallResponseDto({ - this.storage = const [], - }); - - List storage; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceDetectInstallResponseDto && - _deepEquality.equals(other.storage, storage); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (storage.hashCode); - - @override - String toString() => 'MaintenanceDetectInstallResponseDto[storage=$storage]'; - - Map toJson() { - final json = {}; - json[r'storage'] = this.storage; - return json; - } - - /// Returns a new [MaintenanceDetectInstallResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceDetectInstallResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceDetectInstallResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceDetectInstallResponseDto( - storage: MaintenanceDetectInstallStorageFolderDto.listFromJson(json[r'storage']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceDetectInstallResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceDetectInstallResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceDetectInstallResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceDetectInstallResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'storage', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart b/mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart deleted file mode 100644 index 83182f53d7..0000000000 --- a/mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart +++ /dev/null @@ -1,129 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceDetectInstallStorageFolderDto { - /// Returns a new [MaintenanceDetectInstallStorageFolderDto] instance. - MaintenanceDetectInstallStorageFolderDto({ - required this.files, - required this.folder, - required this.readable, - required this.writable, - }); - - /// Number of files in the folder - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int files; - - StorageFolder folder; - - /// Whether the folder is readable - bool readable; - - /// Whether the folder is writable - bool writable; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceDetectInstallStorageFolderDto && - other.files == files && - other.folder == folder && - other.readable == readable && - other.writable == writable; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (files.hashCode) + - (folder.hashCode) + - (readable.hashCode) + - (writable.hashCode); - - @override - String toString() => 'MaintenanceDetectInstallStorageFolderDto[files=$files, folder=$folder, readable=$readable, writable=$writable]'; - - Map toJson() { - final json = {}; - json[r'files'] = this.files; - json[r'folder'] = this.folder; - json[r'readable'] = this.readable; - json[r'writable'] = this.writable; - return json; - } - - /// Returns a new [MaintenanceDetectInstallStorageFolderDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceDetectInstallStorageFolderDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceDetectInstallStorageFolderDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceDetectInstallStorageFolderDto( - files: mapValueOfType(json, r'files')!, - folder: StorageFolder.fromJson(json[r'folder'])!, - readable: mapValueOfType(json, r'readable')!, - writable: mapValueOfType(json, r'writable')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceDetectInstallStorageFolderDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceDetectInstallStorageFolderDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceDetectInstallStorageFolderDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceDetectInstallStorageFolderDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'files', - 'folder', - 'readable', - 'writable', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_login_dto.dart b/mobile/openapi/lib/model/maintenance_login_dto.dart deleted file mode 100644 index eaa91ae738..0000000000 --- a/mobile/openapi/lib/model/maintenance_login_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceLoginDto { - /// Returns a new [MaintenanceLoginDto] instance. - MaintenanceLoginDto({ - this.token = const Optional.absent(), - }); - - /// Maintenance token - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional token; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceLoginDto && - other.token == token; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (token == null ? 0 : token!.hashCode); - - @override - String toString() => 'MaintenanceLoginDto[token=$token]'; - - Map toJson() { - final json = {}; - if (this.token.isPresent) { - final value = this.token.value; - json[r'token'] = value; - } - return json; - } - - /// Returns a new [MaintenanceLoginDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceLoginDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceLoginDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceLoginDto( - token: json.containsKey(r'token') ? Optional.present(mapValueOfType(json, r'token')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceLoginDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceLoginDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceLoginDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceLoginDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_status_response_dto.dart b/mobile/openapi/lib/model/maintenance_status_response_dto.dart deleted file mode 100644 index 82ad12d340..0000000000 --- a/mobile/openapi/lib/model/maintenance_status_response_dto.dart +++ /dev/null @@ -1,157 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceStatusResponseDto { - /// Returns a new [MaintenanceStatusResponseDto] instance. - MaintenanceStatusResponseDto({ - required this.action, - required this.active, - this.error = const Optional.absent(), - this.progress = const Optional.absent(), - this.task = const Optional.absent(), - }); - - MaintenanceAction action; - - bool active; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional error; - - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional progress; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional task; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceStatusResponseDto && - other.action == action && - other.active == active && - other.error == error && - other.progress == progress && - other.task == task; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (active.hashCode) + - (error == null ? 0 : error!.hashCode) + - (progress == null ? 0 : progress!.hashCode) + - (task == null ? 0 : task!.hashCode); - - @override - String toString() => 'MaintenanceStatusResponseDto[action=$action, active=$active, error=$error, progress=$progress, task=$task]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'active'] = this.active; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - if (this.progress.isPresent) { - final value = this.progress.value; - json[r'progress'] = value; - } - if (this.task.isPresent) { - final value = this.task.value; - json[r'task'] = value; - } - return json; - } - - /// Returns a new [MaintenanceStatusResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceStatusResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceStatusResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceStatusResponseDto( - action: MaintenanceAction.fromJson(json[r'action'])!, - active: mapValueOfType(json, r'active')!, - error: json.containsKey(r'error') ? Optional.present(mapValueOfType(json, r'error')) : const Optional.absent(), - progress: json.containsKey(r'progress') ? Optional.present(json[r'progress'] == null ? null : int.parse('${json[r'progress']}')) : const Optional.absent(), - task: json.containsKey(r'task') ? Optional.present(mapValueOfType(json, r'task')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceStatusResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceStatusResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceStatusResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceStatusResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'active', - }; -} - diff --git a/mobile/openapi/lib/model/manual_job_name.dart b/mobile/openapi/lib/model/manual_job_name.dart deleted file mode 100644 index 313b50494d..0000000000 --- a/mobile/openapi/lib/model/manual_job_name.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Manual job name -enum ManualJobName { - personCleanup._(r'person-cleanup'), - tagCleanup._(r'tag-cleanup'), - userCleanup._(r'user-cleanup'), - memoryCleanup._(r'memory-cleanup'), - memoryCreate._(r'memory-create'), - backupDatabase._(r'backup-database'), - integrityMissingFiles._(r'integrity-missing-files'), - integrityUntrackedFiles._(r'integrity-untracked-files'), - integrityChecksumMismatch._(r'integrity-checksum-mismatch'), - integrityMissingFilesRefresh._(r'integrity-missing-files-refresh'), - integrityUntrackedFilesRefresh._(r'integrity-untracked-files-refresh'), - integrityChecksumMismatchRefresh._(r'integrity-checksum-mismatch-refresh'), - integrityMissingFilesDeleteAll._(r'integrity-missing-files-delete-all'), - integrityUntrackedFilesDeleteAll._(r'integrity-untracked-files-delete-all'), - integrityChecksumMismatchDeleteAll._(r'integrity-checksum-mismatch-delete-all'), - ; - - /// Instantiate a new enum with the provided value. - const ManualJobName._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ManualJobName] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ManualJobName? fromJson(dynamic value) => ManualJobNameTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ManualJobName] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ManualJobName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ManualJobName] to String, -/// and [decode] dynamic data back to [ManualJobName]. -class ManualJobNameTypeTransformer { - factory ManualJobNameTypeTransformer() => _instance ??= const ManualJobNameTypeTransformer._(); - - const ManualJobNameTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ManualJobName data) => data._value; - - /// Returns the instance of [ManualJobName] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ManualJobName? decode(dynamic data, {bool allowNull = true}) { - if (data is ManualJobName) { - return data; - } - if (data != null) { - switch (data) { - case r'person-cleanup': return ManualJobName.personCleanup; - case r'tag-cleanup': return ManualJobName.tagCleanup; - case r'user-cleanup': return ManualJobName.userCleanup; - case r'memory-cleanup': return ManualJobName.memoryCleanup; - case r'memory-create': return ManualJobName.memoryCreate; - case r'backup-database': return ManualJobName.backupDatabase; - case r'integrity-missing-files': return ManualJobName.integrityMissingFiles; - case r'integrity-untracked-files': return ManualJobName.integrityUntrackedFiles; - case r'integrity-checksum-mismatch': return ManualJobName.integrityChecksumMismatch; - case r'integrity-missing-files-refresh': return ManualJobName.integrityMissingFilesRefresh; - case r'integrity-untracked-files-refresh': return ManualJobName.integrityUntrackedFilesRefresh; - case r'integrity-checksum-mismatch-refresh': return ManualJobName.integrityChecksumMismatchRefresh; - case r'integrity-missing-files-delete-all': return ManualJobName.integrityMissingFilesDeleteAll; - case r'integrity-untracked-files-delete-all': return ManualJobName.integrityUntrackedFilesDeleteAll; - case r'integrity-checksum-mismatch-delete-all': return ManualJobName.integrityChecksumMismatchDeleteAll; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ManualJobNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/map_marker_response_dto.dart b/mobile/openapi/lib/model/map_marker_response_dto.dart deleted file mode 100644 index 3f19c21b6b..0000000000 --- a/mobile/openapi/lib/model/map_marker_response_dto.dart +++ /dev/null @@ -1,157 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MapMarkerResponseDto { - /// Returns a new [MapMarkerResponseDto] instance. - MapMarkerResponseDto({ - required this.city, - required this.country, - required this.id, - required this.lat, - required this.lon, - required this.state, - }); - - /// City name - String? city; - - /// Country name - String? country; - - /// Asset ID - String id; - - /// Latitude - double lat; - - /// Longitude - double lon; - - /// State/Province name - String? state; - - @override - bool operator ==(Object other) => identical(this, other) || other is MapMarkerResponseDto && - other.city == city && - other.country == country && - other.id == id && - other.lat == lat && - other.lon == lon && - other.state == state; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (id.hashCode) + - (lat.hashCode) + - (lon.hashCode) + - (state == null ? 0 : state!.hashCode); - - @override - String toString() => 'MapMarkerResponseDto[city=$city, country=$country, id=$id, lat=$lat, lon=$lon, state=$state]'; - - Map toJson() { - final json = {}; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - json[r'country'] = null; - } - json[r'id'] = this.id; - json[r'lat'] = this.lat; - json[r'lon'] = this.lon; - if (this.state != null) { - json[r'state'] = this.state; - } else { - json[r'state'] = null; - } - return json; - } - - /// Returns a new [MapMarkerResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MapMarkerResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MapMarkerResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MapMarkerResponseDto( - city: mapValueOfType(json, r'city'), - country: mapValueOfType(json, r'country'), - id: mapValueOfType(json, r'id')!, - lat: mapValueOfType(json, r'lat')!, - lon: mapValueOfType(json, r'lon')!, - state: mapValueOfType(json, r'state'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MapMarkerResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MapMarkerResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MapMarkerResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MapMarkerResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'city', - 'country', - 'id', - 'lat', - 'lon', - 'state', - }; -} - diff --git a/mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart b/mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart deleted file mode 100644 index 0fc30f2b88..0000000000 --- a/mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MapReverseGeocodeResponseDto { - /// Returns a new [MapReverseGeocodeResponseDto] instance. - MapReverseGeocodeResponseDto({ - required this.city, - required this.country, - required this.state, - }); - - /// City name - String? city; - - /// Country name - String? country; - - /// State/Province name - String? state; - - @override - bool operator ==(Object other) => identical(this, other) || other is MapReverseGeocodeResponseDto && - other.city == city && - other.country == country && - other.state == state; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (state == null ? 0 : state!.hashCode); - - @override - String toString() => 'MapReverseGeocodeResponseDto[city=$city, country=$country, state=$state]'; - - Map toJson() { - final json = {}; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - json[r'country'] = null; - } - if (this.state != null) { - json[r'state'] = this.state; - } else { - json[r'state'] = null; - } - return json; - } - - /// Returns a new [MapReverseGeocodeResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MapReverseGeocodeResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MapReverseGeocodeResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MapReverseGeocodeResponseDto( - city: mapValueOfType(json, r'city'), - country: mapValueOfType(json, r'country'), - state: mapValueOfType(json, r'state'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MapReverseGeocodeResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MapReverseGeocodeResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MapReverseGeocodeResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MapReverseGeocodeResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'city', - 'country', - 'state', - }; -} - diff --git a/mobile/openapi/lib/model/memories_response.dart b/mobile/openapi/lib/model/memories_response.dart deleted file mode 100644 index 250e214a60..0000000000 --- a/mobile/openapi/lib/model/memories_response.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoriesResponse { - /// Returns a new [MemoriesResponse] instance. - MemoriesResponse({ - required this.duration, - required this.enabled, - }); - - /// Memory duration in seconds - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int duration; - - /// Whether memories are enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoriesResponse && - other.duration == duration && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (duration.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'MemoriesResponse[duration=$duration, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'duration'] = this.duration; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [MemoriesResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoriesResponse? fromJson(dynamic value) { - upgradeDto(value, "MemoriesResponse"); - if (value is Map) { - final json = value.cast(); - - return MemoriesResponse( - duration: mapValueOfType(json, r'duration')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoriesResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoriesResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoriesResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoriesResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'duration', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/memories_update.dart b/mobile/openapi/lib/model/memories_update.dart deleted file mode 100644 index 350cf19182..0000000000 --- a/mobile/openapi/lib/model/memories_update.dart +++ /dev/null @@ -1,128 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoriesUpdate { - /// Returns a new [MemoriesUpdate] instance. - MemoriesUpdate({ - this.duration = const Optional.absent(), - this.enabled = const Optional.absent(), - }); - - /// Memory duration in seconds - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional duration; - - /// Whether memories are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoriesUpdate && - other.duration == duration && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (duration == null ? 0 : duration!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode); - - @override - String toString() => 'MemoriesUpdate[duration=$duration, enabled=$enabled]'; - - Map toJson() { - final json = {}; - if (this.duration.isPresent) { - final value = this.duration.value; - json[r'duration'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - return json; - } - - /// Returns a new [MemoriesUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoriesUpdate? fromJson(dynamic value) { - upgradeDto(value, "MemoriesUpdate"); - if (value is Map) { - final json = value.cast(); - - return MemoriesUpdate( - duration: json.containsKey(r'duration') ? Optional.present(json[r'duration'] == null ? null : int.parse('${json[r'duration']}')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoriesUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoriesUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoriesUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoriesUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/memory_create_dto.dart b/mobile/openapi/lib/model/memory_create_dto.dart deleted file mode 100644 index d032ff0c38..0000000000 --- a/mobile/openapi/lib/model/memory_create_dto.dart +++ /dev/null @@ -1,205 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoryCreateDto { - /// Returns a new [MemoryCreateDto] instance. - MemoryCreateDto({ - this.assetIds = const Optional.present(const []), - required this.data, - this.hideAt = const Optional.absent(), - this.isSaved = const Optional.absent(), - required this.memoryAt, - this.seenAt = const Optional.absent(), - this.showAt = const Optional.absent(), - required this.type, - }); - - /// Asset IDs to associate with memory - Optional?> assetIds; - - OnThisDayDto data; - - /// Date when memory should be hidden - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional hideAt; - - /// Is memory saved - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isSaved; - - /// Memory date - DateTime memoryAt; - - /// Date when memory was seen - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional seenAt; - - /// Date when memory should be shown - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional showAt; - - MemoryType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryCreateDto && - _deepEquality.equals(other.assetIds, assetIds) && - other.data == data && - other.hideAt == hideAt && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.seenAt == seenAt && - other.showAt == showAt && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (data.hashCode) + - (hideAt == null ? 0 : hideAt!.hashCode) + - (isSaved == null ? 0 : isSaved!.hashCode) + - (memoryAt.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode) + - (showAt == null ? 0 : showAt!.hashCode) + - (type.hashCode); - - @override - String toString() => 'MemoryCreateDto[assetIds=$assetIds, data=$data, hideAt=$hideAt, isSaved=$isSaved, memoryAt=$memoryAt, seenAt=$seenAt, showAt=$showAt, type=$type]'; - - Map toJson() { - final json = {}; - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - json[r'data'] = this.data; - if (this.hideAt.isPresent) { - final value = this.hideAt.value; - json[r'hideAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.isSaved.isPresent) { - final value = this.isSaved.value; - json[r'isSaved'] = value; - } - json[r'memoryAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.memoryAt.millisecondsSinceEpoch - : this.memoryAt.toUtc().toIso8601String(); - if (this.seenAt.isPresent) { - final value = this.seenAt.value; - json[r'seenAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.showAt.isPresent) { - final value = this.showAt.value; - json[r'showAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'type'] = this.type; - return json; - } - - /// Returns a new [MemoryCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryCreateDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryCreateDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryCreateDto( - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - data: OnThisDayDto.fromJson(json[r'data'])!, - hideAt: json.containsKey(r'hideAt') ? Optional.present(mapDateTime(json, r'hideAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - isSaved: json.containsKey(r'isSaved') ? Optional.present(mapValueOfType(json, r'isSaved')) : const Optional.absent(), - memoryAt: mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - seenAt: json.containsKey(r'seenAt') ? Optional.present(mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - showAt: json.containsKey(r'showAt') ? Optional.present(mapDateTime(json, r'showAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: MemoryType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - 'memoryAt', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/memory_response_dto.dart b/mobile/openapi/lib/model/memory_response_dto.dart deleted file mode 100644 index 41a522c773..0000000000 --- a/mobile/openapi/lib/model/memory_response_dto.dart +++ /dev/null @@ -1,251 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoryResponseDto { - /// Returns a new [MemoryResponseDto] instance. - MemoryResponseDto({ - this.assets = const [], - required this.createdAt, - required this.data, - this.deletedAt = const Optional.absent(), - this.hideAt = const Optional.absent(), - required this.id, - required this.isSaved, - required this.memoryAt, - required this.ownerId, - this.seenAt = const Optional.absent(), - this.showAt = const Optional.absent(), - required this.type, - required this.updatedAt, - }); - - List assets; - - /// Creation date - DateTime createdAt; - - OnThisDayDto data; - - /// Deletion date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional deletedAt; - - /// Date when memory should be hidden - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional hideAt; - - /// Memory ID - String id; - - /// Is memory saved - bool isSaved; - - /// Memory date - DateTime memoryAt; - - /// Owner user ID - String ownerId; - - /// Date when memory was seen - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional seenAt; - - /// Date when memory should be shown - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional showAt; - - MemoryType type; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryResponseDto && - _deepEquality.equals(other.assets, assets) && - other.createdAt == createdAt && - other.data == data && - other.deletedAt == deletedAt && - other.hideAt == hideAt && - other.id == id && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.ownerId == ownerId && - other.seenAt == seenAt && - other.showAt == showAt && - other.type == type && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (createdAt.hashCode) + - (data.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (hideAt == null ? 0 : hideAt!.hashCode) + - (id.hashCode) + - (isSaved.hashCode) + - (memoryAt.hashCode) + - (ownerId.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode) + - (showAt == null ? 0 : showAt!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'MemoryResponseDto[assets=$assets, createdAt=$createdAt, data=$data, deletedAt=$deletedAt, hideAt=$hideAt, id=$id, isSaved=$isSaved, memoryAt=$memoryAt, ownerId=$ownerId, seenAt=$seenAt, showAt=$showAt, type=$type, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'data'] = this.data; - if (this.deletedAt.isPresent) { - final value = this.deletedAt.value; - json[r'deletedAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.hideAt.isPresent) { - final value = this.hideAt.value; - json[r'hideAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'id'] = this.id; - json[r'isSaved'] = this.isSaved; - json[r'memoryAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.memoryAt.millisecondsSinceEpoch - : this.memoryAt.toUtc().toIso8601String(); - json[r'ownerId'] = this.ownerId; - if (this.seenAt.isPresent) { - final value = this.seenAt.value; - json[r'seenAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.showAt.isPresent) { - final value = this.showAt.value; - json[r'showAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'type'] = this.type; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [MemoryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryResponseDto( - assets: AssetResponseDto.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - data: OnThisDayDto.fromJson(json[r'data'])!, - deletedAt: json.containsKey(r'deletedAt') ? Optional.present(mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - hideAt: json.containsKey(r'hideAt') ? Optional.present(mapDateTime(json, r'hideAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isSaved: mapValueOfType(json, r'isSaved')!, - memoryAt: mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ownerId: mapValueOfType(json, r'ownerId')!, - seenAt: json.containsKey(r'seenAt') ? Optional.present(mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - showAt: json.containsKey(r'showAt') ? Optional.present(mapDateTime(json, r'showAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: MemoryType.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'createdAt', - 'data', - 'id', - 'isSaved', - 'memoryAt', - 'ownerId', - 'type', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/memory_search_order.dart b/mobile/openapi/lib/model/memory_search_order.dart deleted file mode 100644 index 6aa250459f..0000000000 --- a/mobile/openapi/lib/model/memory_search_order.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Sort order -enum MemorySearchOrder { - asc._(r'asc'), - desc._(r'desc'), - random._(r'random'), - ; - - /// Instantiate a new enum with the provided value. - const MemorySearchOrder._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [MemorySearchOrder] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static MemorySearchOrder? fromJson(dynamic value) => MemorySearchOrderTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [MemorySearchOrder] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemorySearchOrder.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MemorySearchOrder] to String, -/// and [decode] dynamic data back to [MemorySearchOrder]. -class MemorySearchOrderTypeTransformer { - factory MemorySearchOrderTypeTransformer() => _instance ??= const MemorySearchOrderTypeTransformer._(); - - const MemorySearchOrderTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(MemorySearchOrder data) => data._value; - - /// Returns the instance of [MemorySearchOrder] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - MemorySearchOrder? decode(dynamic data, {bool allowNull = true}) { - if (data is MemorySearchOrder) { - return data; - } - if (data != null) { - switch (data) { - case r'asc': return MemorySearchOrder.asc; - case r'desc': return MemorySearchOrder.desc; - case r'random': return MemorySearchOrder.random; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static MemorySearchOrderTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/memory_statistics_response_dto.dart b/mobile/openapi/lib/model/memory_statistics_response_dto.dart deleted file mode 100644 index ae542870d9..0000000000 --- a/mobile/openapi/lib/model/memory_statistics_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoryStatisticsResponseDto { - /// Returns a new [MemoryStatisticsResponseDto] instance. - MemoryStatisticsResponseDto({ - required this.total, - }); - - /// Total number of memories - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryStatisticsResponseDto && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (total.hashCode); - - @override - String toString() => 'MemoryStatisticsResponseDto[total=$total]'; - - Map toJson() { - final json = {}; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [MemoryStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryStatisticsResponseDto( - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/memory_type.dart b/mobile/openapi/lib/model/memory_type.dart deleted file mode 100644 index 4059008fff..0000000000 --- a/mobile/openapi/lib/model/memory_type.dart +++ /dev/null @@ -1,88 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Memory type -enum MemoryType { - onThisDay._(r'on_this_day'), - ; - - /// Instantiate a new enum with the provided value. - const MemoryType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [MemoryType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static MemoryType? fromJson(dynamic value) => MemoryTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [MemoryType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MemoryType] to String, -/// and [decode] dynamic data back to [MemoryType]. -class MemoryTypeTypeTransformer { - factory MemoryTypeTypeTransformer() => _instance ??= const MemoryTypeTypeTransformer._(); - - const MemoryTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(MemoryType data) => data._value; - - /// Returns the instance of [MemoryType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - MemoryType? decode(dynamic data, {bool allowNull = true}) { - if (data is MemoryType) { - return data; - } - if (data != null) { - switch (data) { - case r'on_this_day': return MemoryType.onThisDay; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static MemoryTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/memory_update_dto.dart b/mobile/openapi/lib/model/memory_update_dto.dart deleted file mode 100644 index 43e879745c..0000000000 --- a/mobile/openapi/lib/model/memory_update_dto.dart +++ /dev/null @@ -1,146 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoryUpdateDto { - /// Returns a new [MemoryUpdateDto] instance. - MemoryUpdateDto({ - this.isSaved = const Optional.absent(), - this.memoryAt = const Optional.absent(), - this.seenAt = const Optional.absent(), - }); - - /// Is memory saved - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isSaved; - - /// Memory date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional memoryAt; - - /// Date when memory was seen - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional seenAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryUpdateDto && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.seenAt == seenAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isSaved == null ? 0 : isSaved!.hashCode) + - (memoryAt == null ? 0 : memoryAt!.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode); - - @override - String toString() => 'MemoryUpdateDto[isSaved=$isSaved, memoryAt=$memoryAt, seenAt=$seenAt]'; - - Map toJson() { - final json = {}; - if (this.isSaved.isPresent) { - final value = this.isSaved.value; - json[r'isSaved'] = value; - } - if (this.memoryAt.isPresent) { - final value = this.memoryAt.value; - json[r'memoryAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.seenAt.isPresent) { - final value = this.seenAt.value; - json[r'seenAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - return json; - } - - /// Returns a new [MemoryUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryUpdateDto( - isSaved: json.containsKey(r'isSaved') ? Optional.present(mapValueOfType(json, r'isSaved')) : const Optional.absent(), - memoryAt: json.containsKey(r'memoryAt') ? Optional.present(mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - seenAt: json.containsKey(r'seenAt') ? Optional.present(mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/merge_person_dto.dart b/mobile/openapi/lib/model/merge_person_dto.dart deleted file mode 100644 index 8a647890c3..0000000000 --- a/mobile/openapi/lib/model/merge_person_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MergePersonDto { - /// Returns a new [MergePersonDto] instance. - MergePersonDto({ - this.ids = const [], - }); - - /// Person IDs to merge - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is MergePersonDto && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode); - - @override - String toString() => 'MergePersonDto[ids=$ids]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [MergePersonDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MergePersonDto? fromJson(dynamic value) { - upgradeDto(value, "MergePersonDto"); - if (value is Map) { - final json = value.cast(); - - return MergePersonDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MergePersonDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MergePersonDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MergePersonDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MergePersonDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/metadata_search_dto.dart b/mobile/openapi/lib/model/metadata_search_dto.dart deleted file mode 100644 index b0afd292ee..0000000000 --- a/mobile/openapi/lib/model/metadata_search_dto.dart +++ /dev/null @@ -1,767 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MetadataSearchDto { - /// Returns a new [MetadataSearchDto] instance. - MetadataSearchDto({ - this.albumIds = const Optional.present(const []), - this.checksum = const Optional.absent(), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.description = const Optional.absent(), - this.encodedVideoPath = const Optional.absent(), - this.id = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.order = const Optional.absent(), - this.originalFileName = const Optional.absent(), - this.originalPath = const Optional.absent(), - this.page = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.previewPath = const Optional.absent(), - this.rating = const Optional.absent(), - this.size = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.thumbnailPath = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - this.withDeleted = const Optional.absent(), - this.withExif = const Optional.absent(), - this.withPeople = const Optional.absent(), - this.withStacked = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by file checksum - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional checksum; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdBefore; - - /// Filter by description text - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Filter by encoded video file path - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional encodedVideoPath; - - /// Filter by asset ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional id; - - /// Filter by encoded status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isOffline; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ocr; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional order; - - /// Filter by original file name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional originalFileName; - - /// Filter by original file path - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional originalPath; - - /// Page number - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional page; - - /// Filter by person IDs - Optional?> personIds; - - /// Filter by preview file path - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional previewPath; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Number of results to return - /// - /// Minimum value: 1 - /// Maximum value: 1000 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional size; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenBefore; - - /// Filter by thumbnail file path - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thumbnailPath; - - /// Filter by trash date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// Filter by update date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - /// Include deleted assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withDeleted; - - /// Include EXIF data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withExif; - - /// Include people data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withPeople; - - /// Include stacked assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withStacked; - - @override - bool operator ==(Object other) => identical(this, other) || other is MetadataSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.checksum == checksum && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.description == description && - other.encodedVideoPath == encodedVideoPath && - other.id == id && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - other.order == order && - other.originalFileName == originalFileName && - other.originalPath == originalPath && - other.page == page && - _deepEquality.equals(other.personIds, personIds) && - other.previewPath == previewPath && - other.rating == rating && - other.size == size && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.thumbnailPath == thumbnailPath && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility && - other.withDeleted == withDeleted && - other.withExif == withExif && - other.withPeople == withPeople && - other.withStacked == withStacked; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (checksum == null ? 0 : checksum!.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) + - (id == null ? 0 : id!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (originalFileName == null ? 0 : originalFileName!.hashCode) + - (originalPath == null ? 0 : originalPath!.hashCode) + - (page == null ? 0 : page!.hashCode) + - (personIds.hashCode) + - (previewPath == null ? 0 : previewPath!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (size == null ? 0 : size!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (thumbnailPath == null ? 0 : thumbnailPath!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode) + - (withDeleted == null ? 0 : withDeleted!.hashCode) + - (withExif == null ? 0 : withExif!.hashCode) + - (withPeople == null ? 0 : withPeople!.hashCode) + - (withStacked == null ? 0 : withStacked!.hashCode); - - @override - String toString() => 'MetadataSearchDto[albumIds=$albumIds, checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, encodedVideoPath=$encodedVideoPath, id=$id, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, order=$order, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, previewPath=$previewPath, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, thumbnailPath=$thumbnailPath, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.checksum.isPresent) { - final value = this.checksum.value; - json[r'checksum'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.encodedVideoPath.isPresent) { - final value = this.encodedVideoPath.value; - json[r'encodedVideoPath'] = value; - } - if (this.id.isPresent) { - final value = this.id.value; - json[r'id'] = value; - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.order.isPresent) { - final value = this.order.value; - json[r'order'] = value; - } - if (this.originalFileName.isPresent) { - final value = this.originalFileName.value; - json[r'originalFileName'] = value; - } - if (this.originalPath.isPresent) { - final value = this.originalPath.value; - json[r'originalPath'] = value; - } - if (this.page.isPresent) { - final value = this.page.value; - json[r'page'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.previewPath.isPresent) { - final value = this.previewPath.value; - json[r'previewPath'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.size.isPresent) { - final value = this.size.value; - json[r'size'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.thumbnailPath.isPresent) { - final value = this.thumbnailPath.value; - json[r'thumbnailPath'] = value; - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - if (this.withDeleted.isPresent) { - final value = this.withDeleted.value; - json[r'withDeleted'] = value; - } - if (this.withExif.isPresent) { - final value = this.withExif.value; - json[r'withExif'] = value; - } - if (this.withPeople.isPresent) { - final value = this.withPeople.value; - json[r'withPeople'] = value; - } - if (this.withStacked.isPresent) { - final value = this.withStacked.value; - json[r'withStacked'] = value; - } - return json; - } - - /// Returns a new [MetadataSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MetadataSearchDto? fromJson(dynamic value) { - upgradeDto(value, "MetadataSearchDto"); - if (value is Map) { - final json = value.cast(); - - return MetadataSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - checksum: json.containsKey(r'checksum') ? Optional.present(mapValueOfType(json, r'checksum')) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - encodedVideoPath: json.containsKey(r'encodedVideoPath') ? Optional.present(mapValueOfType(json, r'encodedVideoPath')) : const Optional.absent(), - id: json.containsKey(r'id') ? Optional.present(mapValueOfType(json, r'id')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), - originalFileName: json.containsKey(r'originalFileName') ? Optional.present(mapValueOfType(json, r'originalFileName')) : const Optional.absent(), - originalPath: json.containsKey(r'originalPath') ? Optional.present(mapValueOfType(json, r'originalPath')) : const Optional.absent(), - page: json.containsKey(r'page') ? Optional.present(json[r'page'] == null ? null : int.parse('${json[r'page']}')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - previewPath: json.containsKey(r'previewPath') ? Optional.present(mapValueOfType(json, r'previewPath')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - size: json.containsKey(r'size') ? Optional.present(json[r'size'] == null ? null : int.parse('${json[r'size']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - thumbnailPath: json.containsKey(r'thumbnailPath') ? Optional.present(mapValueOfType(json, r'thumbnailPath')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - withDeleted: json.containsKey(r'withDeleted') ? Optional.present(mapValueOfType(json, r'withDeleted')) : const Optional.absent(), - withExif: json.containsKey(r'withExif') ? Optional.present(mapValueOfType(json, r'withExif')) : const Optional.absent(), - withPeople: json.containsKey(r'withPeople') ? Optional.present(mapValueOfType(json, r'withPeople')) : const Optional.absent(), - withStacked: json.containsKey(r'withStacked') ? Optional.present(mapValueOfType(json, r'withStacked')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MetadataSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MetadataSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MetadataSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MetadataSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/mirror_axis.dart b/mobile/openapi/lib/model/mirror_axis.dart deleted file mode 100644 index 38fc28adde..0000000000 --- a/mobile/openapi/lib/model/mirror_axis.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Axis to mirror along -enum MirrorAxis { - horizontal._(r'horizontal'), - vertical._(r'vertical'), - ; - - /// Instantiate a new enum with the provided value. - const MirrorAxis._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [MirrorAxis] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static MirrorAxis? fromJson(dynamic value) => MirrorAxisTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [MirrorAxis] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MirrorAxis.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MirrorAxis] to String, -/// and [decode] dynamic data back to [MirrorAxis]. -class MirrorAxisTypeTransformer { - factory MirrorAxisTypeTransformer() => _instance ??= const MirrorAxisTypeTransformer._(); - - const MirrorAxisTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(MirrorAxis data) => data._value; - - /// Returns the instance of [MirrorAxis] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - MirrorAxis? decode(dynamic data, {bool allowNull = true}) { - if (data is MirrorAxis) { - return data; - } - if (data != null) { - switch (data) { - case r'horizontal': return MirrorAxis.horizontal; - case r'vertical': return MirrorAxis.vertical; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static MirrorAxisTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/mirror_parameters.dart b/mobile/openapi/lib/model/mirror_parameters.dart deleted file mode 100644 index 78c3da786c..0000000000 --- a/mobile/openapi/lib/model/mirror_parameters.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MirrorParameters { - /// Returns a new [MirrorParameters] instance. - MirrorParameters({ - required this.axis, - }); - - MirrorAxis axis; - - @override - bool operator ==(Object other) => identical(this, other) || other is MirrorParameters && - other.axis == axis; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (axis.hashCode); - - @override - String toString() => 'MirrorParameters[axis=$axis]'; - - Map toJson() { - final json = {}; - json[r'axis'] = this.axis; - return json; - } - - /// Returns a new [MirrorParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MirrorParameters? fromJson(dynamic value) { - upgradeDto(value, "MirrorParameters"); - if (value is Map) { - final json = value.cast(); - - return MirrorParameters( - axis: MirrorAxis.fromJson(json[r'axis'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MirrorParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MirrorParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MirrorParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MirrorParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'axis', - }; -} - diff --git a/mobile/openapi/lib/model/notification_create_dto.dart b/mobile/openapi/lib/model/notification_create_dto.dart deleted file mode 100644 index b7f3528156..0000000000 --- a/mobile/openapi/lib/model/notification_create_dto.dart +++ /dev/null @@ -1,176 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationCreateDto { - /// Returns a new [NotificationCreateDto] instance. - NotificationCreateDto({ - this.data = const Optional.present(const {}), - this.description = const Optional.absent(), - this.level = const Optional.absent(), - this.readAt = const Optional.absent(), - required this.title, - this.type = const Optional.absent(), - required this.userId, - }); - - /// Additional notification data - Optional?> data; - - /// Notification description - Optional description; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional level; - - /// Date when notification was read - Optional readAt; - - /// Notification title - String title; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// User ID to send notification to - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationCreateDto && - _deepEquality.equals(other.data, data) && - other.description == description && - other.level == level && - other.readAt == readAt && - other.title == title && - other.type == type && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode) + - (description == null ? 0 : description!.hashCode) + - (level == null ? 0 : level!.hashCode) + - (readAt == null ? 0 : readAt!.hashCode) + - (title.hashCode) + - (type == null ? 0 : type!.hashCode) + - (userId.hashCode); - - @override - String toString() => 'NotificationCreateDto[data=$data, description=$description, level=$level, readAt=$readAt, title=$title, type=$type, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.data.isPresent) { - final value = this.data.value; - json[r'data'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.level.isPresent) { - final value = this.level.value; - json[r'level'] = value; - } - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'title'] = this.title; - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [NotificationCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationCreateDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationCreateDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationCreateDto( - data: json.containsKey(r'data') ? Optional.present(mapCastOfType(json, r'data')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - level: json.containsKey(r'level') ? Optional.present(NotificationLevel.fromJson(json[r'level'])) : const Optional.absent(), - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - title: mapValueOfType(json, r'title')!, - type: json.containsKey(r'type') ? Optional.present(NotificationType.fromJson(json[r'type'])) : const Optional.absent(), - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'title', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/notification_delete_all_dto.dart b/mobile/openapi/lib/model/notification_delete_all_dto.dart deleted file mode 100644 index 1b398a4f33..0000000000 --- a/mobile/openapi/lib/model/notification_delete_all_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationDeleteAllDto { - /// Returns a new [NotificationDeleteAllDto] instance. - NotificationDeleteAllDto({ - this.ids = const [], - }); - - /// Notification IDs to delete - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationDeleteAllDto && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode); - - @override - String toString() => 'NotificationDeleteAllDto[ids=$ids]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [NotificationDeleteAllDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationDeleteAllDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationDeleteAllDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationDeleteAllDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationDeleteAllDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationDeleteAllDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationDeleteAllDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationDeleteAllDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/notification_dto.dart b/mobile/openapi/lib/model/notification_dto.dart deleted file mode 100644 index 7609a6a021..0000000000 --- a/mobile/openapi/lib/model/notification_dto.dart +++ /dev/null @@ -1,183 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationDto { - /// Returns a new [NotificationDto] instance. - NotificationDto({ - required this.createdAt, - this.data = const Optional.present(const {}), - this.description = const Optional.absent(), - required this.id, - required this.level, - this.readAt = const Optional.absent(), - required this.title, - required this.type, - }); - - /// Creation date - DateTime createdAt; - - /// Additional notification data - Optional?> data; - - /// Notification description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Notification ID - String id; - - NotificationLevel level; - - /// Date when notification was read - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional readAt; - - /// Notification title - String title; - - NotificationType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationDto && - other.createdAt == createdAt && - _deepEquality.equals(other.data, data) && - other.description == description && - other.id == id && - other.level == level && - other.readAt == readAt && - other.title == title && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (data.hashCode) + - (description == null ? 0 : description!.hashCode) + - (id.hashCode) + - (level.hashCode) + - (readAt == null ? 0 : readAt!.hashCode) + - (title.hashCode) + - (type.hashCode); - - @override - String toString() => 'NotificationDto[createdAt=$createdAt, data=$data, description=$description, id=$id, level=$level, readAt=$readAt, title=$title, type=$type]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.data.isPresent) { - final value = this.data.value; - json[r'data'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - json[r'id'] = this.id; - json[r'level'] = this.level; - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'title'] = this.title; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [NotificationDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationDto( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - data: json.containsKey(r'data') ? Optional.present(mapCastOfType(json, r'data')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - level: NotificationLevel.fromJson(json[r'level'])!, - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - title: mapValueOfType(json, r'title')!, - type: NotificationType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'level', - 'title', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/notification_level.dart b/mobile/openapi/lib/model/notification_level.dart deleted file mode 100644 index e0e8c91b02..0000000000 --- a/mobile/openapi/lib/model/notification_level.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Notification level -enum NotificationLevel { - success._(r'success'), - error._(r'error'), - warning._(r'warning'), - info._(r'info'), - ; - - /// Instantiate a new enum with the provided value. - const NotificationLevel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [NotificationLevel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static NotificationLevel? fromJson(dynamic value) => NotificationLevelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [NotificationLevel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationLevel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [NotificationLevel] to String, -/// and [decode] dynamic data back to [NotificationLevel]. -class NotificationLevelTypeTransformer { - factory NotificationLevelTypeTransformer() => _instance ??= const NotificationLevelTypeTransformer._(); - - const NotificationLevelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(NotificationLevel data) => data._value; - - /// Returns the instance of [NotificationLevel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - NotificationLevel? decode(dynamic data, {bool allowNull = true}) { - if (data is NotificationLevel) { - return data; - } - if (data != null) { - switch (data) { - case r'success': return NotificationLevel.success; - case r'error': return NotificationLevel.error; - case r'warning': return NotificationLevel.warning; - case r'info': return NotificationLevel.info; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static NotificationLevelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/notification_type.dart b/mobile/openapi/lib/model/notification_type.dart deleted file mode 100644 index 5ff7aecbb5..0000000000 --- a/mobile/openapi/lib/model/notification_type.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Notification type -enum NotificationType { - jobFailed._(r'JobFailed'), - backupFailed._(r'BackupFailed'), - systemMessage._(r'SystemMessage'), - albumInvite._(r'AlbumInvite'), - albumUpdate._(r'AlbumUpdate'), - custom._(r'Custom'), - ; - - /// Instantiate a new enum with the provided value. - const NotificationType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [NotificationType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static NotificationType? fromJson(dynamic value) => NotificationTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [NotificationType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [NotificationType] to String, -/// and [decode] dynamic data back to [NotificationType]. -class NotificationTypeTypeTransformer { - factory NotificationTypeTypeTransformer() => _instance ??= const NotificationTypeTypeTransformer._(); - - const NotificationTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(NotificationType data) => data._value; - - /// Returns the instance of [NotificationType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - NotificationType? decode(dynamic data, {bool allowNull = true}) { - if (data is NotificationType) { - return data; - } - if (data != null) { - switch (data) { - case r'JobFailed': return NotificationType.jobFailed; - case r'BackupFailed': return NotificationType.backupFailed; - case r'SystemMessage': return NotificationType.systemMessage; - case r'AlbumInvite': return NotificationType.albumInvite; - case r'AlbumUpdate': return NotificationType.albumUpdate; - case r'Custom': return NotificationType.custom; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static NotificationTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/notification_update_all_dto.dart b/mobile/openapi/lib/model/notification_update_all_dto.dart deleted file mode 100644 index e3d15c5519..0000000000 --- a/mobile/openapi/lib/model/notification_update_all_dto.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationUpdateAllDto { - /// Returns a new [NotificationUpdateAllDto] instance. - NotificationUpdateAllDto({ - this.ids = const [], - this.readAt = const Optional.absent(), - }); - - /// Notification IDs to update - List ids; - - /// Date when notifications were read - Optional readAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationUpdateAllDto && - _deepEquality.equals(other.ids, ids) && - other.readAt == readAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode) + - (readAt == null ? 0 : readAt!.hashCode); - - @override - String toString() => 'NotificationUpdateAllDto[ids=$ids, readAt=$readAt]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - return json; - } - - /// Returns a new [NotificationUpdateAllDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationUpdateAllDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationUpdateAllDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationUpdateAllDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationUpdateAllDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationUpdateAllDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationUpdateAllDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationUpdateAllDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/notification_update_dto.dart b/mobile/openapi/lib/model/notification_update_dto.dart deleted file mode 100644 index 73a14ec7cd..0000000000 --- a/mobile/openapi/lib/model/notification_update_dto.dart +++ /dev/null @@ -1,104 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationUpdateDto { - /// Returns a new [NotificationUpdateDto] instance. - NotificationUpdateDto({ - this.readAt = const Optional.absent(), - }); - - /// Date when notification was read - Optional readAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationUpdateDto && - other.readAt == readAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (readAt == null ? 0 : readAt!.hashCode); - - @override - String toString() => 'NotificationUpdateDto[readAt=$readAt]'; - - Map toJson() { - final json = {}; - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - return json; - } - - /// Returns a new [NotificationUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationUpdateDto( - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_authorize_response_dto.dart b/mobile/openapi/lib/model/o_auth_authorize_response_dto.dart deleted file mode 100644 index 7eedc45673..0000000000 --- a/mobile/openapi/lib/model/o_auth_authorize_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OAuthAuthorizeResponseDto { - /// Returns a new [OAuthAuthorizeResponseDto] instance. - OAuthAuthorizeResponseDto({ - required this.url, - }); - - /// OAuth authorization URL - String url; - - @override - bool operator ==(Object other) => identical(this, other) || other is OAuthAuthorizeResponseDto && - other.url == url; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (url.hashCode); - - @override - String toString() => 'OAuthAuthorizeResponseDto[url=$url]'; - - Map toJson() { - final json = {}; - json[r'url'] = this.url; - return json; - } - - /// Returns a new [OAuthAuthorizeResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OAuthAuthorizeResponseDto? fromJson(dynamic value) { - upgradeDto(value, "OAuthAuthorizeResponseDto"); - if (value is Map) { - final json = value.cast(); - - return OAuthAuthorizeResponseDto( - url: mapValueOfType(json, r'url')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthAuthorizeResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OAuthAuthorizeResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OAuthAuthorizeResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OAuthAuthorizeResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'url', - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_callback_dto.dart b/mobile/openapi/lib/model/o_auth_callback_dto.dart deleted file mode 100644 index 61de33e1a6..0000000000 --- a/mobile/openapi/lib/model/o_auth_callback_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OAuthCallbackDto { - /// Returns a new [OAuthCallbackDto] instance. - OAuthCallbackDto({ - this.codeVerifier = const Optional.absent(), - this.state = const Optional.absent(), - required this.url, - }); - - /// OAuth code verifier (PKCE) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional codeVerifier; - - /// OAuth state parameter - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional state; - - /// OAuth callback URL - String url; - - @override - bool operator ==(Object other) => identical(this, other) || other is OAuthCallbackDto && - other.codeVerifier == codeVerifier && - other.state == state && - other.url == url; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (codeVerifier == null ? 0 : codeVerifier!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (url.hashCode); - - @override - String toString() => 'OAuthCallbackDto[codeVerifier=$codeVerifier, state=$state, url=$url]'; - - Map toJson() { - final json = {}; - if (this.codeVerifier.isPresent) { - final value = this.codeVerifier.value; - json[r'codeVerifier'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - json[r'url'] = this.url; - return json; - } - - /// Returns a new [OAuthCallbackDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OAuthCallbackDto? fromJson(dynamic value) { - upgradeDto(value, "OAuthCallbackDto"); - if (value is Map) { - final json = value.cast(); - - return OAuthCallbackDto( - codeVerifier: json.containsKey(r'codeVerifier') ? Optional.present(mapValueOfType(json, r'codeVerifier')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - url: mapValueOfType(json, r'url')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthCallbackDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OAuthCallbackDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OAuthCallbackDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OAuthCallbackDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'url', - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_config_dto.dart b/mobile/openapi/lib/model/o_auth_config_dto.dart deleted file mode 100644 index fb9f95dd92..0000000000 --- a/mobile/openapi/lib/model/o_auth_config_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OAuthConfigDto { - /// Returns a new [OAuthConfigDto] instance. - OAuthConfigDto({ - this.codeChallenge = const Optional.absent(), - required this.redirectUri, - this.state = const Optional.absent(), - }); - - /// OAuth code challenge (PKCE) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional codeChallenge; - - /// OAuth redirect URI - String redirectUri; - - /// OAuth state parameter - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional state; - - @override - bool operator ==(Object other) => identical(this, other) || other is OAuthConfigDto && - other.codeChallenge == codeChallenge && - other.redirectUri == redirectUri && - other.state == state; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (codeChallenge == null ? 0 : codeChallenge!.hashCode) + - (redirectUri.hashCode) + - (state == null ? 0 : state!.hashCode); - - @override - String toString() => 'OAuthConfigDto[codeChallenge=$codeChallenge, redirectUri=$redirectUri, state=$state]'; - - Map toJson() { - final json = {}; - if (this.codeChallenge.isPresent) { - final value = this.codeChallenge.value; - json[r'codeChallenge'] = value; - } - json[r'redirectUri'] = this.redirectUri; - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - return json; - } - - /// Returns a new [OAuthConfigDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OAuthConfigDto? fromJson(dynamic value) { - upgradeDto(value, "OAuthConfigDto"); - if (value is Map) { - final json = value.cast(); - - return OAuthConfigDto( - codeChallenge: json.containsKey(r'codeChallenge') ? Optional.present(mapValueOfType(json, r'codeChallenge')) : const Optional.absent(), - redirectUri: mapValueOfType(json, r'redirectUri')!, - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthConfigDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OAuthConfigDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OAuthConfigDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OAuthConfigDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'redirectUri', - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart b/mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart deleted file mode 100644 index f35eb25277..0000000000 --- a/mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// OAuth token endpoint auth method -enum OAuthTokenEndpointAuthMethod { - clientSecretPost._(r'client_secret_post'), - clientSecretBasic._(r'client_secret_basic'), - ; - - /// Instantiate a new enum with the provided value. - const OAuthTokenEndpointAuthMethod._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [OAuthTokenEndpointAuthMethod] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static OAuthTokenEndpointAuthMethod? fromJson(dynamic value) => OAuthTokenEndpointAuthMethodTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [OAuthTokenEndpointAuthMethod] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthTokenEndpointAuthMethod.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [OAuthTokenEndpointAuthMethod] to String, -/// and [decode] dynamic data back to [OAuthTokenEndpointAuthMethod]. -class OAuthTokenEndpointAuthMethodTypeTransformer { - factory OAuthTokenEndpointAuthMethodTypeTransformer() => _instance ??= const OAuthTokenEndpointAuthMethodTypeTransformer._(); - - const OAuthTokenEndpointAuthMethodTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(OAuthTokenEndpointAuthMethod data) => data._value; - - /// Returns the instance of [OAuthTokenEndpointAuthMethod] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - OAuthTokenEndpointAuthMethod? decode(dynamic data, {bool allowNull = true}) { - if (data is OAuthTokenEndpointAuthMethod) { - return data; - } - if (data != null) { - switch (data) { - case r'client_secret_post': return OAuthTokenEndpointAuthMethod.clientSecretPost; - case r'client_secret_basic': return OAuthTokenEndpointAuthMethod.clientSecretBasic; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static OAuthTokenEndpointAuthMethodTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/ocr_config.dart b/mobile/openapi/lib/model/ocr_config.dart deleted file mode 100644 index d58c8af3ee..0000000000 --- a/mobile/openapi/lib/model/ocr_config.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OcrConfig { - /// Returns a new [OcrConfig] instance. - OcrConfig({ - required this.enabled, - required this.maxResolution, - required this.minDetectionScore, - required this.minRecognitionScore, - required this.modelName, - }); - - /// Whether the task is enabled - bool enabled; - - /// Maximum resolution for OCR processing - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int maxResolution; - - /// Minimum confidence score for text detection - /// - /// Minimum value: 0.1 - /// Maximum value: 1 - double minDetectionScore; - - /// Minimum confidence score for text recognition - /// - /// Minimum value: 0.1 - /// Maximum value: 1 - double minRecognitionScore; - - /// Name of the model to use - String modelName; - - @override - bool operator ==(Object other) => identical(this, other) || other is OcrConfig && - other.enabled == enabled && - other.maxResolution == maxResolution && - other.minDetectionScore == minDetectionScore && - other.minRecognitionScore == minRecognitionScore && - other.modelName == modelName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (maxResolution.hashCode) + - (minDetectionScore.hashCode) + - (minRecognitionScore.hashCode) + - (modelName.hashCode); - - @override - String toString() => 'OcrConfig[enabled=$enabled, maxResolution=$maxResolution, minDetectionScore=$minDetectionScore, minRecognitionScore=$minRecognitionScore, modelName=$modelName]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'maxResolution'] = this.maxResolution; - json[r'minDetectionScore'] = this.minDetectionScore; - json[r'minRecognitionScore'] = this.minRecognitionScore; - json[r'modelName'] = this.modelName; - return json; - } - - /// Returns a new [OcrConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OcrConfig? fromJson(dynamic value) { - upgradeDto(value, "OcrConfig"); - if (value is Map) { - final json = value.cast(); - - return OcrConfig( - enabled: mapValueOfType(json, r'enabled')!, - maxResolution: mapValueOfType(json, r'maxResolution')!, - minDetectionScore: mapValueOfType(json, r'minDetectionScore')!, - minRecognitionScore: mapValueOfType(json, r'minRecognitionScore')!, - modelName: mapValueOfType(json, r'modelName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OcrConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OcrConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OcrConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OcrConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'maxResolution', - 'minDetectionScore', - 'minRecognitionScore', - 'modelName', - }; -} - diff --git a/mobile/openapi/lib/model/on_this_day_dto.dart b/mobile/openapi/lib/model/on_this_day_dto.dart deleted file mode 100644 index 77ae96532f..0000000000 --- a/mobile/openapi/lib/model/on_this_day_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OnThisDayDto { - /// Returns a new [OnThisDayDto] instance. - OnThisDayDto({ - required this.year, - }); - - /// Year for on this day memory - /// - /// Minimum value: 1000 - /// Maximum value: 9999 - int year; - - @override - bool operator ==(Object other) => identical(this, other) || other is OnThisDayDto && - other.year == year; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (year.hashCode); - - @override - String toString() => 'OnThisDayDto[year=$year]'; - - Map toJson() { - final json = {}; - json[r'year'] = this.year; - return json; - } - - /// Returns a new [OnThisDayDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OnThisDayDto? fromJson(dynamic value) { - upgradeDto(value, "OnThisDayDto"); - if (value is Map) { - final json = value.cast(); - - return OnThisDayDto( - year: mapValueOfType(json, r'year')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OnThisDayDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OnThisDayDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OnThisDayDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OnThisDayDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'year', - }; -} - diff --git a/mobile/openapi/lib/model/onboarding_dto.dart b/mobile/openapi/lib/model/onboarding_dto.dart deleted file mode 100644 index 8499bc9b9a..0000000000 --- a/mobile/openapi/lib/model/onboarding_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OnboardingDto { - /// Returns a new [OnboardingDto] instance. - OnboardingDto({ - required this.isOnboarded, - }); - - /// Is user onboarded - bool isOnboarded; - - @override - bool operator ==(Object other) => identical(this, other) || other is OnboardingDto && - other.isOnboarded == isOnboarded; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isOnboarded.hashCode); - - @override - String toString() => 'OnboardingDto[isOnboarded=$isOnboarded]'; - - Map toJson() { - final json = {}; - json[r'isOnboarded'] = this.isOnboarded; - return json; - } - - /// Returns a new [OnboardingDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OnboardingDto? fromJson(dynamic value) { - upgradeDto(value, "OnboardingDto"); - if (value is Map) { - final json = value.cast(); - - return OnboardingDto( - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OnboardingDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OnboardingDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OnboardingDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OnboardingDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isOnboarded', - }; -} - diff --git a/mobile/openapi/lib/model/onboarding_response_dto.dart b/mobile/openapi/lib/model/onboarding_response_dto.dart deleted file mode 100644 index 2b0dbe2b96..0000000000 --- a/mobile/openapi/lib/model/onboarding_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OnboardingResponseDto { - /// Returns a new [OnboardingResponseDto] instance. - OnboardingResponseDto({ - required this.isOnboarded, - }); - - /// Is user onboarded - bool isOnboarded; - - @override - bool operator ==(Object other) => identical(this, other) || other is OnboardingResponseDto && - other.isOnboarded == isOnboarded; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isOnboarded.hashCode); - - @override - String toString() => 'OnboardingResponseDto[isOnboarded=$isOnboarded]'; - - Map toJson() { - final json = {}; - json[r'isOnboarded'] = this.isOnboarded; - return json; - } - - /// Returns a new [OnboardingResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OnboardingResponseDto? fromJson(dynamic value) { - upgradeDto(value, "OnboardingResponseDto"); - if (value is Map) { - final json = value.cast(); - - return OnboardingResponseDto( - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OnboardingResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OnboardingResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OnboardingResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OnboardingResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isOnboarded', - }; -} - diff --git a/mobile/openapi/lib/model/partner_create_dto.dart b/mobile/openapi/lib/model/partner_create_dto.dart deleted file mode 100644 index 30aa96ff30..0000000000 --- a/mobile/openapi/lib/model/partner_create_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PartnerCreateDto { - /// Returns a new [PartnerCreateDto] instance. - PartnerCreateDto({ - required this.sharedWithId, - }); - - /// User ID to share with - String sharedWithId; - - @override - bool operator ==(Object other) => identical(this, other) || other is PartnerCreateDto && - other.sharedWithId == sharedWithId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sharedWithId.hashCode); - - @override - String toString() => 'PartnerCreateDto[sharedWithId=$sharedWithId]'; - - Map toJson() { - final json = {}; - json[r'sharedWithId'] = this.sharedWithId; - return json; - } - - /// Returns a new [PartnerCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PartnerCreateDto? fromJson(dynamic value) { - upgradeDto(value, "PartnerCreateDto"); - if (value is Map) { - final json = value.cast(); - - return PartnerCreateDto( - sharedWithId: mapValueOfType(json, r'sharedWithId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PartnerCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PartnerCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PartnerCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sharedWithId', - }; -} - diff --git a/mobile/openapi/lib/model/partner_direction.dart b/mobile/openapi/lib/model/partner_direction.dart deleted file mode 100644 index 7d8f224863..0000000000 --- a/mobile/openapi/lib/model/partner_direction.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Partner direction -enum PartnerDirection { - sharedBy._(r'shared-by'), - sharedWith._(r'shared-with'), - ; - - /// Instantiate a new enum with the provided value. - const PartnerDirection._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [PartnerDirection] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static PartnerDirection? fromJson(dynamic value) => PartnerDirectionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [PartnerDirection] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerDirection.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [PartnerDirection] to String, -/// and [decode] dynamic data back to [PartnerDirection]. -class PartnerDirectionTypeTransformer { - factory PartnerDirectionTypeTransformer() => _instance ??= const PartnerDirectionTypeTransformer._(); - - const PartnerDirectionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(PartnerDirection data) => data._value; - - /// Returns the instance of [PartnerDirection] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - PartnerDirection? decode(dynamic data, {bool allowNull = true}) { - if (data is PartnerDirection) { - return data; - } - if (data != null) { - switch (data) { - case r'shared-by': return PartnerDirection.sharedBy; - case r'shared-with': return PartnerDirection.sharedWith; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static PartnerDirectionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/partner_response_dto.dart b/mobile/openapi/lib/model/partner_response_dto.dart deleted file mode 100644 index 967c5b930b..0000000000 --- a/mobile/openapi/lib/model/partner_response_dto.dart +++ /dev/null @@ -1,161 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PartnerResponseDto { - /// Returns a new [PartnerResponseDto] instance. - PartnerResponseDto({ - required this.avatarColor, - required this.email, - required this.id, - this.inTimeline = const Optional.absent(), - required this.name, - required this.profileChangedAt, - required this.profileImagePath, - }); - - UserAvatarColor avatarColor; - - /// User email - String email; - - /// User ID - String id; - - /// Show in timeline - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional inTimeline; - - /// User name - String name; - - /// Profile change date - DateTime profileChangedAt; - - /// Profile image path - String profileImagePath; - - @override - bool operator ==(Object other) => identical(this, other) || other is PartnerResponseDto && - other.avatarColor == avatarColor && - other.email == email && - other.id == id && - other.inTimeline == inTimeline && - other.name == name && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor.hashCode) + - (email.hashCode) + - (id.hashCode) + - (inTimeline == null ? 0 : inTimeline!.hashCode) + - (name.hashCode) + - (profileChangedAt.hashCode) + - (profileImagePath.hashCode); - - @override - String toString() => 'PartnerResponseDto[avatarColor=$avatarColor, email=$email, id=$id, inTimeline=$inTimeline, name=$name, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath]'; - - Map toJson() { - final json = {}; - json[r'avatarColor'] = this.avatarColor; - json[r'email'] = this.email; - json[r'id'] = this.id; - if (this.inTimeline.isPresent) { - final value = this.inTimeline.value; - json[r'inTimeline'] = value; - } - json[r'name'] = this.name; - json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - return json; - } - - /// Returns a new [PartnerResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PartnerResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PartnerResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PartnerResponseDto( - avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!, - email: mapValueOfType(json, r'email')!, - id: mapValueOfType(json, r'id')!, - inTimeline: json.containsKey(r'inTimeline') ? Optional.present(mapValueOfType(json, r'inTimeline')) : const Optional.absent(), - name: mapValueOfType(json, r'name')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PartnerResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PartnerResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PartnerResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'avatarColor', - 'email', - 'id', - 'name', - 'profileChangedAt', - 'profileImagePath', - }; -} - diff --git a/mobile/openapi/lib/model/partner_update_dto.dart b/mobile/openapi/lib/model/partner_update_dto.dart deleted file mode 100644 index db3516e3a1..0000000000 --- a/mobile/openapi/lib/model/partner_update_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PartnerUpdateDto { - /// Returns a new [PartnerUpdateDto] instance. - PartnerUpdateDto({ - required this.inTimeline, - }); - - /// Show partner assets in timeline - bool inTimeline; - - @override - bool operator ==(Object other) => identical(this, other) || other is PartnerUpdateDto && - other.inTimeline == inTimeline; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (inTimeline.hashCode); - - @override - String toString() => 'PartnerUpdateDto[inTimeline=$inTimeline]'; - - Map toJson() { - final json = {}; - json[r'inTimeline'] = this.inTimeline; - return json; - } - - /// Returns a new [PartnerUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PartnerUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "PartnerUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return PartnerUpdateDto( - inTimeline: mapValueOfType(json, r'inTimeline')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PartnerUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PartnerUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PartnerUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'inTimeline', - }; -} - diff --git a/mobile/openapi/lib/model/people_response.dart b/mobile/openapi/lib/model/people_response.dart deleted file mode 100644 index 838d1e2324..0000000000 --- a/mobile/openapi/lib/model/people_response.dart +++ /dev/null @@ -1,129 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleResponse { - /// Returns a new [PeopleResponse] instance. - PeopleResponse({ - required this.enabled, - this.minimumFaces = const Optional.absent(), - required this.sidebarWeb, - }); - - /// Whether people are enabled - bool enabled; - - /// People face threshold - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional minimumFaces; - - /// Whether people appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleResponse && - other.enabled == enabled && - other.minimumFaces == minimumFaces && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (minimumFaces == null ? 0 : minimumFaces!.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'PeopleResponse[enabled=$enabled, minimumFaces=$minimumFaces, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - if (this.minimumFaces.isPresent) { - final value = this.minimumFaces.value; - json[r'minimumFaces'] = value; - } - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [PeopleResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleResponse? fromJson(dynamic value) { - upgradeDto(value, "PeopleResponse"); - if (value is Map) { - final json = value.cast(); - - return PeopleResponse( - enabled: mapValueOfType(json, r'enabled')!, - minimumFaces: json.containsKey(r'minimumFaces') ? Optional.present(json[r'minimumFaces'] == null ? null : int.parse('${json[r'minimumFaces']}')) : const Optional.absent(), - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/people_response_dto.dart b/mobile/openapi/lib/model/people_response_dto.dart deleted file mode 100644 index f9fc157239..0000000000 --- a/mobile/openapi/lib/model/people_response_dto.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleResponseDto { - /// Returns a new [PeopleResponseDto] instance. - PeopleResponseDto({ - this.hasNextPage = const Optional.absent(), - required this.hidden, - this.people = const [], - required this.total, - }); - - /// Whether there are more pages - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional hasNextPage; - - /// Number of hidden people - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int hidden; - - List people; - - /// Total number of people - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleResponseDto && - other.hasNextPage == hasNextPage && - other.hidden == hidden && - _deepEquality.equals(other.people, people) && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (hasNextPage == null ? 0 : hasNextPage!.hashCode) + - (hidden.hashCode) + - (people.hashCode) + - (total.hashCode); - - @override - String toString() => 'PeopleResponseDto[hasNextPage=$hasNextPage, hidden=$hidden, people=$people, total=$total]'; - - Map toJson() { - final json = {}; - if (this.hasNextPage.isPresent) { - final value = this.hasNextPage.value; - json[r'hasNextPage'] = value; - } - json[r'hidden'] = this.hidden; - json[r'people'] = this.people; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [PeopleResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PeopleResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PeopleResponseDto( - hasNextPage: json.containsKey(r'hasNextPage') ? Optional.present(mapValueOfType(json, r'hasNextPage')) : const Optional.absent(), - hidden: mapValueOfType(json, r'hidden')!, - people: PersonResponseDto.listFromJson(json[r'people']), - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'hidden', - 'people', - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/people_update.dart b/mobile/openapi/lib/model/people_update.dart deleted file mode 100644 index ea8ae73138..0000000000 --- a/mobile/openapi/lib/model/people_update.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleUpdate { - /// Returns a new [PeopleUpdate] instance. - PeopleUpdate({ - this.enabled = const Optional.absent(), - this.minimumFaces = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether people are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// People face threshold - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional minimumFaces; - - /// Whether people appear in web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleUpdate && - other.enabled == enabled && - other.minimumFaces == minimumFaces && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (minimumFaces == null ? 0 : minimumFaces!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'PeopleUpdate[enabled=$enabled, minimumFaces=$minimumFaces, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.minimumFaces.isPresent) { - final value = this.minimumFaces.value; - json[r'minimumFaces'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [PeopleUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleUpdate? fromJson(dynamic value) { - upgradeDto(value, "PeopleUpdate"); - if (value is Map) { - final json = value.cast(); - - return PeopleUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - minimumFaces: json.containsKey(r'minimumFaces') ? Optional.present(json[r'minimumFaces'] == null ? null : int.parse('${json[r'minimumFaces']}')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/people_update_dto.dart b/mobile/openapi/lib/model/people_update_dto.dart deleted file mode 100644 index c9ce74d659..0000000000 --- a/mobile/openapi/lib/model/people_update_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleUpdateDto { - /// Returns a new [PeopleUpdateDto] instance. - PeopleUpdateDto({ - this.people = const [], - }); - - /// People to update - List people; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleUpdateDto && - _deepEquality.equals(other.people, people); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (people.hashCode); - - @override - String toString() => 'PeopleUpdateDto[people=$people]'; - - Map toJson() { - final json = {}; - json[r'people'] = this.people; - return json; - } - - /// Returns a new [PeopleUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "PeopleUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return PeopleUpdateDto( - people: PeopleUpdateItem.listFromJson(json[r'people']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'people', - }; -} - diff --git a/mobile/openapi/lib/model/people_update_item.dart b/mobile/openapi/lib/model/people_update_item.dart deleted file mode 100644 index 9ebbd93e28..0000000000 --- a/mobile/openapi/lib/model/people_update_item.dart +++ /dev/null @@ -1,190 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleUpdateItem { - /// Returns a new [PeopleUpdateItem] instance. - PeopleUpdateItem({ - this.birthDate = const Optional.absent(), - this.color = const Optional.absent(), - this.featureFaceAssetId = const Optional.absent(), - required this.id, - this.isFavorite = const Optional.absent(), - this.isHidden = const Optional.absent(), - this.name = const Optional.absent(), - }); - - /// Person date of birth - Optional birthDate; - - /// Person color (hex) - Optional color; - - /// Asset ID used for feature face thumbnail - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional featureFaceAssetId; - - /// Person ID - String id; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Person visibility (hidden) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isHidden; - - /// Person name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleUpdateItem && - other.birthDate == birthDate && - other.color == color && - other.featureFaceAssetId == featureFaceAssetId && - other.id == id && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (featureFaceAssetId == null ? 0 : featureFaceAssetId!.hashCode) + - (id.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden == null ? 0 : isHidden!.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'PeopleUpdateItem[birthDate=$birthDate, color=$color, featureFaceAssetId=$featureFaceAssetId, id=$id, isFavorite=$isFavorite, isHidden=$isHidden, name=$name]'; - - Map toJson() { - final json = {}; - if (this.birthDate.isPresent) { - final value = this.birthDate.value; - json[r'birthDate'] = value == null ? null : _dateFormatter.format(value.toUtc()); - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - if (this.featureFaceAssetId.isPresent) { - final value = this.featureFaceAssetId.value; - json[r'featureFaceAssetId'] = value; - } - json[r'id'] = this.id; - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isHidden.isPresent) { - final value = this.isHidden.value; - json[r'isHidden'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [PeopleUpdateItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleUpdateItem? fromJson(dynamic value) { - upgradeDto(value, "PeopleUpdateItem"); - if (value is Map) { - final json = value.cast(); - - return PeopleUpdateItem( - birthDate: json.containsKey(r'birthDate') ? Optional.present(mapDateTime(json, r'birthDate', r'')) : const Optional.absent(), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - featureFaceAssetId: json.containsKey(r'featureFaceAssetId') ? Optional.present(mapValueOfType(json, r'featureFaceAssetId')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: json.containsKey(r'isHidden') ? Optional.present(mapValueOfType(json, r'isHidden')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleUpdateItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleUpdateItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleUpdateItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleUpdateItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/permission.dart b/mobile/openapi/lib/model/permission.dart deleted file mode 100644 index 1502dae59f..0000000000 --- a/mobile/openapi/lib/model/permission.dart +++ /dev/null @@ -1,396 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// List of permissions -enum Permission { - all._(r'all'), - activityPeriodCreate._(r'activity.create'), - activityPeriodRead._(r'activity.read'), - activityPeriodUpdate._(r'activity.update'), - activityPeriodDelete._(r'activity.delete'), - activityPeriodStatistics._(r'activity.statistics'), - apiKeyPeriodCreate._(r'apiKey.create'), - apiKeyPeriodRead._(r'apiKey.read'), - apiKeyPeriodUpdate._(r'apiKey.update'), - apiKeyPeriodDelete._(r'apiKey.delete'), - assetPeriodRead._(r'asset.read'), - assetPeriodUpdate._(r'asset.update'), - assetPeriodDelete._(r'asset.delete'), - assetPeriodStatistics._(r'asset.statistics'), - assetPeriodShare._(r'asset.share'), - assetPeriodView._(r'asset.view'), - assetPeriodDownload._(r'asset.download'), - assetPeriodUpload._(r'asset.upload'), - assetPeriodCopy._(r'asset.copy'), - assetPeriodDerive._(r'asset.derive'), - assetPeriodEditPeriodGet._(r'asset.edit.get'), - assetPeriodEditPeriodCreate._(r'asset.edit.create'), - assetPeriodEditPeriodDelete._(r'asset.edit.delete'), - albumPeriodCreate._(r'album.create'), - albumPeriodRead._(r'album.read'), - albumPeriodUpdate._(r'album.update'), - albumPeriodDelete._(r'album.delete'), - albumPeriodStatistics._(r'album.statistics'), - albumPeriodShare._(r'album.share'), - albumPeriodDownload._(r'album.download'), - albumAssetPeriodCreate._(r'albumAsset.create'), - albumAssetPeriodDelete._(r'albumAsset.delete'), - albumUserPeriodCreate._(r'albumUser.create'), - albumUserPeriodUpdate._(r'albumUser.update'), - albumUserPeriodDelete._(r'albumUser.delete'), - authPeriodChangePassword._(r'auth.changePassword'), - authDevicePeriodDelete._(r'authDevice.delete'), - archivePeriodRead._(r'archive.read'), - backupPeriodList._(r'backup.list'), - backupPeriodDownload._(r'backup.download'), - backupPeriodUpload._(r'backup.upload'), - backupPeriodDelete._(r'backup.delete'), - duplicatePeriodRead._(r'duplicate.read'), - duplicatePeriodDelete._(r'duplicate.delete'), - facePeriodCreate._(r'face.create'), - facePeriodRead._(r'face.read'), - facePeriodUpdate._(r'face.update'), - facePeriodDelete._(r'face.delete'), - folderPeriodRead._(r'folder.read'), - jobPeriodCreate._(r'job.create'), - jobPeriodRead._(r'job.read'), - libraryPeriodCreate._(r'library.create'), - libraryPeriodRead._(r'library.read'), - libraryPeriodUpdate._(r'library.update'), - libraryPeriodDelete._(r'library.delete'), - libraryPeriodStatistics._(r'library.statistics'), - timelinePeriodRead._(r'timeline.read'), - timelinePeriodDownload._(r'timeline.download'), - maintenance._(r'maintenance'), - mapPeriodRead._(r'map.read'), - mapPeriodSearch._(r'map.search'), - memoryPeriodCreate._(r'memory.create'), - memoryPeriodRead._(r'memory.read'), - memoryPeriodUpdate._(r'memory.update'), - memoryPeriodDelete._(r'memory.delete'), - memoryPeriodStatistics._(r'memory.statistics'), - memoryAssetPeriodCreate._(r'memoryAsset.create'), - memoryAssetPeriodDelete._(r'memoryAsset.delete'), - notificationPeriodCreate._(r'notification.create'), - notificationPeriodRead._(r'notification.read'), - notificationPeriodUpdate._(r'notification.update'), - notificationPeriodDelete._(r'notification.delete'), - partnerPeriodCreate._(r'partner.create'), - partnerPeriodRead._(r'partner.read'), - partnerPeriodUpdate._(r'partner.update'), - partnerPeriodDelete._(r'partner.delete'), - personPeriodCreate._(r'person.create'), - personPeriodRead._(r'person.read'), - personPeriodUpdate._(r'person.update'), - personPeriodDelete._(r'person.delete'), - personPeriodStatistics._(r'person.statistics'), - personPeriodMerge._(r'person.merge'), - personPeriodReassign._(r'person.reassign'), - pinCodePeriodCreate._(r'pinCode.create'), - pinCodePeriodUpdate._(r'pinCode.update'), - pinCodePeriodDelete._(r'pinCode.delete'), - pluginPeriodCreate._(r'plugin.create'), - pluginPeriodRead._(r'plugin.read'), - pluginPeriodUpdate._(r'plugin.update'), - pluginPeriodDelete._(r'plugin.delete'), - serverPeriodAbout._(r'server.about'), - serverPeriodApkLinks._(r'server.apkLinks'), - serverPeriodStorage._(r'server.storage'), - serverPeriodStatistics._(r'server.statistics'), - serverPeriodVersionCheck._(r'server.versionCheck'), - serverLicensePeriodRead._(r'serverLicense.read'), - serverLicensePeriodUpdate._(r'serverLicense.update'), - serverLicensePeriodDelete._(r'serverLicense.delete'), - sessionPeriodCreate._(r'session.create'), - sessionPeriodRead._(r'session.read'), - sessionPeriodUpdate._(r'session.update'), - sessionPeriodDelete._(r'session.delete'), - sessionPeriodLock._(r'session.lock'), - sharedLinkPeriodCreate._(r'sharedLink.create'), - sharedLinkPeriodRead._(r'sharedLink.read'), - sharedLinkPeriodUpdate._(r'sharedLink.update'), - sharedLinkPeriodDelete._(r'sharedLink.delete'), - stackPeriodCreate._(r'stack.create'), - stackPeriodRead._(r'stack.read'), - stackPeriodUpdate._(r'stack.update'), - stackPeriodDelete._(r'stack.delete'), - syncPeriodStream._(r'sync.stream'), - syncCheckpointPeriodRead._(r'syncCheckpoint.read'), - syncCheckpointPeriodUpdate._(r'syncCheckpoint.update'), - syncCheckpointPeriodDelete._(r'syncCheckpoint.delete'), - systemConfigPeriodRead._(r'systemConfig.read'), - systemConfigPeriodUpdate._(r'systemConfig.update'), - systemMetadataPeriodRead._(r'systemMetadata.read'), - systemMetadataPeriodUpdate._(r'systemMetadata.update'), - tagPeriodCreate._(r'tag.create'), - tagPeriodRead._(r'tag.read'), - tagPeriodUpdate._(r'tag.update'), - tagPeriodDelete._(r'tag.delete'), - tagPeriodAsset._(r'tag.asset'), - userPeriodRead._(r'user.read'), - userPeriodUpdate._(r'user.update'), - userLicensePeriodCreate._(r'userLicense.create'), - userLicensePeriodRead._(r'userLicense.read'), - userLicensePeriodUpdate._(r'userLicense.update'), - userLicensePeriodDelete._(r'userLicense.delete'), - userOnboardingPeriodRead._(r'userOnboarding.read'), - userOnboardingPeriodUpdate._(r'userOnboarding.update'), - userOnboardingPeriodDelete._(r'userOnboarding.delete'), - userPreferencePeriodRead._(r'userPreference.read'), - userPreferencePeriodUpdate._(r'userPreference.update'), - userProfileImagePeriodCreate._(r'userProfileImage.create'), - userProfileImagePeriodRead._(r'userProfileImage.read'), - userProfileImagePeriodUpdate._(r'userProfileImage.update'), - userProfileImagePeriodDelete._(r'userProfileImage.delete'), - queuePeriodRead._(r'queue.read'), - queuePeriodUpdate._(r'queue.update'), - queueJobPeriodCreate._(r'queueJob.create'), - queueJobPeriodRead._(r'queueJob.read'), - queueJobPeriodUpdate._(r'queueJob.update'), - queueJobPeriodDelete._(r'queueJob.delete'), - workflowPeriodCreate._(r'workflow.create'), - workflowPeriodRead._(r'workflow.read'), - workflowPeriodUpdate._(r'workflow.update'), - workflowPeriodDelete._(r'workflow.delete'), - adminUserPeriodCreate._(r'adminUser.create'), - adminUserPeriodRead._(r'adminUser.read'), - adminUserPeriodUpdate._(r'adminUser.update'), - adminUserPeriodDelete._(r'adminUser.delete'), - adminSessionPeriodRead._(r'adminSession.read'), - adminAuthPeriodUnlinkAll._(r'adminAuth.unlinkAll'), - ; - - /// Instantiate a new enum with the provided value. - const Permission._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [Permission] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static Permission? fromJson(dynamic value) => PermissionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [Permission] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = Permission.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [Permission] to String, -/// and [decode] dynamic data back to [Permission]. -class PermissionTypeTransformer { - factory PermissionTypeTransformer() => _instance ??= const PermissionTypeTransformer._(); - - const PermissionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(Permission data) => data._value; - - /// Returns the instance of [Permission] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - Permission? decode(dynamic data, {bool allowNull = true}) { - if (data is Permission) { - return data; - } - if (data != null) { - switch (data) { - case r'all': return Permission.all; - case r'activity.create': return Permission.activityPeriodCreate; - case r'activity.read': return Permission.activityPeriodRead; - case r'activity.update': return Permission.activityPeriodUpdate; - case r'activity.delete': return Permission.activityPeriodDelete; - case r'activity.statistics': return Permission.activityPeriodStatistics; - case r'apiKey.create': return Permission.apiKeyPeriodCreate; - case r'apiKey.read': return Permission.apiKeyPeriodRead; - case r'apiKey.update': return Permission.apiKeyPeriodUpdate; - case r'apiKey.delete': return Permission.apiKeyPeriodDelete; - case r'asset.read': return Permission.assetPeriodRead; - case r'asset.update': return Permission.assetPeriodUpdate; - case r'asset.delete': return Permission.assetPeriodDelete; - case r'asset.statistics': return Permission.assetPeriodStatistics; - case r'asset.share': return Permission.assetPeriodShare; - case r'asset.view': return Permission.assetPeriodView; - case r'asset.download': return Permission.assetPeriodDownload; - case r'asset.upload': return Permission.assetPeriodUpload; - case r'asset.copy': return Permission.assetPeriodCopy; - case r'asset.derive': return Permission.assetPeriodDerive; - case r'asset.edit.get': return Permission.assetPeriodEditPeriodGet; - case r'asset.edit.create': return Permission.assetPeriodEditPeriodCreate; - case r'asset.edit.delete': return Permission.assetPeriodEditPeriodDelete; - case r'album.create': return Permission.albumPeriodCreate; - case r'album.read': return Permission.albumPeriodRead; - case r'album.update': return Permission.albumPeriodUpdate; - case r'album.delete': return Permission.albumPeriodDelete; - case r'album.statistics': return Permission.albumPeriodStatistics; - case r'album.share': return Permission.albumPeriodShare; - case r'album.download': return Permission.albumPeriodDownload; - case r'albumAsset.create': return Permission.albumAssetPeriodCreate; - case r'albumAsset.delete': return Permission.albumAssetPeriodDelete; - case r'albumUser.create': return Permission.albumUserPeriodCreate; - case r'albumUser.update': return Permission.albumUserPeriodUpdate; - case r'albumUser.delete': return Permission.albumUserPeriodDelete; - case r'auth.changePassword': return Permission.authPeriodChangePassword; - case r'authDevice.delete': return Permission.authDevicePeriodDelete; - case r'archive.read': return Permission.archivePeriodRead; - case r'backup.list': return Permission.backupPeriodList; - case r'backup.download': return Permission.backupPeriodDownload; - case r'backup.upload': return Permission.backupPeriodUpload; - case r'backup.delete': return Permission.backupPeriodDelete; - case r'duplicate.read': return Permission.duplicatePeriodRead; - case r'duplicate.delete': return Permission.duplicatePeriodDelete; - case r'face.create': return Permission.facePeriodCreate; - case r'face.read': return Permission.facePeriodRead; - case r'face.update': return Permission.facePeriodUpdate; - case r'face.delete': return Permission.facePeriodDelete; - case r'folder.read': return Permission.folderPeriodRead; - case r'job.create': return Permission.jobPeriodCreate; - case r'job.read': return Permission.jobPeriodRead; - case r'library.create': return Permission.libraryPeriodCreate; - case r'library.read': return Permission.libraryPeriodRead; - case r'library.update': return Permission.libraryPeriodUpdate; - case r'library.delete': return Permission.libraryPeriodDelete; - case r'library.statistics': return Permission.libraryPeriodStatistics; - case r'timeline.read': return Permission.timelinePeriodRead; - case r'timeline.download': return Permission.timelinePeriodDownload; - case r'maintenance': return Permission.maintenance; - case r'map.read': return Permission.mapPeriodRead; - case r'map.search': return Permission.mapPeriodSearch; - case r'memory.create': return Permission.memoryPeriodCreate; - case r'memory.read': return Permission.memoryPeriodRead; - case r'memory.update': return Permission.memoryPeriodUpdate; - case r'memory.delete': return Permission.memoryPeriodDelete; - case r'memory.statistics': return Permission.memoryPeriodStatistics; - case r'memoryAsset.create': return Permission.memoryAssetPeriodCreate; - case r'memoryAsset.delete': return Permission.memoryAssetPeriodDelete; - case r'notification.create': return Permission.notificationPeriodCreate; - case r'notification.read': return Permission.notificationPeriodRead; - case r'notification.update': return Permission.notificationPeriodUpdate; - case r'notification.delete': return Permission.notificationPeriodDelete; - case r'partner.create': return Permission.partnerPeriodCreate; - case r'partner.read': return Permission.partnerPeriodRead; - case r'partner.update': return Permission.partnerPeriodUpdate; - case r'partner.delete': return Permission.partnerPeriodDelete; - case r'person.create': return Permission.personPeriodCreate; - case r'person.read': return Permission.personPeriodRead; - case r'person.update': return Permission.personPeriodUpdate; - case r'person.delete': return Permission.personPeriodDelete; - case r'person.statistics': return Permission.personPeriodStatistics; - case r'person.merge': return Permission.personPeriodMerge; - case r'person.reassign': return Permission.personPeriodReassign; - case r'pinCode.create': return Permission.pinCodePeriodCreate; - case r'pinCode.update': return Permission.pinCodePeriodUpdate; - case r'pinCode.delete': return Permission.pinCodePeriodDelete; - case r'plugin.create': return Permission.pluginPeriodCreate; - case r'plugin.read': return Permission.pluginPeriodRead; - case r'plugin.update': return Permission.pluginPeriodUpdate; - case r'plugin.delete': return Permission.pluginPeriodDelete; - case r'server.about': return Permission.serverPeriodAbout; - case r'server.apkLinks': return Permission.serverPeriodApkLinks; - case r'server.storage': return Permission.serverPeriodStorage; - case r'server.statistics': return Permission.serverPeriodStatistics; - case r'server.versionCheck': return Permission.serverPeriodVersionCheck; - case r'serverLicense.read': return Permission.serverLicensePeriodRead; - case r'serverLicense.update': return Permission.serverLicensePeriodUpdate; - case r'serverLicense.delete': return Permission.serverLicensePeriodDelete; - case r'session.create': return Permission.sessionPeriodCreate; - case r'session.read': return Permission.sessionPeriodRead; - case r'session.update': return Permission.sessionPeriodUpdate; - case r'session.delete': return Permission.sessionPeriodDelete; - case r'session.lock': return Permission.sessionPeriodLock; - case r'sharedLink.create': return Permission.sharedLinkPeriodCreate; - case r'sharedLink.read': return Permission.sharedLinkPeriodRead; - case r'sharedLink.update': return Permission.sharedLinkPeriodUpdate; - case r'sharedLink.delete': return Permission.sharedLinkPeriodDelete; - case r'stack.create': return Permission.stackPeriodCreate; - case r'stack.read': return Permission.stackPeriodRead; - case r'stack.update': return Permission.stackPeriodUpdate; - case r'stack.delete': return Permission.stackPeriodDelete; - case r'sync.stream': return Permission.syncPeriodStream; - case r'syncCheckpoint.read': return Permission.syncCheckpointPeriodRead; - case r'syncCheckpoint.update': return Permission.syncCheckpointPeriodUpdate; - case r'syncCheckpoint.delete': return Permission.syncCheckpointPeriodDelete; - case r'systemConfig.read': return Permission.systemConfigPeriodRead; - case r'systemConfig.update': return Permission.systemConfigPeriodUpdate; - case r'systemMetadata.read': return Permission.systemMetadataPeriodRead; - case r'systemMetadata.update': return Permission.systemMetadataPeriodUpdate; - case r'tag.create': return Permission.tagPeriodCreate; - case r'tag.read': return Permission.tagPeriodRead; - case r'tag.update': return Permission.tagPeriodUpdate; - case r'tag.delete': return Permission.tagPeriodDelete; - case r'tag.asset': return Permission.tagPeriodAsset; - case r'user.read': return Permission.userPeriodRead; - case r'user.update': return Permission.userPeriodUpdate; - case r'userLicense.create': return Permission.userLicensePeriodCreate; - case r'userLicense.read': return Permission.userLicensePeriodRead; - case r'userLicense.update': return Permission.userLicensePeriodUpdate; - case r'userLicense.delete': return Permission.userLicensePeriodDelete; - case r'userOnboarding.read': return Permission.userOnboardingPeriodRead; - case r'userOnboarding.update': return Permission.userOnboardingPeriodUpdate; - case r'userOnboarding.delete': return Permission.userOnboardingPeriodDelete; - case r'userPreference.read': return Permission.userPreferencePeriodRead; - case r'userPreference.update': return Permission.userPreferencePeriodUpdate; - case r'userProfileImage.create': return Permission.userProfileImagePeriodCreate; - case r'userProfileImage.read': return Permission.userProfileImagePeriodRead; - case r'userProfileImage.update': return Permission.userProfileImagePeriodUpdate; - case r'userProfileImage.delete': return Permission.userProfileImagePeriodDelete; - case r'queue.read': return Permission.queuePeriodRead; - case r'queue.update': return Permission.queuePeriodUpdate; - case r'queueJob.create': return Permission.queueJobPeriodCreate; - case r'queueJob.read': return Permission.queueJobPeriodRead; - case r'queueJob.update': return Permission.queueJobPeriodUpdate; - case r'queueJob.delete': return Permission.queueJobPeriodDelete; - case r'workflow.create': return Permission.workflowPeriodCreate; - case r'workflow.read': return Permission.workflowPeriodRead; - case r'workflow.update': return Permission.workflowPeriodUpdate; - case r'workflow.delete': return Permission.workflowPeriodDelete; - case r'adminUser.create': return Permission.adminUserPeriodCreate; - case r'adminUser.read': return Permission.adminUserPeriodRead; - case r'adminUser.update': return Permission.adminUserPeriodUpdate; - case r'adminUser.delete': return Permission.adminUserPeriodDelete; - case r'adminSession.read': return Permission.adminSessionPeriodRead; - case r'adminAuth.unlinkAll': return Permission.adminAuthPeriodUnlinkAll; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static PermissionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/person_create_dto.dart b/mobile/openapi/lib/model/person_create_dto.dart deleted file mode 100644 index 22c9d2fb4c..0000000000 --- a/mobile/openapi/lib/model/person_create_dto.dart +++ /dev/null @@ -1,164 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PersonCreateDto { - /// Returns a new [PersonCreateDto] instance. - PersonCreateDto({ - this.birthDate = const Optional.absent(), - this.color = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isHidden = const Optional.absent(), - this.name = const Optional.absent(), - }); - - /// Person date of birth - Optional birthDate; - - /// Person color (hex) - Optional color; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Person visibility (hidden) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isHidden; - - /// Person name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonCreateDto && - other.birthDate == birthDate && - other.color == color && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden == null ? 0 : isHidden!.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'PersonCreateDto[birthDate=$birthDate, color=$color, isFavorite=$isFavorite, isHidden=$isHidden, name=$name]'; - - Map toJson() { - final json = {}; - if (this.birthDate.isPresent) { - final value = this.birthDate.value; - json[r'birthDate'] = value == null ? null : _dateFormatter.format(value.toUtc()); - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isHidden.isPresent) { - final value = this.isHidden.value; - json[r'isHidden'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [PersonCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonCreateDto? fromJson(dynamic value) { - upgradeDto(value, "PersonCreateDto"); - if (value is Map) { - final json = value.cast(); - - return PersonCreateDto( - birthDate: json.containsKey(r'birthDate') ? Optional.present(mapDateTime(json, r'birthDate', r'')) : const Optional.absent(), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: json.containsKey(r'isHidden') ? Optional.present(mapValueOfType(json, r'isHidden')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/person_response_dto.dart b/mobile/openapi/lib/model/person_response_dto.dart deleted file mode 100644 index a99f465236..0000000000 --- a/mobile/openapi/lib/model/person_response_dto.dart +++ /dev/null @@ -1,191 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PersonResponseDto { - /// Returns a new [PersonResponseDto] instance. - PersonResponseDto({ - required this.birthDate, - this.color = const Optional.absent(), - required this.id, - this.isFavorite = const Optional.absent(), - required this.isHidden, - required this.name, - required this.thumbnailPath, - this.updatedAt = const Optional.absent(), - }); - - /// Person date of birth - DateTime? birthDate; - - /// Person color (hex) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional color; - - /// Person ID - String id; - - /// Is favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Is hidden - bool isHidden; - - /// Person name - String name; - - /// Thumbnail path - String thumbnailPath; - - /// Last update date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonResponseDto && - other.birthDate == birthDate && - other.color == color && - other.id == id && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name && - other.thumbnailPath == thumbnailPath && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (id.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden.hashCode) + - (name.hashCode) + - (thumbnailPath.hashCode) + - (updatedAt == null ? 0 : updatedAt!.hashCode); - - @override - String toString() => 'PersonResponseDto[birthDate=$birthDate, color=$color, id=$id, isFavorite=$isFavorite, isHidden=$isHidden, name=$name, thumbnailPath=$thumbnailPath, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.birthDate != null) { - json[r'birthDate'] = _dateFormatter.format(this.birthDate!.toUtc()); - } else { - json[r'birthDate'] = null; - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - json[r'id'] = this.id; - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - json[r'isHidden'] = this.isHidden; - json[r'name'] = this.name; - json[r'thumbnailPath'] = this.thumbnailPath; - if (this.updatedAt.isPresent) { - final value = this.updatedAt.value; - json[r'updatedAt'] = value == null ? null : value.toUtc().toIso8601String(); - } - return json; - } - - /// Returns a new [PersonResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PersonResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PersonResponseDto( - birthDate: mapDateTime(json, r'birthDate', r''), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: mapValueOfType(json, r'isHidden')!, - name: mapValueOfType(json, r'name')!, - thumbnailPath: mapValueOfType(json, r'thumbnailPath')!, - updatedAt: json.containsKey(r'updatedAt') ? Optional.present(mapDateTime(json, r'updatedAt', r'')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'birthDate', - 'id', - 'isHidden', - 'name', - 'thumbnailPath', - }; -} - diff --git a/mobile/openapi/lib/model/person_statistics_response_dto.dart b/mobile/openapi/lib/model/person_statistics_response_dto.dart deleted file mode 100644 index aeac16cc8a..0000000000 --- a/mobile/openapi/lib/model/person_statistics_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PersonStatisticsResponseDto { - /// Returns a new [PersonStatisticsResponseDto] instance. - PersonStatisticsResponseDto({ - required this.assets, - }); - - /// Number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int assets; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonStatisticsResponseDto && - other.assets == assets; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode); - - @override - String toString() => 'PersonStatisticsResponseDto[assets=$assets]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - return json; - } - - /// Returns a new [PersonStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PersonStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PersonStatisticsResponseDto( - assets: mapValueOfType(json, r'assets')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - }; -} - diff --git a/mobile/openapi/lib/model/person_update_dto.dart b/mobile/openapi/lib/model/person_update_dto.dart deleted file mode 100644 index 56b99606ee..0000000000 --- a/mobile/openapi/lib/model/person_update_dto.dart +++ /dev/null @@ -1,181 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PersonUpdateDto { - /// Returns a new [PersonUpdateDto] instance. - PersonUpdateDto({ - this.birthDate = const Optional.absent(), - this.color = const Optional.absent(), - this.featureFaceAssetId = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isHidden = const Optional.absent(), - this.name = const Optional.absent(), - }); - - /// Person date of birth - Optional birthDate; - - /// Person color (hex) - Optional color; - - /// Asset ID used for feature face thumbnail - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional featureFaceAssetId; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Person visibility (hidden) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isHidden; - - /// Person name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonUpdateDto && - other.birthDate == birthDate && - other.color == color && - other.featureFaceAssetId == featureFaceAssetId && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (featureFaceAssetId == null ? 0 : featureFaceAssetId!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden == null ? 0 : isHidden!.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'PersonUpdateDto[birthDate=$birthDate, color=$color, featureFaceAssetId=$featureFaceAssetId, isFavorite=$isFavorite, isHidden=$isHidden, name=$name]'; - - Map toJson() { - final json = {}; - if (this.birthDate.isPresent) { - final value = this.birthDate.value; - json[r'birthDate'] = value == null ? null : _dateFormatter.format(value.toUtc()); - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - if (this.featureFaceAssetId.isPresent) { - final value = this.featureFaceAssetId.value; - json[r'featureFaceAssetId'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isHidden.isPresent) { - final value = this.isHidden.value; - json[r'isHidden'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [PersonUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "PersonUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return PersonUpdateDto( - birthDate: json.containsKey(r'birthDate') ? Optional.present(mapDateTime(json, r'birthDate', r'')) : const Optional.absent(), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - featureFaceAssetId: json.containsKey(r'featureFaceAssetId') ? Optional.present(mapValueOfType(json, r'featureFaceAssetId')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: json.containsKey(r'isHidden') ? Optional.present(mapValueOfType(json, r'isHidden')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/pin_code_change_dto.dart b/mobile/openapi/lib/model/pin_code_change_dto.dart deleted file mode 100644 index 42c244933f..0000000000 --- a/mobile/openapi/lib/model/pin_code_change_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PinCodeChangeDto { - /// Returns a new [PinCodeChangeDto] instance. - PinCodeChangeDto({ - required this.newPinCode, - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - }); - - /// New PIN code (4-6 digits) - String newPinCode; - - /// User password (required if PIN code is not provided) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - /// New PIN code (4-6 digits) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is PinCodeChangeDto && - other.newPinCode == newPinCode && - other.password == password && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (newPinCode.hashCode) + - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); - - @override - String toString() => 'PinCodeChangeDto[newPinCode=$newPinCode, password=$password, pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - json[r'newPinCode'] = this.newPinCode; - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - return json; - } - - /// Returns a new [PinCodeChangeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PinCodeChangeDto? fromJson(dynamic value) { - upgradeDto(value, "PinCodeChangeDto"); - if (value is Map) { - final json = value.cast(); - - return PinCodeChangeDto( - newPinCode: mapValueOfType(json, r'newPinCode')!, - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PinCodeChangeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PinCodeChangeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PinCodeChangeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PinCodeChangeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'newPinCode', - }; -} - diff --git a/mobile/openapi/lib/model/pin_code_reset_dto.dart b/mobile/openapi/lib/model/pin_code_reset_dto.dart deleted file mode 100644 index 04ad61eeeb..0000000000 --- a/mobile/openapi/lib/model/pin_code_reset_dto.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PinCodeResetDto { - /// Returns a new [PinCodeResetDto] instance. - PinCodeResetDto({ - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - }); - - /// User password (required if PIN code is not provided) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - /// New PIN code (4-6 digits) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is PinCodeResetDto && - other.password == password && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); - - @override - String toString() => 'PinCodeResetDto[password=$password, pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - return json; - } - - /// Returns a new [PinCodeResetDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PinCodeResetDto? fromJson(dynamic value) { - upgradeDto(value, "PinCodeResetDto"); - if (value is Map) { - final json = value.cast(); - - return PinCodeResetDto( - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PinCodeResetDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PinCodeResetDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PinCodeResetDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PinCodeResetDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/pin_code_setup_dto.dart b/mobile/openapi/lib/model/pin_code_setup_dto.dart deleted file mode 100644 index e2f08f102b..0000000000 --- a/mobile/openapi/lib/model/pin_code_setup_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PinCodeSetupDto { - /// Returns a new [PinCodeSetupDto] instance. - PinCodeSetupDto({ - required this.pinCode, - }); - - /// PIN code (4-6 digits) - String pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is PinCodeSetupDto && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (pinCode.hashCode); - - @override - String toString() => 'PinCodeSetupDto[pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - json[r'pinCode'] = this.pinCode; - return json; - } - - /// Returns a new [PinCodeSetupDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PinCodeSetupDto? fromJson(dynamic value) { - upgradeDto(value, "PinCodeSetupDto"); - if (value is Map) { - final json = value.cast(); - - return PinCodeSetupDto( - pinCode: mapValueOfType(json, r'pinCode')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PinCodeSetupDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PinCodeSetupDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PinCodeSetupDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PinCodeSetupDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'pinCode', - }; -} - diff --git a/mobile/openapi/lib/model/places_response_dto.dart b/mobile/openapi/lib/model/places_response_dto.dart deleted file mode 100644 index f222c33dba..0000000000 --- a/mobile/openapi/lib/model/places_response_dto.dart +++ /dev/null @@ -1,152 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PlacesResponseDto { - /// Returns a new [PlacesResponseDto] instance. - PlacesResponseDto({ - this.admin1name = const Optional.absent(), - this.admin2name = const Optional.absent(), - required this.latitude, - required this.longitude, - required this.name, - }); - - /// Administrative level 1 name (state/province) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional admin1name; - - /// Administrative level 2 name (county/district) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional admin2name; - - /// Latitude coordinate - num latitude; - - /// Longitude coordinate - num longitude; - - /// Place name - String name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PlacesResponseDto && - other.admin1name == admin1name && - other.admin2name == admin2name && - other.latitude == latitude && - other.longitude == longitude && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (admin1name == null ? 0 : admin1name!.hashCode) + - (admin2name == null ? 0 : admin2name!.hashCode) + - (latitude.hashCode) + - (longitude.hashCode) + - (name.hashCode); - - @override - String toString() => 'PlacesResponseDto[admin1name=$admin1name, admin2name=$admin2name, latitude=$latitude, longitude=$longitude, name=$name]'; - - Map toJson() { - final json = {}; - if (this.admin1name.isPresent) { - final value = this.admin1name.value; - json[r'admin1name'] = value; - } - if (this.admin2name.isPresent) { - final value = this.admin2name.value; - json[r'admin2name'] = value; - } - json[r'latitude'] = this.latitude; - json[r'longitude'] = this.longitude; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [PlacesResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PlacesResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PlacesResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PlacesResponseDto( - admin1name: json.containsKey(r'admin1name') ? Optional.present(mapValueOfType(json, r'admin1name')) : const Optional.absent(), - admin2name: json.containsKey(r'admin2name') ? Optional.present(mapValueOfType(json, r'admin2name')) : const Optional.absent(), - latitude: num.parse('${json[r'latitude']}'), - longitude: num.parse('${json[r'longitude']}'), - name: mapValueOfType(json, r'name')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PlacesResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PlacesResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PlacesResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PlacesResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'latitude', - 'longitude', - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_method_response_dto.dart b/mobile/openapi/lib/model/plugin_method_response_dto.dart deleted file mode 100644 index 1d6f9c1331..0000000000 --- a/mobile/openapi/lib/model/plugin_method_response_dto.dart +++ /dev/null @@ -1,171 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PluginMethodResponseDto { - /// Returns a new [PluginMethodResponseDto] instance. - PluginMethodResponseDto({ - required this.description, - required this.hostFunctions, - required this.key, - required this.name, - this.schema = const Optional.absent(), - required this.title, - this.types = const [], - this.uiHints = const [], - }); - - /// Description - String description; - - bool hostFunctions; - - /// Key - String key; - - /// Name - String name; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional schema; - - /// Title - String title; - - /// Workflow types - List types; - - /// Ui hints - List uiHints; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginMethodResponseDto && - other.description == description && - other.hostFunctions == hostFunctions && - other.key == key && - other.name == name && - other.schema == schema && - other.title == title && - _deepEquality.equals(other.types, types) && - _deepEquality.equals(other.uiHints, uiHints); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description.hashCode) + - (hostFunctions.hashCode) + - (key.hashCode) + - (name.hashCode) + - (schema == null ? 0 : schema!.hashCode) + - (title.hashCode) + - (types.hashCode) + - (uiHints.hashCode); - - @override - String toString() => 'PluginMethodResponseDto[description=$description, hostFunctions=$hostFunctions, key=$key, name=$name, schema=$schema, title=$title, types=$types, uiHints=$uiHints]'; - - Map toJson() { - final json = {}; - json[r'description'] = this.description; - json[r'hostFunctions'] = this.hostFunctions; - json[r'key'] = this.key; - json[r'name'] = this.name; - if (this.schema.isPresent) { - final value = this.schema.value; - json[r'schema'] = value; - } - json[r'title'] = this.title; - json[r'types'] = this.types; - json[r'uiHints'] = this.uiHints; - return json; - } - - /// Returns a new [PluginMethodResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginMethodResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginMethodResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginMethodResponseDto( - description: mapValueOfType(json, r'description')!, - hostFunctions: mapValueOfType(json, r'hostFunctions')!, - key: mapValueOfType(json, r'key')!, - name: mapValueOfType(json, r'name')!, - schema: json.containsKey(r'schema') ? Optional.present(mapValueOfType(json, r'schema')) : const Optional.absent(), - title: mapValueOfType(json, r'title')!, - types: WorkflowType.listFromJson(json[r'types']), - uiHints: json[r'uiHints'] is Iterable - ? (json[r'uiHints'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginMethodResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginMethodResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginMethodResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginMethodResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'description', - 'hostFunctions', - 'key', - 'name', - 'title', - 'types', - 'uiHints', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_response_dto.dart b/mobile/openapi/lib/model/plugin_response_dto.dart deleted file mode 100644 index 1bdb366f9e..0000000000 --- a/mobile/openapi/lib/model/plugin_response_dto.dart +++ /dev/null @@ -1,172 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PluginResponseDto { - /// Returns a new [PluginResponseDto] instance. - PluginResponseDto({ - required this.author, - required this.createdAt, - required this.description, - required this.id, - this.methods = const [], - required this.name, - required this.title, - required this.updatedAt, - required this.version, - }); - - /// Plugin author - String author; - - /// Creation date - String createdAt; - - /// Plugin description - String description; - - /// Plugin ID - String id; - - /// Plugin methods - List methods; - - /// Plugin name - String name; - - /// Plugin title - String title; - - /// Last update date - String updatedAt; - - /// Plugin version - String version; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginResponseDto && - other.author == author && - other.createdAt == createdAt && - other.description == description && - other.id == id && - _deepEquality.equals(other.methods, methods) && - other.name == name && - other.title == title && - other.updatedAt == updatedAt && - other.version == version; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (author.hashCode) + - (createdAt.hashCode) + - (description.hashCode) + - (id.hashCode) + - (methods.hashCode) + - (name.hashCode) + - (title.hashCode) + - (updatedAt.hashCode) + - (version.hashCode); - - @override - String toString() => 'PluginResponseDto[author=$author, createdAt=$createdAt, description=$description, id=$id, methods=$methods, name=$name, title=$title, updatedAt=$updatedAt, version=$version]'; - - Map toJson() { - final json = {}; - json[r'author'] = this.author; - json[r'createdAt'] = this.createdAt; - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'methods'] = this.methods; - json[r'name'] = this.name; - json[r'title'] = this.title; - json[r'updatedAt'] = this.updatedAt; - json[r'version'] = this.version; - return json; - } - - /// Returns a new [PluginResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginResponseDto( - author: mapValueOfType(json, r'author')!, - createdAt: mapValueOfType(json, r'createdAt')!, - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - methods: PluginMethodResponseDto.listFromJson(json[r'methods']), - name: mapValueOfType(json, r'name')!, - title: mapValueOfType(json, r'title')!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - version: mapValueOfType(json, r'version')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'author', - 'createdAt', - 'description', - 'id', - 'methods', - 'name', - 'title', - 'updatedAt', - 'version', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_template_response_dto.dart b/mobile/openapi/lib/model/plugin_template_response_dto.dart deleted file mode 100644 index 9f54753f49..0000000000 --- a/mobile/openapi/lib/model/plugin_template_response_dto.dart +++ /dev/null @@ -1,146 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PluginTemplateResponseDto { - /// Returns a new [PluginTemplateResponseDto] instance. - PluginTemplateResponseDto({ - required this.description, - required this.key, - this.steps = const [], - required this.title, - required this.trigger, - this.uiHints = const [], - }); - - /// Template description - String description; - - /// Template key (unique across all templates) - String key; - - /// Workflow steps - List steps; - - /// Template title - String title; - - WorkflowTrigger trigger; - - /// Ui hints, for example \"smart-album\" - List uiHints; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginTemplateResponseDto && - other.description == description && - other.key == key && - _deepEquality.equals(other.steps, steps) && - other.title == title && - other.trigger == trigger && - _deepEquality.equals(other.uiHints, uiHints); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description.hashCode) + - (key.hashCode) + - (steps.hashCode) + - (title.hashCode) + - (trigger.hashCode) + - (uiHints.hashCode); - - @override - String toString() => 'PluginTemplateResponseDto[description=$description, key=$key, steps=$steps, title=$title, trigger=$trigger, uiHints=$uiHints]'; - - Map toJson() { - final json = {}; - json[r'description'] = this.description; - json[r'key'] = this.key; - json[r'steps'] = this.steps; - json[r'title'] = this.title; - json[r'trigger'] = this.trigger; - json[r'uiHints'] = this.uiHints; - return json; - } - - /// Returns a new [PluginTemplateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginTemplateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginTemplateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginTemplateResponseDto( - description: mapValueOfType(json, r'description')!, - key: mapValueOfType(json, r'key')!, - steps: PluginTemplateStepResponseDto.listFromJson(json[r'steps']), - title: mapValueOfType(json, r'title')!, - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - uiHints: json[r'uiHints'] is Iterable - ? (json[r'uiHints'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginTemplateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginTemplateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginTemplateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginTemplateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'description', - 'key', - 'steps', - 'title', - 'trigger', - 'uiHints', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_template_step_response_dto.dart b/mobile/openapi/lib/model/plugin_template_step_response_dto.dart deleted file mode 100644 index 3e82c029d2..0000000000 --- a/mobile/openapi/lib/model/plugin_template_step_response_dto.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PluginTemplateStepResponseDto { - /// Returns a new [PluginTemplateStepResponseDto] instance. - PluginTemplateStepResponseDto({ - this.config = const {}, - this.enabled = const Optional.absent(), - required this.method, - }); - - /// Step configuration - Map? config; - - /// Whether the step is enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Step plugin method - String method; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginTemplateStepResponseDto && - _deepEquality.equals(other.config, config) && - other.enabled == enabled && - other.method == method; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (config == null ? 0 : config!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (method.hashCode); - - @override - String toString() => 'PluginTemplateStepResponseDto[config=$config, enabled=$enabled, method=$method]'; - - Map toJson() { - final json = {}; - if (this.config != null) { - json[r'config'] = this.config; - } else { - json[r'config'] = null; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - json[r'method'] = this.method; - return json; - } - - /// Returns a new [PluginTemplateStepResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginTemplateStepResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginTemplateStepResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginTemplateStepResponseDto( - config: mapCastOfType(json, r'config'), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - method: mapValueOfType(json, r'method')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginTemplateStepResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginTemplateStepResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginTemplateStepResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginTemplateStepResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'config', - 'method', - }; -} - diff --git a/mobile/openapi/lib/model/purchase_response.dart b/mobile/openapi/lib/model/purchase_response.dart deleted file mode 100644 index e55c286629..0000000000 --- a/mobile/openapi/lib/model/purchase_response.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PurchaseResponse { - /// Returns a new [PurchaseResponse] instance. - PurchaseResponse({ - required this.hideBuyButtonUntil, - required this.showSupportBadge, - }); - - /// Date until which to hide buy button - String hideBuyButtonUntil; - - /// Whether to show support badge - bool showSupportBadge; - - @override - bool operator ==(Object other) => identical(this, other) || other is PurchaseResponse && - other.hideBuyButtonUntil == hideBuyButtonUntil && - other.showSupportBadge == showSupportBadge; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (hideBuyButtonUntil.hashCode) + - (showSupportBadge.hashCode); - - @override - String toString() => 'PurchaseResponse[hideBuyButtonUntil=$hideBuyButtonUntil, showSupportBadge=$showSupportBadge]'; - - Map toJson() { - final json = {}; - json[r'hideBuyButtonUntil'] = this.hideBuyButtonUntil; - json[r'showSupportBadge'] = this.showSupportBadge; - return json; - } - - /// Returns a new [PurchaseResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PurchaseResponse? fromJson(dynamic value) { - upgradeDto(value, "PurchaseResponse"); - if (value is Map) { - final json = value.cast(); - - return PurchaseResponse( - hideBuyButtonUntil: mapValueOfType(json, r'hideBuyButtonUntil')!, - showSupportBadge: mapValueOfType(json, r'showSupportBadge')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PurchaseResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PurchaseResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PurchaseResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PurchaseResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'hideBuyButtonUntil', - 'showSupportBadge', - }; -} - diff --git a/mobile/openapi/lib/model/purchase_update.dart b/mobile/openapi/lib/model/purchase_update.dart deleted file mode 100644 index 8a0fb0d1b6..0000000000 --- a/mobile/openapi/lib/model/purchase_update.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PurchaseUpdate { - /// Returns a new [PurchaseUpdate] instance. - PurchaseUpdate({ - this.hideBuyButtonUntil = const Optional.absent(), - this.showSupportBadge = const Optional.absent(), - }); - - /// Date until which to hide buy button - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional hideBuyButtonUntil; - - /// Whether to show support badge - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional showSupportBadge; - - @override - bool operator ==(Object other) => identical(this, other) || other is PurchaseUpdate && - other.hideBuyButtonUntil == hideBuyButtonUntil && - other.showSupportBadge == showSupportBadge; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (hideBuyButtonUntil == null ? 0 : hideBuyButtonUntil!.hashCode) + - (showSupportBadge == null ? 0 : showSupportBadge!.hashCode); - - @override - String toString() => 'PurchaseUpdate[hideBuyButtonUntil=$hideBuyButtonUntil, showSupportBadge=$showSupportBadge]'; - - Map toJson() { - final json = {}; - if (this.hideBuyButtonUntil.isPresent) { - final value = this.hideBuyButtonUntil.value; - json[r'hideBuyButtonUntil'] = value; - } - if (this.showSupportBadge.isPresent) { - final value = this.showSupportBadge.value; - json[r'showSupportBadge'] = value; - } - return json; - } - - /// Returns a new [PurchaseUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PurchaseUpdate? fromJson(dynamic value) { - upgradeDto(value, "PurchaseUpdate"); - if (value is Map) { - final json = value.cast(); - - return PurchaseUpdate( - hideBuyButtonUntil: json.containsKey(r'hideBuyButtonUntil') ? Optional.present(mapValueOfType(json, r'hideBuyButtonUntil')) : const Optional.absent(), - showSupportBadge: json.containsKey(r'showSupportBadge') ? Optional.present(mapValueOfType(json, r'showSupportBadge')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PurchaseUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PurchaseUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PurchaseUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PurchaseUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/queue_command.dart b/mobile/openapi/lib/model/queue_command.dart deleted file mode 100644 index 131af9758e..0000000000 --- a/mobile/openapi/lib/model/queue_command.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Queue command to execute -enum QueueCommand { - start._(r'start'), - pause._(r'pause'), - resume._(r'resume'), - empty._(r'empty'), - clearFailed._(r'clear-failed'), - ; - - /// Instantiate a new enum with the provided value. - const QueueCommand._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [QueueCommand] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static QueueCommand? fromJson(dynamic value) => QueueCommandTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [QueueCommand] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueCommand.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [QueueCommand] to String, -/// and [decode] dynamic data back to [QueueCommand]. -class QueueCommandTypeTransformer { - factory QueueCommandTypeTransformer() => _instance ??= const QueueCommandTypeTransformer._(); - - const QueueCommandTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(QueueCommand data) => data._value; - - /// Returns the instance of [QueueCommand] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - QueueCommand? decode(dynamic data, {bool allowNull = true}) { - if (data is QueueCommand) { - return data; - } - if (data != null) { - switch (data) { - case r'start': return QueueCommand.start; - case r'pause': return QueueCommand.pause; - case r'resume': return QueueCommand.resume; - case r'empty': return QueueCommand.empty; - case r'clear-failed': return QueueCommand.clearFailed; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static QueueCommandTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/queue_command_dto.dart b/mobile/openapi/lib/model/queue_command_dto.dart deleted file mode 100644 index e8a600923f..0000000000 --- a/mobile/openapi/lib/model/queue_command_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueCommandDto { - /// Returns a new [QueueCommandDto] instance. - QueueCommandDto({ - required this.command, - this.force = const Optional.absent(), - }); - - QueueCommand command; - - /// Force the command execution (if applicable) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional force; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueCommandDto && - other.command == command && - other.force == force; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (command.hashCode) + - (force == null ? 0 : force!.hashCode); - - @override - String toString() => 'QueueCommandDto[command=$command, force=$force]'; - - Map toJson() { - final json = {}; - json[r'command'] = this.command; - if (this.force.isPresent) { - final value = this.force.value; - json[r'force'] = value; - } - return json; - } - - /// Returns a new [QueueCommandDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueCommandDto? fromJson(dynamic value) { - upgradeDto(value, "QueueCommandDto"); - if (value is Map) { - final json = value.cast(); - - return QueueCommandDto( - command: QueueCommand.fromJson(json[r'command'])!, - force: json.containsKey(r'force') ? Optional.present(mapValueOfType(json, r'force')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueCommandDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueCommandDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueCommandDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueCommandDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'command', - }; -} - diff --git a/mobile/openapi/lib/model/queue_delete_dto.dart b/mobile/openapi/lib/model/queue_delete_dto.dart deleted file mode 100644 index 9511313f01..0000000000 --- a/mobile/openapi/lib/model/queue_delete_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueDeleteDto { - /// Returns a new [QueueDeleteDto] instance. - QueueDeleteDto({ - this.failed = const Optional.absent(), - }); - - /// If true, will also remove failed jobs from the queue. - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional failed; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueDeleteDto && - other.failed == failed; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (failed == null ? 0 : failed!.hashCode); - - @override - String toString() => 'QueueDeleteDto[failed=$failed]'; - - Map toJson() { - final json = {}; - if (this.failed.isPresent) { - final value = this.failed.value; - json[r'failed'] = value; - } - return json; - } - - /// Returns a new [QueueDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "QueueDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return QueueDeleteDto( - failed: json.containsKey(r'failed') ? Optional.present(mapValueOfType(json, r'failed')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/queue_job_response_dto.dart b/mobile/openapi/lib/model/queue_job_response_dto.dart deleted file mode 100644 index ca26361a3e..0000000000 --- a/mobile/openapi/lib/model/queue_job_response_dto.dart +++ /dev/null @@ -1,137 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueJobResponseDto { - /// Returns a new [QueueJobResponseDto] instance. - QueueJobResponseDto({ - this.data = const {}, - this.id = const Optional.absent(), - required this.name, - required this.timestamp, - }); - - /// Job data payload - Map data; - - /// Job ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional id; - - JobName name; - - /// Job creation timestamp - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int timestamp; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueJobResponseDto && - _deepEquality.equals(other.data, data) && - other.id == id && - other.name == name && - other.timestamp == timestamp; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode) + - (id == null ? 0 : id!.hashCode) + - (name.hashCode) + - (timestamp.hashCode); - - @override - String toString() => 'QueueJobResponseDto[data=$data, id=$id, name=$name, timestamp=$timestamp]'; - - Map toJson() { - final json = {}; - json[r'data'] = this.data; - if (this.id.isPresent) { - final value = this.id.value; - json[r'id'] = value; - } - json[r'name'] = this.name; - json[r'timestamp'] = this.timestamp; - return json; - } - - /// Returns a new [QueueJobResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueJobResponseDto? fromJson(dynamic value) { - upgradeDto(value, "QueueJobResponseDto"); - if (value is Map) { - final json = value.cast(); - - return QueueJobResponseDto( - data: mapCastOfType(json, r'data')!, - id: json.containsKey(r'id') ? Optional.present(mapValueOfType(json, r'id')) : const Optional.absent(), - name: JobName.fromJson(json[r'name'])!, - timestamp: mapValueOfType(json, r'timestamp')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueJobResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueJobResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueJobResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueJobResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - 'name', - 'timestamp', - }; -} - diff --git a/mobile/openapi/lib/model/queue_job_status.dart b/mobile/openapi/lib/model/queue_job_status.dart deleted file mode 100644 index 1daebf18ca..0000000000 --- a/mobile/openapi/lib/model/queue_job_status.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Queue job status -enum QueueJobStatus { - active._(r'active'), - failed._(r'failed'), - completed._(r'completed'), - delayed._(r'delayed'), - waiting._(r'waiting'), - paused._(r'paused'), - ; - - /// Instantiate a new enum with the provided value. - const QueueJobStatus._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [QueueJobStatus] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static QueueJobStatus? fromJson(dynamic value) => QueueJobStatusTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [QueueJobStatus] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueJobStatus.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [QueueJobStatus] to String, -/// and [decode] dynamic data back to [QueueJobStatus]. -class QueueJobStatusTypeTransformer { - factory QueueJobStatusTypeTransformer() => _instance ??= const QueueJobStatusTypeTransformer._(); - - const QueueJobStatusTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(QueueJobStatus data) => data._value; - - /// Returns the instance of [QueueJobStatus] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - QueueJobStatus? decode(dynamic data, {bool allowNull = true}) { - if (data is QueueJobStatus) { - return data; - } - if (data != null) { - switch (data) { - case r'active': return QueueJobStatus.active; - case r'failed': return QueueJobStatus.failed; - case r'completed': return QueueJobStatus.completed; - case r'delayed': return QueueJobStatus.delayed; - case r'waiting': return QueueJobStatus.waiting; - case r'paused': return QueueJobStatus.paused; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static QueueJobStatusTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/queue_name.dart b/mobile/openapi/lib/model/queue_name.dart deleted file mode 100644 index 910d28c04f..0000000000 --- a/mobile/openapi/lib/model/queue_name.dart +++ /dev/null @@ -1,124 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Queue name -enum QueueName { - thumbnailGeneration._(r'thumbnailGeneration'), - metadataExtraction._(r'metadataExtraction'), - videoConversion._(r'videoConversion'), - faceDetection._(r'faceDetection'), - facialRecognition._(r'facialRecognition'), - smartSearch._(r'smartSearch'), - duplicateDetection._(r'duplicateDetection'), - backgroundTask._(r'backgroundTask'), - storageTemplateMigration._(r'storageTemplateMigration'), - migration._(r'migration'), - search._(r'search'), - sidecar._(r'sidecar'), - library_._(r'library'), - notifications._(r'notifications'), - backupDatabase._(r'backupDatabase'), - ocr._(r'ocr'), - workflow._(r'workflow'), - integrityCheck._(r'integrityCheck'), - editor._(r'editor'), - ; - - /// Instantiate a new enum with the provided value. - const QueueName._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [QueueName] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static QueueName? fromJson(dynamic value) => QueueNameTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [QueueName] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [QueueName] to String, -/// and [decode] dynamic data back to [QueueName]. -class QueueNameTypeTransformer { - factory QueueNameTypeTransformer() => _instance ??= const QueueNameTypeTransformer._(); - - const QueueNameTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(QueueName data) => data._value; - - /// Returns the instance of [QueueName] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - QueueName? decode(dynamic data, {bool allowNull = true}) { - if (data is QueueName) { - return data; - } - if (data != null) { - switch (data) { - case r'thumbnailGeneration': return QueueName.thumbnailGeneration; - case r'metadataExtraction': return QueueName.metadataExtraction; - case r'videoConversion': return QueueName.videoConversion; - case r'faceDetection': return QueueName.faceDetection; - case r'facialRecognition': return QueueName.facialRecognition; - case r'smartSearch': return QueueName.smartSearch; - case r'duplicateDetection': return QueueName.duplicateDetection; - case r'backgroundTask': return QueueName.backgroundTask; - case r'storageTemplateMigration': return QueueName.storageTemplateMigration; - case r'migration': return QueueName.migration; - case r'search': return QueueName.search; - case r'sidecar': return QueueName.sidecar; - case r'library': return QueueName.library_; - case r'notifications': return QueueName.notifications; - case r'backupDatabase': return QueueName.backupDatabase; - case r'ocr': return QueueName.ocr; - case r'workflow': return QueueName.workflow; - case r'integrityCheck': return QueueName.integrityCheck; - case r'editor': return QueueName.editor; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static QueueNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/queue_response_dto.dart b/mobile/openapi/lib/model/queue_response_dto.dart deleted file mode 100644 index c88f9fc195..0000000000 --- a/mobile/openapi/lib/model/queue_response_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueResponseDto { - /// Returns a new [QueueResponseDto] instance. - QueueResponseDto({ - required this.isPaused, - required this.name, - required this.statistics, - }); - - /// Whether the queue is paused - bool isPaused; - - QueueName name; - - QueueStatisticsDto statistics; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueResponseDto && - other.isPaused == isPaused && - other.name == name && - other.statistics == statistics; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isPaused.hashCode) + - (name.hashCode) + - (statistics.hashCode); - - @override - String toString() => 'QueueResponseDto[isPaused=$isPaused, name=$name, statistics=$statistics]'; - - Map toJson() { - final json = {}; - json[r'isPaused'] = this.isPaused; - json[r'name'] = this.name; - json[r'statistics'] = this.statistics; - return json; - } - - /// Returns a new [QueueResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueResponseDto? fromJson(dynamic value) { - upgradeDto(value, "QueueResponseDto"); - if (value is Map) { - final json = value.cast(); - - return QueueResponseDto( - isPaused: mapValueOfType(json, r'isPaused')!, - name: QueueName.fromJson(json[r'name'])!, - statistics: QueueStatisticsDto.fromJson(json[r'statistics'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isPaused', - 'name', - 'statistics', - }; -} - diff --git a/mobile/openapi/lib/model/queue_response_legacy_dto.dart b/mobile/openapi/lib/model/queue_response_legacy_dto.dart deleted file mode 100644 index 214b0b31f6..0000000000 --- a/mobile/openapi/lib/model/queue_response_legacy_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueResponseLegacyDto { - /// Returns a new [QueueResponseLegacyDto] instance. - QueueResponseLegacyDto({ - required this.jobCounts, - required this.queueStatus, - }); - - QueueStatisticsDto jobCounts; - - QueueStatusLegacyDto queueStatus; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueResponseLegacyDto && - other.jobCounts == jobCounts && - other.queueStatus == queueStatus; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (jobCounts.hashCode) + - (queueStatus.hashCode); - - @override - String toString() => 'QueueResponseLegacyDto[jobCounts=$jobCounts, queueStatus=$queueStatus]'; - - Map toJson() { - final json = {}; - json[r'jobCounts'] = this.jobCounts; - json[r'queueStatus'] = this.queueStatus; - return json; - } - - /// Returns a new [QueueResponseLegacyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueResponseLegacyDto? fromJson(dynamic value) { - upgradeDto(value, "QueueResponseLegacyDto"); - if (value is Map) { - final json = value.cast(); - - return QueueResponseLegacyDto( - jobCounts: QueueStatisticsDto.fromJson(json[r'jobCounts'])!, - queueStatus: QueueStatusLegacyDto.fromJson(json[r'queueStatus'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueResponseLegacyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueResponseLegacyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueResponseLegacyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueResponseLegacyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'jobCounts', - 'queueStatus', - }; -} - diff --git a/mobile/openapi/lib/model/queue_statistics_dto.dart b/mobile/openapi/lib/model/queue_statistics_dto.dart deleted file mode 100644 index 86c75f8e7c..0000000000 --- a/mobile/openapi/lib/model/queue_statistics_dto.dart +++ /dev/null @@ -1,163 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueStatisticsDto { - /// Returns a new [QueueStatisticsDto] instance. - QueueStatisticsDto({ - required this.active, - required this.completed, - required this.delayed, - required this.failed, - required this.paused, - required this.waiting, - }); - - /// Number of active jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int active; - - /// Number of completed jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int completed; - - /// Number of delayed jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int delayed; - - /// Number of failed jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int failed; - - /// Number of paused jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int paused; - - /// Number of waiting jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int waiting; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueStatisticsDto && - other.active == active && - other.completed == completed && - other.delayed == delayed && - other.failed == failed && - other.paused == paused && - other.waiting == waiting; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (active.hashCode) + - (completed.hashCode) + - (delayed.hashCode) + - (failed.hashCode) + - (paused.hashCode) + - (waiting.hashCode); - - @override - String toString() => 'QueueStatisticsDto[active=$active, completed=$completed, delayed=$delayed, failed=$failed, paused=$paused, waiting=$waiting]'; - - Map toJson() { - final json = {}; - json[r'active'] = this.active; - json[r'completed'] = this.completed; - json[r'delayed'] = this.delayed; - json[r'failed'] = this.failed; - json[r'paused'] = this.paused; - json[r'waiting'] = this.waiting; - return json; - } - - /// Returns a new [QueueStatisticsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueStatisticsDto? fromJson(dynamic value) { - upgradeDto(value, "QueueStatisticsDto"); - if (value is Map) { - final json = value.cast(); - - return QueueStatisticsDto( - active: mapValueOfType(json, r'active')!, - completed: mapValueOfType(json, r'completed')!, - delayed: mapValueOfType(json, r'delayed')!, - failed: mapValueOfType(json, r'failed')!, - paused: mapValueOfType(json, r'paused')!, - waiting: mapValueOfType(json, r'waiting')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueStatisticsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueStatisticsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueStatisticsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueStatisticsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'active', - 'completed', - 'delayed', - 'failed', - 'paused', - 'waiting', - }; -} - diff --git a/mobile/openapi/lib/model/queue_status_legacy_dto.dart b/mobile/openapi/lib/model/queue_status_legacy_dto.dart deleted file mode 100644 index de6ce63319..0000000000 --- a/mobile/openapi/lib/model/queue_status_legacy_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueStatusLegacyDto { - /// Returns a new [QueueStatusLegacyDto] instance. - QueueStatusLegacyDto({ - required this.isActive, - required this.isPaused, - }); - - /// Whether the queue is currently active (has running jobs) - bool isActive; - - /// Whether the queue is paused - bool isPaused; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueStatusLegacyDto && - other.isActive == isActive && - other.isPaused == isPaused; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isActive.hashCode) + - (isPaused.hashCode); - - @override - String toString() => 'QueueStatusLegacyDto[isActive=$isActive, isPaused=$isPaused]'; - - Map toJson() { - final json = {}; - json[r'isActive'] = this.isActive; - json[r'isPaused'] = this.isPaused; - return json; - } - - /// Returns a new [QueueStatusLegacyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueStatusLegacyDto? fromJson(dynamic value) { - upgradeDto(value, "QueueStatusLegacyDto"); - if (value is Map) { - final json = value.cast(); - - return QueueStatusLegacyDto( - isActive: mapValueOfType(json, r'isActive')!, - isPaused: mapValueOfType(json, r'isPaused')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueStatusLegacyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueStatusLegacyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueStatusLegacyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueStatusLegacyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isActive', - 'isPaused', - }; -} - diff --git a/mobile/openapi/lib/model/queue_update_dto.dart b/mobile/openapi/lib/model/queue_update_dto.dart deleted file mode 100644 index 189fc219f1..0000000000 --- a/mobile/openapi/lib/model/queue_update_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueUpdateDto { - /// Returns a new [QueueUpdateDto] instance. - QueueUpdateDto({ - this.isPaused = const Optional.absent(), - }); - - /// Whether to pause the queue - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isPaused; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueUpdateDto && - other.isPaused == isPaused; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isPaused == null ? 0 : isPaused!.hashCode); - - @override - String toString() => 'QueueUpdateDto[isPaused=$isPaused]'; - - Map toJson() { - final json = {}; - if (this.isPaused.isPresent) { - final value = this.isPaused.value; - json[r'isPaused'] = value; - } - return json; - } - - /// Returns a new [QueueUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "QueueUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return QueueUpdateDto( - isPaused: json.containsKey(r'isPaused') ? Optional.present(mapValueOfType(json, r'isPaused')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/queues_response_legacy_dto.dart b/mobile/openapi/lib/model/queues_response_legacy_dto.dart deleted file mode 100644 index 80e74b9c41..0000000000 --- a/mobile/openapi/lib/model/queues_response_legacy_dto.dart +++ /dev/null @@ -1,243 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueuesResponseLegacyDto { - /// Returns a new [QueuesResponseLegacyDto] instance. - QueuesResponseLegacyDto({ - required this.backgroundTask, - required this.backupDatabase, - required this.duplicateDetection, - required this.editor, - required this.faceDetection, - required this.facialRecognition, - required this.integrityCheck, - required this.library_, - required this.metadataExtraction, - required this.migration, - required this.notifications, - required this.ocr, - required this.search, - required this.sidecar, - required this.smartSearch, - required this.storageTemplateMigration, - required this.thumbnailGeneration, - required this.videoConversion, - required this.workflow, - }); - - QueueResponseLegacyDto backgroundTask; - - QueueResponseLegacyDto backupDatabase; - - QueueResponseLegacyDto duplicateDetection; - - QueueResponseLegacyDto editor; - - QueueResponseLegacyDto faceDetection; - - QueueResponseLegacyDto facialRecognition; - - QueueResponseLegacyDto integrityCheck; - - QueueResponseLegacyDto library_; - - QueueResponseLegacyDto metadataExtraction; - - QueueResponseLegacyDto migration; - - QueueResponseLegacyDto notifications; - - QueueResponseLegacyDto ocr; - - QueueResponseLegacyDto search; - - QueueResponseLegacyDto sidecar; - - QueueResponseLegacyDto smartSearch; - - QueueResponseLegacyDto storageTemplateMigration; - - QueueResponseLegacyDto thumbnailGeneration; - - QueueResponseLegacyDto videoConversion; - - QueueResponseLegacyDto workflow; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueuesResponseLegacyDto && - other.backgroundTask == backgroundTask && - other.backupDatabase == backupDatabase && - other.duplicateDetection == duplicateDetection && - other.editor == editor && - other.faceDetection == faceDetection && - other.facialRecognition == facialRecognition && - other.integrityCheck == integrityCheck && - other.library_ == library_ && - other.metadataExtraction == metadataExtraction && - other.migration == migration && - other.notifications == notifications && - other.ocr == ocr && - other.search == search && - other.sidecar == sidecar && - other.smartSearch == smartSearch && - other.storageTemplateMigration == storageTemplateMigration && - other.thumbnailGeneration == thumbnailGeneration && - other.videoConversion == videoConversion && - other.workflow == workflow; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backgroundTask.hashCode) + - (backupDatabase.hashCode) + - (duplicateDetection.hashCode) + - (editor.hashCode) + - (faceDetection.hashCode) + - (facialRecognition.hashCode) + - (integrityCheck.hashCode) + - (library_.hashCode) + - (metadataExtraction.hashCode) + - (migration.hashCode) + - (notifications.hashCode) + - (ocr.hashCode) + - (search.hashCode) + - (sidecar.hashCode) + - (smartSearch.hashCode) + - (storageTemplateMigration.hashCode) + - (thumbnailGeneration.hashCode) + - (videoConversion.hashCode) + - (workflow.hashCode); - - @override - String toString() => 'QueuesResponseLegacyDto[backgroundTask=$backgroundTask, backupDatabase=$backupDatabase, duplicateDetection=$duplicateDetection, editor=$editor, faceDetection=$faceDetection, facialRecognition=$facialRecognition, integrityCheck=$integrityCheck, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, notifications=$notifications, ocr=$ocr, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, storageTemplateMigration=$storageTemplateMigration, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion, workflow=$workflow]'; - - Map toJson() { - final json = {}; - json[r'backgroundTask'] = this.backgroundTask; - json[r'backupDatabase'] = this.backupDatabase; - json[r'duplicateDetection'] = this.duplicateDetection; - json[r'editor'] = this.editor; - json[r'faceDetection'] = this.faceDetection; - json[r'facialRecognition'] = this.facialRecognition; - json[r'integrityCheck'] = this.integrityCheck; - json[r'library'] = this.library_; - json[r'metadataExtraction'] = this.metadataExtraction; - json[r'migration'] = this.migration; - json[r'notifications'] = this.notifications; - json[r'ocr'] = this.ocr; - json[r'search'] = this.search; - json[r'sidecar'] = this.sidecar; - json[r'smartSearch'] = this.smartSearch; - json[r'storageTemplateMigration'] = this.storageTemplateMigration; - json[r'thumbnailGeneration'] = this.thumbnailGeneration; - json[r'videoConversion'] = this.videoConversion; - json[r'workflow'] = this.workflow; - return json; - } - - /// Returns a new [QueuesResponseLegacyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueuesResponseLegacyDto? fromJson(dynamic value) { - upgradeDto(value, "QueuesResponseLegacyDto"); - if (value is Map) { - final json = value.cast(); - - return QueuesResponseLegacyDto( - backgroundTask: QueueResponseLegacyDto.fromJson(json[r'backgroundTask'])!, - backupDatabase: QueueResponseLegacyDto.fromJson(json[r'backupDatabase'])!, - duplicateDetection: QueueResponseLegacyDto.fromJson(json[r'duplicateDetection'])!, - editor: QueueResponseLegacyDto.fromJson(json[r'editor'])!, - faceDetection: QueueResponseLegacyDto.fromJson(json[r'faceDetection'])!, - facialRecognition: QueueResponseLegacyDto.fromJson(json[r'facialRecognition'])!, - integrityCheck: QueueResponseLegacyDto.fromJson(json[r'integrityCheck'])!, - library_: QueueResponseLegacyDto.fromJson(json[r'library'])!, - metadataExtraction: QueueResponseLegacyDto.fromJson(json[r'metadataExtraction'])!, - migration: QueueResponseLegacyDto.fromJson(json[r'migration'])!, - notifications: QueueResponseLegacyDto.fromJson(json[r'notifications'])!, - ocr: QueueResponseLegacyDto.fromJson(json[r'ocr'])!, - search: QueueResponseLegacyDto.fromJson(json[r'search'])!, - sidecar: QueueResponseLegacyDto.fromJson(json[r'sidecar'])!, - smartSearch: QueueResponseLegacyDto.fromJson(json[r'smartSearch'])!, - storageTemplateMigration: QueueResponseLegacyDto.fromJson(json[r'storageTemplateMigration'])!, - thumbnailGeneration: QueueResponseLegacyDto.fromJson(json[r'thumbnailGeneration'])!, - videoConversion: QueueResponseLegacyDto.fromJson(json[r'videoConversion'])!, - workflow: QueueResponseLegacyDto.fromJson(json[r'workflow'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueuesResponseLegacyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueuesResponseLegacyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueuesResponseLegacyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueuesResponseLegacyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backgroundTask', - 'backupDatabase', - 'duplicateDetection', - 'editor', - 'faceDetection', - 'facialRecognition', - 'integrityCheck', - 'library', - 'metadataExtraction', - 'migration', - 'notifications', - 'ocr', - 'search', - 'sidecar', - 'smartSearch', - 'storageTemplateMigration', - 'thumbnailGeneration', - 'videoConversion', - 'workflow', - }; -} - diff --git a/mobile/openapi/lib/model/random_search_dto.dart b/mobile/openapi/lib/model/random_search_dto.dart deleted file mode 100644 index 7937069578..0000000000 --- a/mobile/openapi/lib/model/random_search_dto.dart +++ /dev/null @@ -1,595 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RandomSearchDto { - /// Returns a new [RandomSearchDto] instance. - RandomSearchDto({ - this.albumIds = const Optional.present(const []), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.rating = const Optional.absent(), - this.size = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - this.withDeleted = const Optional.absent(), - this.withExif = const Optional.absent(), - this.withPeople = const Optional.absent(), - this.withStacked = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdBefore; - - /// Filter by encoded status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isOffline; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ocr; - - /// Filter by person IDs - Optional?> personIds; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Number of results to return - /// - /// Minimum value: 1 - /// Maximum value: 1000 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional size; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenBefore; - - /// Filter by trash date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// Filter by update date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - /// Include deleted assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withDeleted; - - /// Include EXIF data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withExif; - - /// Include people data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withPeople; - - /// Include stacked assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withStacked; - - @override - bool operator ==(Object other) => identical(this, other) || other is RandomSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - _deepEquality.equals(other.personIds, personIds) && - other.rating == rating && - other.size == size && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility && - other.withDeleted == withDeleted && - other.withExif == withExif && - other.withPeople == withPeople && - other.withStacked == withStacked; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (personIds.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (size == null ? 0 : size!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode) + - (withDeleted == null ? 0 : withDeleted!.hashCode) + - (withExif == null ? 0 : withExif!.hashCode) + - (withPeople == null ? 0 : withPeople!.hashCode) + - (withStacked == null ? 0 : withStacked!.hashCode); - - @override - String toString() => 'RandomSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.size.isPresent) { - final value = this.size.value; - json[r'size'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - if (this.withDeleted.isPresent) { - final value = this.withDeleted.value; - json[r'withDeleted'] = value; - } - if (this.withExif.isPresent) { - final value = this.withExif.value; - json[r'withExif'] = value; - } - if (this.withPeople.isPresent) { - final value = this.withPeople.value; - json[r'withPeople'] = value; - } - if (this.withStacked.isPresent) { - final value = this.withStacked.value; - json[r'withStacked'] = value; - } - return json; - } - - /// Returns a new [RandomSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RandomSearchDto? fromJson(dynamic value) { - upgradeDto(value, "RandomSearchDto"); - if (value is Map) { - final json = value.cast(); - - return RandomSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - size: json.containsKey(r'size') ? Optional.present(json[r'size'] == null ? null : int.parse('${json[r'size']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - withDeleted: json.containsKey(r'withDeleted') ? Optional.present(mapValueOfType(json, r'withDeleted')) : const Optional.absent(), - withExif: json.containsKey(r'withExif') ? Optional.present(mapValueOfType(json, r'withExif')) : const Optional.absent(), - withPeople: json.containsKey(r'withPeople') ? Optional.present(mapValueOfType(json, r'withPeople')) : const Optional.absent(), - withStacked: json.containsKey(r'withStacked') ? Optional.present(mapValueOfType(json, r'withStacked')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RandomSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RandomSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RandomSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RandomSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/ratings_response.dart b/mobile/openapi/lib/model/ratings_response.dart deleted file mode 100644 index 7b067412bf..0000000000 --- a/mobile/openapi/lib/model/ratings_response.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RatingsResponse { - /// Returns a new [RatingsResponse] instance. - RatingsResponse({ - required this.enabled, - }); - - /// Whether ratings are enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is RatingsResponse && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'RatingsResponse[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [RatingsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RatingsResponse? fromJson(dynamic value) { - upgradeDto(value, "RatingsResponse"); - if (value is Map) { - final json = value.cast(); - - return RatingsResponse( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RatingsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RatingsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RatingsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RatingsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/ratings_update.dart b/mobile/openapi/lib/model/ratings_update.dart deleted file mode 100644 index 085efd97e6..0000000000 --- a/mobile/openapi/lib/model/ratings_update.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RatingsUpdate { - /// Returns a new [RatingsUpdate] instance. - RatingsUpdate({ - this.enabled = const Optional.absent(), - }); - - /// Whether ratings are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is RatingsUpdate && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode); - - @override - String toString() => 'RatingsUpdate[enabled=$enabled]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - return json; - } - - /// Returns a new [RatingsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RatingsUpdate? fromJson(dynamic value) { - upgradeDto(value, "RatingsUpdate"); - if (value is Map) { - final json = value.cast(); - - return RatingsUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RatingsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RatingsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RatingsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RatingsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/reaction_level.dart b/mobile/openapi/lib/model/reaction_level.dart deleted file mode 100644 index e5cb5cb354..0000000000 --- a/mobile/openapi/lib/model/reaction_level.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Reaction level -enum ReactionLevel { - album._(r'album'), - asset._(r'asset'), - ; - - /// Instantiate a new enum with the provided value. - const ReactionLevel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ReactionLevel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ReactionLevel? fromJson(dynamic value) => ReactionLevelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ReactionLevel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReactionLevel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReactionLevel] to String, -/// and [decode] dynamic data back to [ReactionLevel]. -class ReactionLevelTypeTransformer { - factory ReactionLevelTypeTransformer() => _instance ??= const ReactionLevelTypeTransformer._(); - - const ReactionLevelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ReactionLevel data) => data._value; - - /// Returns the instance of [ReactionLevel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ReactionLevel? decode(dynamic data, {bool allowNull = true}) { - if (data is ReactionLevel) { - return data; - } - if (data != null) { - switch (data) { - case r'album': return ReactionLevel.album; - case r'asset': return ReactionLevel.asset; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ReactionLevelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/reaction_type.dart b/mobile/openapi/lib/model/reaction_type.dart deleted file mode 100644 index 051f993665..0000000000 --- a/mobile/openapi/lib/model/reaction_type.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Reaction type -enum ReactionType { - comment._(r'comment'), - like._(r'like'), - ; - - /// Instantiate a new enum with the provided value. - const ReactionType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ReactionType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ReactionType? fromJson(dynamic value) => ReactionTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ReactionType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReactionType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReactionType] to String, -/// and [decode] dynamic data back to [ReactionType]. -class ReactionTypeTypeTransformer { - factory ReactionTypeTypeTransformer() => _instance ??= const ReactionTypeTypeTransformer._(); - - const ReactionTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ReactionType data) => data._value; - - /// Returns the instance of [ReactionType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ReactionType? decode(dynamic data, {bool allowNull = true}) { - if (data is ReactionType) { - return data; - } - if (data != null) { - switch (data) { - case r'comment': return ReactionType.comment; - case r'like': return ReactionType.like; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ReactionTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/recently_added_response.dart b/mobile/openapi/lib/model/recently_added_response.dart deleted file mode 100644 index 11b46f0d0d..0000000000 --- a/mobile/openapi/lib/model/recently_added_response.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RecentlyAddedResponse { - /// Returns a new [RecentlyAddedResponse] instance. - RecentlyAddedResponse({ - required this.sidebarWeb, - }); - - /// Whether the recently added page appears in the web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is RecentlyAddedResponse && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sidebarWeb.hashCode); - - @override - String toString() => 'RecentlyAddedResponse[sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [RecentlyAddedResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RecentlyAddedResponse? fromJson(dynamic value) { - upgradeDto(value, "RecentlyAddedResponse"); - if (value is Map) { - final json = value.cast(); - - return RecentlyAddedResponse( - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RecentlyAddedResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RecentlyAddedResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RecentlyAddedResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RecentlyAddedResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/recently_added_update.dart b/mobile/openapi/lib/model/recently_added_update.dart deleted file mode 100644 index 48714dd19d..0000000000 --- a/mobile/openapi/lib/model/recently_added_update.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RecentlyAddedUpdate { - /// Returns a new [RecentlyAddedUpdate] instance. - RecentlyAddedUpdate({ - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether the recently added page appears in the web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is RecentlyAddedUpdate && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'RecentlyAddedUpdate[sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [RecentlyAddedUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RecentlyAddedUpdate? fromJson(dynamic value) { - upgradeDto(value, "RecentlyAddedUpdate"); - if (value is Map) { - final json = value.cast(); - - return RecentlyAddedUpdate( - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RecentlyAddedUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RecentlyAddedUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RecentlyAddedUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RecentlyAddedUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/release_channel.dart b/mobile/openapi/lib/model/release_channel.dart deleted file mode 100644 index a1820736f6..0000000000 --- a/mobile/openapi/lib/model/release_channel.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Release channel -enum ReleaseChannel { - stable._(r'stable'), - releaseCandidate._(r'releaseCandidate'), - ; - - /// Instantiate a new enum with the provided value. - const ReleaseChannel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ReleaseChannel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ReleaseChannel? fromJson(dynamic value) => ReleaseChannelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ReleaseChannel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReleaseChannel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReleaseChannel] to String, -/// and [decode] dynamic data back to [ReleaseChannel]. -class ReleaseChannelTypeTransformer { - factory ReleaseChannelTypeTransformer() => _instance ??= const ReleaseChannelTypeTransformer._(); - - const ReleaseChannelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ReleaseChannel data) => data._value; - - /// Returns the instance of [ReleaseChannel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ReleaseChannel? decode(dynamic data, {bool allowNull = true}) { - if (data is ReleaseChannel) { - return data; - } - if (data != null) { - switch (data) { - case r'stable': return ReleaseChannel.stable; - case r'releaseCandidate': return ReleaseChannel.releaseCandidate; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ReleaseChannelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/release_event_v1.dart b/mobile/openapi/lib/model/release_event_v1.dart deleted file mode 100644 index f26ae3e96e..0000000000 --- a/mobile/openapi/lib/model/release_event_v1.dart +++ /dev/null @@ -1,133 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ReleaseEventV1 { - /// Returns a new [ReleaseEventV1] instance. - ReleaseEventV1({ - required this.checkedAt, - required this.isAvailable, - required this.releaseVersion, - required this.serverVersion, - required this.type, - }); - - /// When the server last checked for a latest version. As an ISO timestamp - String checkedAt; - - /// Whether a new version is available - bool isAvailable; - - ServerVersionResponseDto releaseVersion; - - ServerVersionResponseDto serverVersion; - - ReleaseType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is ReleaseEventV1 && - other.checkedAt == checkedAt && - other.isAvailable == isAvailable && - other.releaseVersion == releaseVersion && - other.serverVersion == serverVersion && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checkedAt.hashCode) + - (isAvailable.hashCode) + - (releaseVersion.hashCode) + - (serverVersion.hashCode) + - (type.hashCode); - - @override - String toString() => 'ReleaseEventV1[checkedAt=$checkedAt, isAvailable=$isAvailable, releaseVersion=$releaseVersion, serverVersion=$serverVersion, type=$type]'; - - Map toJson() { - final json = {}; - json[r'checkedAt'] = this.checkedAt; - json[r'isAvailable'] = this.isAvailable; - json[r'releaseVersion'] = this.releaseVersion; - json[r'serverVersion'] = this.serverVersion; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [ReleaseEventV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ReleaseEventV1? fromJson(dynamic value) { - upgradeDto(value, "ReleaseEventV1"); - if (value is Map) { - final json = value.cast(); - - return ReleaseEventV1( - checkedAt: mapValueOfType(json, r'checkedAt')!, - isAvailable: mapValueOfType(json, r'isAvailable')!, - releaseVersion: ServerVersionResponseDto.fromJson(json[r'releaseVersion'])!, - serverVersion: ServerVersionResponseDto.fromJson(json[r'serverVersion'])!, - type: ReleaseType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReleaseEventV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ReleaseEventV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ReleaseEventV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ReleaseEventV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checkedAt', - 'isAvailable', - 'releaseVersion', - 'serverVersion', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/release_type.dart b/mobile/openapi/lib/model/release_type.dart deleted file mode 100644 index aa1a962701..0000000000 --- a/mobile/openapi/lib/model/release_type.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -enum ReleaseType { - major._(r'major'), - premajor._(r'premajor'), - minor._(r'minor'), - preminor._(r'preminor'), - patch_._(r'patch'), - prepatch._(r'prepatch'), - prerelease._(r'prerelease'), - ; - - /// Instantiate a new enum with the provided value. - const ReleaseType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ReleaseType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ReleaseType? fromJson(dynamic value) => ReleaseTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ReleaseType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReleaseType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReleaseType] to String, -/// and [decode] dynamic data back to [ReleaseType]. -class ReleaseTypeTypeTransformer { - factory ReleaseTypeTypeTransformer() => _instance ??= const ReleaseTypeTypeTransformer._(); - - const ReleaseTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ReleaseType data) => data._value; - - /// Returns the instance of [ReleaseType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ReleaseType? decode(dynamic data, {bool allowNull = true}) { - if (data is ReleaseType) { - return data; - } - if (data != null) { - switch (data) { - case r'major': return ReleaseType.major; - case r'premajor': return ReleaseType.premajor; - case r'minor': return ReleaseType.minor; - case r'preminor': return ReleaseType.preminor; - case r'patch': return ReleaseType.patch_; - case r'prepatch': return ReleaseType.prepatch; - case r'prerelease': return ReleaseType.prerelease; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ReleaseTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart b/mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart deleted file mode 100644 index 07bb226ac0..0000000000 --- a/mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ReverseGeocodingStateResponseDto { - /// Returns a new [ReverseGeocodingStateResponseDto] instance. - ReverseGeocodingStateResponseDto({ - required this.lastImportFileName, - required this.lastUpdate, - }); - - /// Last import file name - String? lastImportFileName; - - /// Last update timestamp - String? lastUpdate; - - @override - bool operator ==(Object other) => identical(this, other) || other is ReverseGeocodingStateResponseDto && - other.lastImportFileName == lastImportFileName && - other.lastUpdate == lastUpdate; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (lastImportFileName == null ? 0 : lastImportFileName!.hashCode) + - (lastUpdate == null ? 0 : lastUpdate!.hashCode); - - @override - String toString() => 'ReverseGeocodingStateResponseDto[lastImportFileName=$lastImportFileName, lastUpdate=$lastUpdate]'; - - Map toJson() { - final json = {}; - if (this.lastImportFileName != null) { - json[r'lastImportFileName'] = this.lastImportFileName; - } else { - json[r'lastImportFileName'] = null; - } - if (this.lastUpdate != null) { - json[r'lastUpdate'] = this.lastUpdate; - } else { - json[r'lastUpdate'] = null; - } - return json; - } - - /// Returns a new [ReverseGeocodingStateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ReverseGeocodingStateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ReverseGeocodingStateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ReverseGeocodingStateResponseDto( - lastImportFileName: mapValueOfType(json, r'lastImportFileName'), - lastUpdate: mapValueOfType(json, r'lastUpdate'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReverseGeocodingStateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ReverseGeocodingStateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ReverseGeocodingStateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ReverseGeocodingStateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'lastImportFileName', - 'lastUpdate', - }; -} - diff --git a/mobile/openapi/lib/model/rotate_parameters.dart b/mobile/openapi/lib/model/rotate_parameters.dart deleted file mode 100644 index 33609e83e5..0000000000 --- a/mobile/openapi/lib/model/rotate_parameters.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RotateParameters { - /// Returns a new [RotateParameters] instance. - RotateParameters({ - required this.angle, - }); - - /// Rotation angle in degrees - num angle; - - @override - bool operator ==(Object other) => identical(this, other) || other is RotateParameters && - other.angle == angle; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (angle.hashCode); - - @override - String toString() => 'RotateParameters[angle=$angle]'; - - Map toJson() { - final json = {}; - json[r'angle'] = this.angle; - return json; - } - - /// Returns a new [RotateParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RotateParameters? fromJson(dynamic value) { - upgradeDto(value, "RotateParameters"); - if (value is Map) { - final json = value.cast(); - - return RotateParameters( - angle: num.parse('${json[r'angle']}'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RotateParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RotateParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RotateParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RotateParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'angle', - }; -} - diff --git a/mobile/openapi/lib/model/search_album_response_dto.dart b/mobile/openapi/lib/model/search_album_response_dto.dart deleted file mode 100644 index c21113ee6d..0000000000 --- a/mobile/openapi/lib/model/search_album_response_dto.dart +++ /dev/null @@ -1,131 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchAlbumResponseDto { - /// Returns a new [SearchAlbumResponseDto] instance. - SearchAlbumResponseDto({ - required this.count, - this.facets = const [], - this.items = const [], - required this.total, - }); - - /// Number of albums in this page - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - List facets; - - List items; - - /// Total number of matching albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchAlbumResponseDto && - other.count == count && - _deepEquality.equals(other.facets, facets) && - _deepEquality.equals(other.items, items) && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (facets.hashCode) + - (items.hashCode) + - (total.hashCode); - - @override - String toString() => 'SearchAlbumResponseDto[count=$count, facets=$facets, items=$items, total=$total]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'facets'] = this.facets; - json[r'items'] = this.items; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [SearchAlbumResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchAlbumResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchAlbumResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchAlbumResponseDto( - count: mapValueOfType(json, r'count')!, - facets: SearchFacetResponseDto.listFromJson(json[r'facets']), - items: AlbumResponseDto.listFromJson(json[r'items']), - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchAlbumResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchAlbumResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchAlbumResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchAlbumResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'facets', - 'items', - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/search_asset_response_dto.dart b/mobile/openapi/lib/model/search_asset_response_dto.dart deleted file mode 100644 index 82971c3c49..0000000000 --- a/mobile/openapi/lib/model/search_asset_response_dto.dart +++ /dev/null @@ -1,144 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchAssetResponseDto { - /// Returns a new [SearchAssetResponseDto] instance. - SearchAssetResponseDto({ - required this.count, - this.facets = const [], - this.items = const [], - required this.nextPage, - required this.total, - }); - - /// Number of assets in this page - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - List facets; - - List items; - - /// Next page token - String? nextPage; - - /// Total number of matching assets - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchAssetResponseDto && - other.count == count && - _deepEquality.equals(other.facets, facets) && - _deepEquality.equals(other.items, items) && - other.nextPage == nextPage && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (facets.hashCode) + - (items.hashCode) + - (nextPage == null ? 0 : nextPage!.hashCode) + - (total.hashCode); - - @override - String toString() => 'SearchAssetResponseDto[count=$count, facets=$facets, items=$items, nextPage=$nextPage, total=$total]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'facets'] = this.facets; - json[r'items'] = this.items; - if (this.nextPage != null) { - json[r'nextPage'] = this.nextPage; - } else { - json[r'nextPage'] = null; - } - json[r'total'] = this.total; - return json; - } - - /// Returns a new [SearchAssetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchAssetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchAssetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchAssetResponseDto( - count: mapValueOfType(json, r'count')!, - facets: SearchFacetResponseDto.listFromJson(json[r'facets']), - items: AssetResponseDto.listFromJson(json[r'items']), - nextPage: mapValueOfType(json, r'nextPage'), - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchAssetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchAssetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchAssetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchAssetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'facets', - 'items', - 'nextPage', - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/search_explore_item.dart b/mobile/openapi/lib/model/search_explore_item.dart deleted file mode 100644 index 4089011879..0000000000 --- a/mobile/openapi/lib/model/search_explore_item.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchExploreItem { - /// Returns a new [SearchExploreItem] instance. - SearchExploreItem({ - required this.data, - required this.value, - }); - - AssetResponseDto data; - - /// Explore value - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchExploreItem && - other.data == data && - other.value == value; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode) + - (value.hashCode); - - @override - String toString() => 'SearchExploreItem[data=$data, value=$value]'; - - Map toJson() { - final json = {}; - json[r'data'] = this.data; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SearchExploreItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchExploreItem? fromJson(dynamic value) { - upgradeDto(value, "SearchExploreItem"); - if (value is Map) { - final json = value.cast(); - - return SearchExploreItem( - data: AssetResponseDto.fromJson(json[r'data'])!, - value: mapValueOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchExploreItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchExploreItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchExploreItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchExploreItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/search_explore_response_dto.dart b/mobile/openapi/lib/model/search_explore_response_dto.dart deleted file mode 100644 index 07ce26c9b8..0000000000 --- a/mobile/openapi/lib/model/search_explore_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchExploreResponseDto { - /// Returns a new [SearchExploreResponseDto] instance. - SearchExploreResponseDto({ - required this.fieldName, - this.items = const [], - }); - - /// Explore field name - String fieldName; - - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchExploreResponseDto && - other.fieldName == fieldName && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (fieldName.hashCode) + - (items.hashCode); - - @override - String toString() => 'SearchExploreResponseDto[fieldName=$fieldName, items=$items]'; - - Map toJson() { - final json = {}; - json[r'fieldName'] = this.fieldName; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [SearchExploreResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchExploreResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchExploreResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchExploreResponseDto( - fieldName: mapValueOfType(json, r'fieldName')!, - items: SearchExploreItem.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchExploreResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchExploreResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchExploreResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchExploreResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'fieldName', - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/search_facet_count_response_dto.dart b/mobile/openapi/lib/model/search_facet_count_response_dto.dart deleted file mode 100644 index 62adfaa74a..0000000000 --- a/mobile/openapi/lib/model/search_facet_count_response_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchFacetCountResponseDto { - /// Returns a new [SearchFacetCountResponseDto] instance. - SearchFacetCountResponseDto({ - required this.count, - required this.value, - }); - - /// Number of assets with this facet value - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - /// Facet value - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchFacetCountResponseDto && - other.count == count && - other.value == value; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (value.hashCode); - - @override - String toString() => 'SearchFacetCountResponseDto[count=$count, value=$value]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SearchFacetCountResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchFacetCountResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchFacetCountResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchFacetCountResponseDto( - count: mapValueOfType(json, r'count')!, - value: mapValueOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchFacetCountResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchFacetCountResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchFacetCountResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchFacetCountResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/search_facet_response_dto.dart b/mobile/openapi/lib/model/search_facet_response_dto.dart deleted file mode 100644 index 51124ef1cf..0000000000 --- a/mobile/openapi/lib/model/search_facet_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchFacetResponseDto { - /// Returns a new [SearchFacetResponseDto] instance. - SearchFacetResponseDto({ - this.counts = const [], - required this.fieldName, - }); - - List counts; - - /// Facet field name - String fieldName; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchFacetResponseDto && - _deepEquality.equals(other.counts, counts) && - other.fieldName == fieldName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (counts.hashCode) + - (fieldName.hashCode); - - @override - String toString() => 'SearchFacetResponseDto[counts=$counts, fieldName=$fieldName]'; - - Map toJson() { - final json = {}; - json[r'counts'] = this.counts; - json[r'fieldName'] = this.fieldName; - return json; - } - - /// Returns a new [SearchFacetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchFacetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchFacetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchFacetResponseDto( - counts: SearchFacetCountResponseDto.listFromJson(json[r'counts']), - fieldName: mapValueOfType(json, r'fieldName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchFacetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchFacetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchFacetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchFacetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'counts', - 'fieldName', - }; -} - diff --git a/mobile/openapi/lib/model/search_response_dto.dart b/mobile/openapi/lib/model/search_response_dto.dart deleted file mode 100644 index ca742ae35c..0000000000 --- a/mobile/openapi/lib/model/search_response_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchResponseDto { - /// Returns a new [SearchResponseDto] instance. - SearchResponseDto({ - required this.albums, - required this.assets, - }); - - SearchAlbumResponseDto albums; - - SearchAssetResponseDto assets; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchResponseDto && - other.albums == albums && - other.assets == assets; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (assets.hashCode); - - @override - String toString() => 'SearchResponseDto[albums=$albums, assets=$assets]'; - - Map toJson() { - final json = {}; - json[r'albums'] = this.albums; - json[r'assets'] = this.assets; - return json; - } - - /// Returns a new [SearchResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchResponseDto( - albums: SearchAlbumResponseDto.fromJson(json[r'albums'])!, - assets: SearchAssetResponseDto.fromJson(json[r'assets'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albums', - 'assets', - }; -} - diff --git a/mobile/openapi/lib/model/search_statistics_response_dto.dart b/mobile/openapi/lib/model/search_statistics_response_dto.dart deleted file mode 100644 index c4d893af05..0000000000 --- a/mobile/openapi/lib/model/search_statistics_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchStatisticsResponseDto { - /// Returns a new [SearchStatisticsResponseDto] instance. - SearchStatisticsResponseDto({ - required this.total, - }); - - /// Total number of matching assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchStatisticsResponseDto && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (total.hashCode); - - @override - String toString() => 'SearchStatisticsResponseDto[total=$total]'; - - Map toJson() { - final json = {}; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [SearchStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchStatisticsResponseDto( - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/search_suggestion_type.dart b/mobile/openapi/lib/model/search_suggestion_type.dart deleted file mode 100644 index 8dac2fc025..0000000000 --- a/mobile/openapi/lib/model/search_suggestion_type.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Suggestion type -enum SearchSuggestionType { - country._(r'country'), - state._(r'state'), - city._(r'city'), - cameraMake._(r'camera-make'), - cameraModel._(r'camera-model'), - cameraLensModel._(r'camera-lens-model'), - ; - - /// Instantiate a new enum with the provided value. - const SearchSuggestionType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SearchSuggestionType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SearchSuggestionType? fromJson(dynamic value) => SearchSuggestionTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SearchSuggestionType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchSuggestionType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SearchSuggestionType] to String, -/// and [decode] dynamic data back to [SearchSuggestionType]. -class SearchSuggestionTypeTypeTransformer { - factory SearchSuggestionTypeTypeTransformer() => _instance ??= const SearchSuggestionTypeTypeTransformer._(); - - const SearchSuggestionTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SearchSuggestionType data) => data._value; - - /// Returns the instance of [SearchSuggestionType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SearchSuggestionType? decode(dynamic data, {bool allowNull = true}) { - if (data is SearchSuggestionType) { - return data; - } - if (data != null) { - switch (data) { - case r'country': return SearchSuggestionType.country; - case r'state': return SearchSuggestionType.state; - case r'city': return SearchSuggestionType.city; - case r'camera-make': return SearchSuggestionType.cameraMake; - case r'camera-model': return SearchSuggestionType.cameraModel; - case r'camera-lens-model': return SearchSuggestionType.cameraLensModel; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SearchSuggestionTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/server_about_response_dto.dart b/mobile/openapi/lib/model/server_about_response_dto.dart deleted file mode 100644 index dcfb279204..0000000000 --- a/mobile/openapi/lib/model/server_about_response_dto.dart +++ /dev/null @@ -1,424 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerAboutResponseDto { - /// Returns a new [ServerAboutResponseDto] instance. - ServerAboutResponseDto({ - this.build = const Optional.absent(), - this.buildImage = const Optional.absent(), - this.buildImageUrl = const Optional.absent(), - this.buildUrl = const Optional.absent(), - this.exiftool = const Optional.absent(), - this.ffmpeg = const Optional.absent(), - this.imagemagick = const Optional.absent(), - this.libvips = const Optional.absent(), - required this.licensed, - this.nodejs = const Optional.absent(), - this.repository = const Optional.absent(), - this.repositoryUrl = const Optional.absent(), - this.sourceCommit = const Optional.absent(), - this.sourceRef = const Optional.absent(), - this.sourceUrl = const Optional.absent(), - this.thirdPartyBugFeatureUrl = const Optional.absent(), - this.thirdPartyDocumentationUrl = const Optional.absent(), - this.thirdPartySourceUrl = const Optional.absent(), - this.thirdPartySupportUrl = const Optional.absent(), - required this.version, - required this.versionUrl, - }); - - /// Build identifier - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional build; - - /// Build image name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional buildImage; - - /// Build image URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional buildImageUrl; - - /// Build URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional buildUrl; - - /// ExifTool version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional exiftool; - - /// FFmpeg version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ffmpeg; - - /// ImageMagick version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional imagemagick; - - /// libvips version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional libvips; - - /// Whether the server is licensed - bool licensed; - - /// Node.js version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional nodejs; - - /// Repository name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional repository; - - /// Repository URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional repositoryUrl; - - /// Source commit hash - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sourceCommit; - - /// Source reference (branch/tag) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sourceRef; - - /// Source URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sourceUrl; - - /// Third-party bug/feature URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thirdPartyBugFeatureUrl; - - /// Third-party documentation URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thirdPartyDocumentationUrl; - - /// Third-party source URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thirdPartySourceUrl; - - /// Third-party support URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thirdPartySupportUrl; - - /// Server version - String version; - - /// URL to version information - String versionUrl; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerAboutResponseDto && - other.build == build && - other.buildImage == buildImage && - other.buildImageUrl == buildImageUrl && - other.buildUrl == buildUrl && - other.exiftool == exiftool && - other.ffmpeg == ffmpeg && - other.imagemagick == imagemagick && - other.libvips == libvips && - other.licensed == licensed && - other.nodejs == nodejs && - other.repository == repository && - other.repositoryUrl == repositoryUrl && - other.sourceCommit == sourceCommit && - other.sourceRef == sourceRef && - other.sourceUrl == sourceUrl && - other.thirdPartyBugFeatureUrl == thirdPartyBugFeatureUrl && - other.thirdPartyDocumentationUrl == thirdPartyDocumentationUrl && - other.thirdPartySourceUrl == thirdPartySourceUrl && - other.thirdPartySupportUrl == thirdPartySupportUrl && - other.version == version && - other.versionUrl == versionUrl; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (build == null ? 0 : build!.hashCode) + - (buildImage == null ? 0 : buildImage!.hashCode) + - (buildImageUrl == null ? 0 : buildImageUrl!.hashCode) + - (buildUrl == null ? 0 : buildUrl!.hashCode) + - (exiftool == null ? 0 : exiftool!.hashCode) + - (ffmpeg == null ? 0 : ffmpeg!.hashCode) + - (imagemagick == null ? 0 : imagemagick!.hashCode) + - (libvips == null ? 0 : libvips!.hashCode) + - (licensed.hashCode) + - (nodejs == null ? 0 : nodejs!.hashCode) + - (repository == null ? 0 : repository!.hashCode) + - (repositoryUrl == null ? 0 : repositoryUrl!.hashCode) + - (sourceCommit == null ? 0 : sourceCommit!.hashCode) + - (sourceRef == null ? 0 : sourceRef!.hashCode) + - (sourceUrl == null ? 0 : sourceUrl!.hashCode) + - (thirdPartyBugFeatureUrl == null ? 0 : thirdPartyBugFeatureUrl!.hashCode) + - (thirdPartyDocumentationUrl == null ? 0 : thirdPartyDocumentationUrl!.hashCode) + - (thirdPartySourceUrl == null ? 0 : thirdPartySourceUrl!.hashCode) + - (thirdPartySupportUrl == null ? 0 : thirdPartySupportUrl!.hashCode) + - (version.hashCode) + - (versionUrl.hashCode); - - @override - String toString() => 'ServerAboutResponseDto[build=$build, buildImage=$buildImage, buildImageUrl=$buildImageUrl, buildUrl=$buildUrl, exiftool=$exiftool, ffmpeg=$ffmpeg, imagemagick=$imagemagick, libvips=$libvips, licensed=$licensed, nodejs=$nodejs, repository=$repository, repositoryUrl=$repositoryUrl, sourceCommit=$sourceCommit, sourceRef=$sourceRef, sourceUrl=$sourceUrl, thirdPartyBugFeatureUrl=$thirdPartyBugFeatureUrl, thirdPartyDocumentationUrl=$thirdPartyDocumentationUrl, thirdPartySourceUrl=$thirdPartySourceUrl, thirdPartySupportUrl=$thirdPartySupportUrl, version=$version, versionUrl=$versionUrl]'; - - Map toJson() { - final json = {}; - if (this.build.isPresent) { - final value = this.build.value; - json[r'build'] = value; - } - if (this.buildImage.isPresent) { - final value = this.buildImage.value; - json[r'buildImage'] = value; - } - if (this.buildImageUrl.isPresent) { - final value = this.buildImageUrl.value; - json[r'buildImageUrl'] = value; - } - if (this.buildUrl.isPresent) { - final value = this.buildUrl.value; - json[r'buildUrl'] = value; - } - if (this.exiftool.isPresent) { - final value = this.exiftool.value; - json[r'exiftool'] = value; - } - if (this.ffmpeg.isPresent) { - final value = this.ffmpeg.value; - json[r'ffmpeg'] = value; - } - if (this.imagemagick.isPresent) { - final value = this.imagemagick.value; - json[r'imagemagick'] = value; - } - if (this.libvips.isPresent) { - final value = this.libvips.value; - json[r'libvips'] = value; - } - json[r'licensed'] = this.licensed; - if (this.nodejs.isPresent) { - final value = this.nodejs.value; - json[r'nodejs'] = value; - } - if (this.repository.isPresent) { - final value = this.repository.value; - json[r'repository'] = value; - } - if (this.repositoryUrl.isPresent) { - final value = this.repositoryUrl.value; - json[r'repositoryUrl'] = value; - } - if (this.sourceCommit.isPresent) { - final value = this.sourceCommit.value; - json[r'sourceCommit'] = value; - } - if (this.sourceRef.isPresent) { - final value = this.sourceRef.value; - json[r'sourceRef'] = value; - } - if (this.sourceUrl.isPresent) { - final value = this.sourceUrl.value; - json[r'sourceUrl'] = value; - } - if (this.thirdPartyBugFeatureUrl.isPresent) { - final value = this.thirdPartyBugFeatureUrl.value; - json[r'thirdPartyBugFeatureUrl'] = value; - } - if (this.thirdPartyDocumentationUrl.isPresent) { - final value = this.thirdPartyDocumentationUrl.value; - json[r'thirdPartyDocumentationUrl'] = value; - } - if (this.thirdPartySourceUrl.isPresent) { - final value = this.thirdPartySourceUrl.value; - json[r'thirdPartySourceUrl'] = value; - } - if (this.thirdPartySupportUrl.isPresent) { - final value = this.thirdPartySupportUrl.value; - json[r'thirdPartySupportUrl'] = value; - } - json[r'version'] = this.version; - json[r'versionUrl'] = this.versionUrl; - return json; - } - - /// Returns a new [ServerAboutResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerAboutResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerAboutResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerAboutResponseDto( - build: json.containsKey(r'build') ? Optional.present(mapValueOfType(json, r'build')) : const Optional.absent(), - buildImage: json.containsKey(r'buildImage') ? Optional.present(mapValueOfType(json, r'buildImage')) : const Optional.absent(), - buildImageUrl: json.containsKey(r'buildImageUrl') ? Optional.present(mapValueOfType(json, r'buildImageUrl')) : const Optional.absent(), - buildUrl: json.containsKey(r'buildUrl') ? Optional.present(mapValueOfType(json, r'buildUrl')) : const Optional.absent(), - exiftool: json.containsKey(r'exiftool') ? Optional.present(mapValueOfType(json, r'exiftool')) : const Optional.absent(), - ffmpeg: json.containsKey(r'ffmpeg') ? Optional.present(mapValueOfType(json, r'ffmpeg')) : const Optional.absent(), - imagemagick: json.containsKey(r'imagemagick') ? Optional.present(mapValueOfType(json, r'imagemagick')) : const Optional.absent(), - libvips: json.containsKey(r'libvips') ? Optional.present(mapValueOfType(json, r'libvips')) : const Optional.absent(), - licensed: mapValueOfType(json, r'licensed')!, - nodejs: json.containsKey(r'nodejs') ? Optional.present(mapValueOfType(json, r'nodejs')) : const Optional.absent(), - repository: json.containsKey(r'repository') ? Optional.present(mapValueOfType(json, r'repository')) : const Optional.absent(), - repositoryUrl: json.containsKey(r'repositoryUrl') ? Optional.present(mapValueOfType(json, r'repositoryUrl')) : const Optional.absent(), - sourceCommit: json.containsKey(r'sourceCommit') ? Optional.present(mapValueOfType(json, r'sourceCommit')) : const Optional.absent(), - sourceRef: json.containsKey(r'sourceRef') ? Optional.present(mapValueOfType(json, r'sourceRef')) : const Optional.absent(), - sourceUrl: json.containsKey(r'sourceUrl') ? Optional.present(mapValueOfType(json, r'sourceUrl')) : const Optional.absent(), - thirdPartyBugFeatureUrl: json.containsKey(r'thirdPartyBugFeatureUrl') ? Optional.present(mapValueOfType(json, r'thirdPartyBugFeatureUrl')) : const Optional.absent(), - thirdPartyDocumentationUrl: json.containsKey(r'thirdPartyDocumentationUrl') ? Optional.present(mapValueOfType(json, r'thirdPartyDocumentationUrl')) : const Optional.absent(), - thirdPartySourceUrl: json.containsKey(r'thirdPartySourceUrl') ? Optional.present(mapValueOfType(json, r'thirdPartySourceUrl')) : const Optional.absent(), - thirdPartySupportUrl: json.containsKey(r'thirdPartySupportUrl') ? Optional.present(mapValueOfType(json, r'thirdPartySupportUrl')) : const Optional.absent(), - version: mapValueOfType(json, r'version')!, - versionUrl: mapValueOfType(json, r'versionUrl')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerAboutResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerAboutResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerAboutResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerAboutResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'licensed', - 'version', - 'versionUrl', - }; -} - diff --git a/mobile/openapi/lib/model/server_apk_links_dto.dart b/mobile/openapi/lib/model/server_apk_links_dto.dart deleted file mode 100644 index 2227018468..0000000000 --- a/mobile/openapi/lib/model/server_apk_links_dto.dart +++ /dev/null @@ -1,127 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerApkLinksDto { - /// Returns a new [ServerApkLinksDto] instance. - ServerApkLinksDto({ - required this.arm64v8a, - required this.armeabiv7a, - required this.universal, - required this.x8664, - }); - - /// APK download link for ARM64 v8a architecture - String arm64v8a; - - /// APK download link for ARM EABI v7a architecture - String armeabiv7a; - - /// APK download link for universal architecture - String universal; - - /// APK download link for x86_64 architecture - String x8664; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerApkLinksDto && - other.arm64v8a == arm64v8a && - other.armeabiv7a == armeabiv7a && - other.universal == universal && - other.x8664 == x8664; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (arm64v8a.hashCode) + - (armeabiv7a.hashCode) + - (universal.hashCode) + - (x8664.hashCode); - - @override - String toString() => 'ServerApkLinksDto[arm64v8a=$arm64v8a, armeabiv7a=$armeabiv7a, universal=$universal, x8664=$x8664]'; - - Map toJson() { - final json = {}; - json[r'arm64v8a'] = this.arm64v8a; - json[r'armeabiv7a'] = this.armeabiv7a; - json[r'universal'] = this.universal; - json[r'x86_64'] = this.x8664; - return json; - } - - /// Returns a new [ServerApkLinksDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerApkLinksDto? fromJson(dynamic value) { - upgradeDto(value, "ServerApkLinksDto"); - if (value is Map) { - final json = value.cast(); - - return ServerApkLinksDto( - arm64v8a: mapValueOfType(json, r'arm64v8a')!, - armeabiv7a: mapValueOfType(json, r'armeabiv7a')!, - universal: mapValueOfType(json, r'universal')!, - x8664: mapValueOfType(json, r'x86_64')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerApkLinksDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerApkLinksDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerApkLinksDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerApkLinksDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'arm64v8a', - 'armeabiv7a', - 'universal', - 'x86_64', - }; -} - diff --git a/mobile/openapi/lib/model/server_config_dto.dart b/mobile/openapi/lib/model/server_config_dto.dart deleted file mode 100644 index 0eaaec7c7f..0000000000 --- a/mobile/openapi/lib/model/server_config_dto.dart +++ /dev/null @@ -1,208 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerConfigDto { - /// Returns a new [ServerConfigDto] instance. - ServerConfigDto({ - required this.externalDomain, - required this.isInitialized, - required this.isOnboarded, - required this.loginPageMessage, - required this.maintenanceMode, - required this.mapDarkStyleUrl, - required this.mapLightStyleUrl, - required this.minFaces, - required this.oauthButtonText, - required this.publicUsers, - required this.trashDays, - required this.userDeleteDelay, - }); - - /// External domain URL - String externalDomain; - - /// Whether the server has been initialized - bool isInitialized; - - /// Whether the admin has completed onboarding - bool isOnboarded; - - /// Login page message - String loginPageMessage; - - /// Whether maintenance mode is active - bool maintenanceMode; - - /// Map dark style URL - String mapDarkStyleUrl; - - /// Map light style URL - String mapLightStyleUrl; - - /// People min faces server default - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int minFaces; - - /// OAuth button text - String oauthButtonText; - - /// Whether public user registration is enabled - bool publicUsers; - - /// Number of days before trashed assets are permanently deleted - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int trashDays; - - /// Delay in days before deleted users are permanently removed - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int userDeleteDelay; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerConfigDto && - other.externalDomain == externalDomain && - other.isInitialized == isInitialized && - other.isOnboarded == isOnboarded && - other.loginPageMessage == loginPageMessage && - other.maintenanceMode == maintenanceMode && - other.mapDarkStyleUrl == mapDarkStyleUrl && - other.mapLightStyleUrl == mapLightStyleUrl && - other.minFaces == minFaces && - other.oauthButtonText == oauthButtonText && - other.publicUsers == publicUsers && - other.trashDays == trashDays && - other.userDeleteDelay == userDeleteDelay; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (externalDomain.hashCode) + - (isInitialized.hashCode) + - (isOnboarded.hashCode) + - (loginPageMessage.hashCode) + - (maintenanceMode.hashCode) + - (mapDarkStyleUrl.hashCode) + - (mapLightStyleUrl.hashCode) + - (minFaces.hashCode) + - (oauthButtonText.hashCode) + - (publicUsers.hashCode) + - (trashDays.hashCode) + - (userDeleteDelay.hashCode); - - @override - String toString() => 'ServerConfigDto[externalDomain=$externalDomain, isInitialized=$isInitialized, isOnboarded=$isOnboarded, loginPageMessage=$loginPageMessage, maintenanceMode=$maintenanceMode, mapDarkStyleUrl=$mapDarkStyleUrl, mapLightStyleUrl=$mapLightStyleUrl, minFaces=$minFaces, oauthButtonText=$oauthButtonText, publicUsers=$publicUsers, trashDays=$trashDays, userDeleteDelay=$userDeleteDelay]'; - - Map toJson() { - final json = {}; - json[r'externalDomain'] = this.externalDomain; - json[r'isInitialized'] = this.isInitialized; - json[r'isOnboarded'] = this.isOnboarded; - json[r'loginPageMessage'] = this.loginPageMessage; - json[r'maintenanceMode'] = this.maintenanceMode; - json[r'mapDarkStyleUrl'] = this.mapDarkStyleUrl; - json[r'mapLightStyleUrl'] = this.mapLightStyleUrl; - json[r'minFaces'] = this.minFaces; - json[r'oauthButtonText'] = this.oauthButtonText; - json[r'publicUsers'] = this.publicUsers; - json[r'trashDays'] = this.trashDays; - json[r'userDeleteDelay'] = this.userDeleteDelay; - return json; - } - - /// Returns a new [ServerConfigDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerConfigDto? fromJson(dynamic value) { - upgradeDto(value, "ServerConfigDto"); - if (value is Map) { - final json = value.cast(); - - return ServerConfigDto( - externalDomain: mapValueOfType(json, r'externalDomain')!, - isInitialized: mapValueOfType(json, r'isInitialized')!, - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - loginPageMessage: mapValueOfType(json, r'loginPageMessage')!, - maintenanceMode: mapValueOfType(json, r'maintenanceMode')!, - mapDarkStyleUrl: mapValueOfType(json, r'mapDarkStyleUrl')!, - mapLightStyleUrl: mapValueOfType(json, r'mapLightStyleUrl')!, - minFaces: mapValueOfType(json, r'minFaces')!, - oauthButtonText: mapValueOfType(json, r'oauthButtonText')!, - publicUsers: mapValueOfType(json, r'publicUsers')!, - trashDays: mapValueOfType(json, r'trashDays')!, - userDeleteDelay: mapValueOfType(json, r'userDeleteDelay')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerConfigDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerConfigDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerConfigDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerConfigDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'externalDomain', - 'isInitialized', - 'isOnboarded', - 'loginPageMessage', - 'maintenanceMode', - 'mapDarkStyleUrl', - 'mapLightStyleUrl', - 'minFaces', - 'oauthButtonText', - 'publicUsers', - 'trashDays', - 'userDeleteDelay', - }; -} - diff --git a/mobile/openapi/lib/model/server_features_dto.dart b/mobile/openapi/lib/model/server_features_dto.dart deleted file mode 100644 index 9b75ef2b32..0000000000 --- a/mobile/openapi/lib/model/server_features_dto.dart +++ /dev/null @@ -1,235 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerFeaturesDto { - /// Returns a new [ServerFeaturesDto] instance. - ServerFeaturesDto({ - required this.configFile, - required this.duplicateDetection, - required this.email, - required this.facialRecognition, - required this.importFaces, - required this.map, - required this.oauth, - required this.oauthAutoLaunch, - required this.ocr, - required this.passwordLogin, - required this.realtimeTranscoding, - required this.reverseGeocoding, - required this.search, - required this.sidecar, - required this.smartSearch, - required this.trash, - }); - - /// Whether config file is available - bool configFile; - - /// Whether duplicate detection is enabled - bool duplicateDetection; - - /// Whether email notifications are enabled - bool email; - - /// Whether facial recognition is enabled - bool facialRecognition; - - /// Whether face import is enabled - bool importFaces; - - /// Whether map feature is enabled - bool map; - - /// Whether OAuth is enabled - bool oauth; - - /// Whether OAuth auto-launch is enabled - bool oauthAutoLaunch; - - /// Whether OCR is enabled - bool ocr; - - /// Whether password login is enabled - bool passwordLogin; - - /// Whether real-time transcoding is enabled - bool realtimeTranscoding; - - /// Whether reverse geocoding is enabled - bool reverseGeocoding; - - /// Whether search is enabled - bool search; - - /// Whether sidecar files are supported - bool sidecar; - - /// Whether smart search is enabled - bool smartSearch; - - /// Whether trash feature is enabled - bool trash; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerFeaturesDto && - other.configFile == configFile && - other.duplicateDetection == duplicateDetection && - other.email == email && - other.facialRecognition == facialRecognition && - other.importFaces == importFaces && - other.map == map && - other.oauth == oauth && - other.oauthAutoLaunch == oauthAutoLaunch && - other.ocr == ocr && - other.passwordLogin == passwordLogin && - other.realtimeTranscoding == realtimeTranscoding && - other.reverseGeocoding == reverseGeocoding && - other.search == search && - other.sidecar == sidecar && - other.smartSearch == smartSearch && - other.trash == trash; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (configFile.hashCode) + - (duplicateDetection.hashCode) + - (email.hashCode) + - (facialRecognition.hashCode) + - (importFaces.hashCode) + - (map.hashCode) + - (oauth.hashCode) + - (oauthAutoLaunch.hashCode) + - (ocr.hashCode) + - (passwordLogin.hashCode) + - (realtimeTranscoding.hashCode) + - (reverseGeocoding.hashCode) + - (search.hashCode) + - (sidecar.hashCode) + - (smartSearch.hashCode) + - (trash.hashCode); - - @override - String toString() => 'ServerFeaturesDto[configFile=$configFile, duplicateDetection=$duplicateDetection, email=$email, facialRecognition=$facialRecognition, importFaces=$importFaces, map=$map, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, ocr=$ocr, passwordLogin=$passwordLogin, realtimeTranscoding=$realtimeTranscoding, reverseGeocoding=$reverseGeocoding, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, trash=$trash]'; - - Map toJson() { - final json = {}; - json[r'configFile'] = this.configFile; - json[r'duplicateDetection'] = this.duplicateDetection; - json[r'email'] = this.email; - json[r'facialRecognition'] = this.facialRecognition; - json[r'importFaces'] = this.importFaces; - json[r'map'] = this.map; - json[r'oauth'] = this.oauth; - json[r'oauthAutoLaunch'] = this.oauthAutoLaunch; - json[r'ocr'] = this.ocr; - json[r'passwordLogin'] = this.passwordLogin; - json[r'realtimeTranscoding'] = this.realtimeTranscoding; - json[r'reverseGeocoding'] = this.reverseGeocoding; - json[r'search'] = this.search; - json[r'sidecar'] = this.sidecar; - json[r'smartSearch'] = this.smartSearch; - json[r'trash'] = this.trash; - return json; - } - - /// Returns a new [ServerFeaturesDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerFeaturesDto? fromJson(dynamic value) { - upgradeDto(value, "ServerFeaturesDto"); - if (value is Map) { - final json = value.cast(); - - return ServerFeaturesDto( - configFile: mapValueOfType(json, r'configFile')!, - duplicateDetection: mapValueOfType(json, r'duplicateDetection')!, - email: mapValueOfType(json, r'email')!, - facialRecognition: mapValueOfType(json, r'facialRecognition')!, - importFaces: mapValueOfType(json, r'importFaces')!, - map: mapValueOfType(json, r'map')!, - oauth: mapValueOfType(json, r'oauth')!, - oauthAutoLaunch: mapValueOfType(json, r'oauthAutoLaunch')!, - ocr: mapValueOfType(json, r'ocr')!, - passwordLogin: mapValueOfType(json, r'passwordLogin')!, - realtimeTranscoding: mapValueOfType(json, r'realtimeTranscoding')!, - reverseGeocoding: mapValueOfType(json, r'reverseGeocoding')!, - search: mapValueOfType(json, r'search')!, - sidecar: mapValueOfType(json, r'sidecar')!, - smartSearch: mapValueOfType(json, r'smartSearch')!, - trash: mapValueOfType(json, r'trash')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerFeaturesDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerFeaturesDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerFeaturesDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerFeaturesDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'configFile', - 'duplicateDetection', - 'email', - 'facialRecognition', - 'importFaces', - 'map', - 'oauth', - 'oauthAutoLaunch', - 'ocr', - 'passwordLogin', - 'realtimeTranscoding', - 'reverseGeocoding', - 'search', - 'sidecar', - 'smartSearch', - 'trash', - }; -} - diff --git a/mobile/openapi/lib/model/server_media_types_response_dto.dart b/mobile/openapi/lib/model/server_media_types_response_dto.dart deleted file mode 100644 index 6a2aaeb9e1..0000000000 --- a/mobile/openapi/lib/model/server_media_types_response_dto.dart +++ /dev/null @@ -1,124 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerMediaTypesResponseDto { - /// Returns a new [ServerMediaTypesResponseDto] instance. - ServerMediaTypesResponseDto({ - this.image = const [], - this.sidecar = const [], - this.video = const [], - }); - - /// Supported image MIME types - List image; - - /// Supported sidecar MIME types - List sidecar; - - /// Supported video MIME types - List video; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerMediaTypesResponseDto && - _deepEquality.equals(other.image, image) && - _deepEquality.equals(other.sidecar, sidecar) && - _deepEquality.equals(other.video, video); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (image.hashCode) + - (sidecar.hashCode) + - (video.hashCode); - - @override - String toString() => 'ServerMediaTypesResponseDto[image=$image, sidecar=$sidecar, video=$video]'; - - Map toJson() { - final json = {}; - json[r'image'] = this.image; - json[r'sidecar'] = this.sidecar; - json[r'video'] = this.video; - return json; - } - - /// Returns a new [ServerMediaTypesResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerMediaTypesResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerMediaTypesResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerMediaTypesResponseDto( - image: json[r'image'] is Iterable - ? (json[r'image'] as Iterable).cast().toList(growable: false) - : const [], - sidecar: json[r'sidecar'] is Iterable - ? (json[r'sidecar'] as Iterable).cast().toList(growable: false) - : const [], - video: json[r'video'] is Iterable - ? (json[r'video'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerMediaTypesResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerMediaTypesResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerMediaTypesResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerMediaTypesResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'image', - 'sidecar', - 'video', - }; -} - diff --git a/mobile/openapi/lib/model/server_ping_response.dart b/mobile/openapi/lib/model/server_ping_response.dart deleted file mode 100644 index 621ebfa294..0000000000 --- a/mobile/openapi/lib/model/server_ping_response.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerPingResponse { - /// Returns a new [ServerPingResponse] instance. - ServerPingResponse({ - required this.res, - }); - - String res; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerPingResponse && - other.res == res; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (res.hashCode); - - @override - String toString() => 'ServerPingResponse[res=$res]'; - - Map toJson() { - final json = {}; - json[r'res'] = this.res; - return json; - } - - /// Returns a new [ServerPingResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerPingResponse? fromJson(dynamic value) { - upgradeDto(value, "ServerPingResponse"); - if (value is Map) { - final json = value.cast(); - - return ServerPingResponse( - res: mapValueOfType(json, r'res')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerPingResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerPingResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerPingResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerPingResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'res', - }; -} - diff --git a/mobile/openapi/lib/model/server_stats_response_dto.dart b/mobile/openapi/lib/model/server_stats_response_dto.dart deleted file mode 100644 index 605bd74f41..0000000000 --- a/mobile/openapi/lib/model/server_stats_response_dto.dart +++ /dev/null @@ -1,160 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerStatsResponseDto { - /// Returns a new [ServerStatsResponseDto] instance. - ServerStatsResponseDto({ - required this.photos, - required this.usage, - this.usageByUser = const [], - required this.usagePhotos, - required this.usageVideos, - required this.videos, - }); - - /// Total number of photos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int photos; - - /// Total storage usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usage; - - /// Array of usage for each user - List usageByUser; - - /// Storage usage for photos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usagePhotos; - - /// Storage usage for videos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usageVideos; - - /// Total number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerStatsResponseDto && - other.photos == photos && - other.usage == usage && - _deepEquality.equals(other.usageByUser, usageByUser) && - other.usagePhotos == usagePhotos && - other.usageVideos == usageVideos && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (photos.hashCode) + - (usage.hashCode) + - (usageByUser.hashCode) + - (usagePhotos.hashCode) + - (usageVideos.hashCode) + - (videos.hashCode); - - @override - String toString() => 'ServerStatsResponseDto[photos=$photos, usage=$usage, usageByUser=$usageByUser, usagePhotos=$usagePhotos, usageVideos=$usageVideos, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'photos'] = this.photos; - json[r'usage'] = this.usage; - json[r'usageByUser'] = this.usageByUser; - json[r'usagePhotos'] = this.usagePhotos; - json[r'usageVideos'] = this.usageVideos; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [ServerStatsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerStatsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerStatsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerStatsResponseDto( - photos: mapValueOfType(json, r'photos')!, - usage: mapValueOfType(json, r'usage')!, - usageByUser: UsageByUserDto.listFromJson(json[r'usageByUser']), - usagePhotos: mapValueOfType(json, r'usagePhotos')!, - usageVideos: mapValueOfType(json, r'usageVideos')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerStatsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerStatsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerStatsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerStatsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'photos', - 'usage', - 'usageByUser', - 'usagePhotos', - 'usageVideos', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/server_storage_response_dto.dart b/mobile/openapi/lib/model/server_storage_response_dto.dart deleted file mode 100644 index f4f77c7f9b..0000000000 --- a/mobile/openapi/lib/model/server_storage_response_dto.dart +++ /dev/null @@ -1,163 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerStorageResponseDto { - /// Returns a new [ServerStorageResponseDto] instance. - ServerStorageResponseDto({ - required this.diskAvailable, - required this.diskAvailableRaw, - required this.diskSize, - required this.diskSizeRaw, - required this.diskUsagePercentage, - required this.diskUse, - required this.diskUseRaw, - }); - - /// Available disk space (human-readable format) - String diskAvailable; - - /// Available disk space in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int diskAvailableRaw; - - /// Total disk size (human-readable format) - String diskSize; - - /// Total disk size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int diskSizeRaw; - - /// Disk usage percentage (0-100) - double diskUsagePercentage; - - /// Used disk space (human-readable format) - String diskUse; - - /// Used disk space in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int diskUseRaw; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerStorageResponseDto && - other.diskAvailable == diskAvailable && - other.diskAvailableRaw == diskAvailableRaw && - other.diskSize == diskSize && - other.diskSizeRaw == diskSizeRaw && - other.diskUsagePercentage == diskUsagePercentage && - other.diskUse == diskUse && - other.diskUseRaw == diskUseRaw; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (diskAvailable.hashCode) + - (diskAvailableRaw.hashCode) + - (diskSize.hashCode) + - (diskSizeRaw.hashCode) + - (diskUsagePercentage.hashCode) + - (diskUse.hashCode) + - (diskUseRaw.hashCode); - - @override - String toString() => 'ServerStorageResponseDto[diskAvailable=$diskAvailable, diskAvailableRaw=$diskAvailableRaw, diskSize=$diskSize, diskSizeRaw=$diskSizeRaw, diskUsagePercentage=$diskUsagePercentage, diskUse=$diskUse, diskUseRaw=$diskUseRaw]'; - - Map toJson() { - final json = {}; - json[r'diskAvailable'] = this.diskAvailable; - json[r'diskAvailableRaw'] = this.diskAvailableRaw; - json[r'diskSize'] = this.diskSize; - json[r'diskSizeRaw'] = this.diskSizeRaw; - json[r'diskUsagePercentage'] = this.diskUsagePercentage; - json[r'diskUse'] = this.diskUse; - json[r'diskUseRaw'] = this.diskUseRaw; - return json; - } - - /// Returns a new [ServerStorageResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerStorageResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerStorageResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerStorageResponseDto( - diskAvailable: mapValueOfType(json, r'diskAvailable')!, - diskAvailableRaw: mapValueOfType(json, r'diskAvailableRaw')!, - diskSize: mapValueOfType(json, r'diskSize')!, - diskSizeRaw: mapValueOfType(json, r'diskSizeRaw')!, - diskUsagePercentage: mapValueOfType(json, r'diskUsagePercentage')!, - diskUse: mapValueOfType(json, r'diskUse')!, - diskUseRaw: mapValueOfType(json, r'diskUseRaw')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerStorageResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerStorageResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerStorageResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerStorageResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'diskAvailable', - 'diskAvailableRaw', - 'diskSize', - 'diskSizeRaw', - 'diskUsagePercentage', - 'diskUse', - 'diskUseRaw', - }; -} - diff --git a/mobile/openapi/lib/model/server_version_history_response_dto.dart b/mobile/openapi/lib/model/server_version_history_response_dto.dart deleted file mode 100644 index 4af2933f8d..0000000000 --- a/mobile/openapi/lib/model/server_version_history_response_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerVersionHistoryResponseDto { - /// Returns a new [ServerVersionHistoryResponseDto] instance. - ServerVersionHistoryResponseDto({ - required this.createdAt, - required this.id, - required this.version, - }); - - /// When this version was first seen - DateTime createdAt; - - /// Version history entry ID - String id; - - /// Version string - String version; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerVersionHistoryResponseDto && - other.createdAt == createdAt && - other.id == id && - other.version == version; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (id.hashCode) + - (version.hashCode); - - @override - String toString() => 'ServerVersionHistoryResponseDto[createdAt=$createdAt, id=$id, version=$version]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'version'] = this.version; - return json; - } - - /// Returns a new [ServerVersionHistoryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerVersionHistoryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerVersionHistoryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerVersionHistoryResponseDto( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - version: mapValueOfType(json, r'version')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerVersionHistoryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerVersionHistoryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerVersionHistoryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerVersionHistoryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'version', - }; -} - diff --git a/mobile/openapi/lib/model/server_version_response_dto.dart b/mobile/openapi/lib/model/server_version_response_dto.dart deleted file mode 100644 index 8f4a192920..0000000000 --- a/mobile/openapi/lib/model/server_version_response_dto.dart +++ /dev/null @@ -1,143 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerVersionResponseDto { - /// Returns a new [ServerVersionResponseDto] instance. - ServerVersionResponseDto({ - required this.major, - required this.minor, - required this.patch_, - required this.prerelease, - }); - - /// Major version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int major; - - /// Minor version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int minor; - - /// Patch version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int patch_; - - /// Pre-release version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? prerelease; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerVersionResponseDto && - other.major == major && - other.minor == minor && - other.patch_ == patch_ && - other.prerelease == prerelease; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (major.hashCode) + - (minor.hashCode) + - (patch_.hashCode) + - (prerelease == null ? 0 : prerelease!.hashCode); - - @override - String toString() => 'ServerVersionResponseDto[major=$major, minor=$minor, patch_=$patch_, prerelease=$prerelease]'; - - Map toJson() { - final json = {}; - json[r'major'] = this.major; - json[r'minor'] = this.minor; - json[r'patch'] = this.patch_; - if (this.prerelease != null) { - json[r'prerelease'] = this.prerelease; - } else { - json[r'prerelease'] = null; - } - return json; - } - - /// Returns a new [ServerVersionResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerVersionResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerVersionResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerVersionResponseDto( - major: mapValueOfType(json, r'major')!, - minor: mapValueOfType(json, r'minor')!, - patch_: mapValueOfType(json, r'patch')!, - prerelease: mapValueOfType(json, r'prerelease'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerVersionResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerVersionResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerVersionResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerVersionResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'major', - 'minor', - 'patch', - 'prerelease', - }; -} - diff --git a/mobile/openapi/lib/model/session_create_dto.dart b/mobile/openapi/lib/model/session_create_dto.dart deleted file mode 100644 index 8033bb7f71..0000000000 --- a/mobile/openapi/lib/model/session_create_dto.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionCreateDto { - /// Returns a new [SessionCreateDto] instance. - SessionCreateDto({ - this.deviceOS = const Optional.absent(), - this.deviceType = const Optional.absent(), - this.duration = const Optional.absent(), - }); - - /// Device OS - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional deviceOS; - - /// Device type - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional deviceType; - - /// Session duration in seconds - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional duration; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionCreateDto && - other.deviceOS == deviceOS && - other.deviceType == deviceType && - other.duration == duration; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (deviceOS == null ? 0 : deviceOS!.hashCode) + - (deviceType == null ? 0 : deviceType!.hashCode) + - (duration == null ? 0 : duration!.hashCode); - - @override - String toString() => 'SessionCreateDto[deviceOS=$deviceOS, deviceType=$deviceType, duration=$duration]'; - - Map toJson() { - final json = {}; - if (this.deviceOS.isPresent) { - final value = this.deviceOS.value; - json[r'deviceOS'] = value; - } - if (this.deviceType.isPresent) { - final value = this.deviceType.value; - json[r'deviceType'] = value; - } - if (this.duration.isPresent) { - final value = this.duration.value; - json[r'duration'] = value; - } - return json; - } - - /// Returns a new [SessionCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionCreateDto? fromJson(dynamic value) { - upgradeDto(value, "SessionCreateDto"); - if (value is Map) { - final json = value.cast(); - - return SessionCreateDto( - deviceOS: json.containsKey(r'deviceOS') ? Optional.present(mapValueOfType(json, r'deviceOS')) : const Optional.absent(), - deviceType: json.containsKey(r'deviceType') ? Optional.present(mapValueOfType(json, r'deviceType')) : const Optional.absent(), - duration: json.containsKey(r'duration') ? Optional.present(json[r'duration'] == null ? null : int.parse('${json[r'duration']}')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/session_create_response_dto.dart b/mobile/openapi/lib/model/session_create_response_dto.dart deleted file mode 100644 index 497da9afe8..0000000000 --- a/mobile/openapi/lib/model/session_create_response_dto.dart +++ /dev/null @@ -1,193 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionCreateResponseDto { - /// Returns a new [SessionCreateResponseDto] instance. - SessionCreateResponseDto({ - required this.appVersion, - required this.createdAt, - required this.current, - required this.deviceOS, - required this.deviceType, - this.expiresAt = const Optional.absent(), - required this.id, - required this.isPendingSyncReset, - required this.token, - required this.updatedAt, - }); - - /// App version - String? appVersion; - - /// Creation date - String createdAt; - - /// Is current session - bool current; - - /// Device OS - String deviceOS; - - /// Device type - String deviceType; - - /// Expiration date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional expiresAt; - - /// Session ID - String id; - - /// Is pending sync reset - bool isPendingSyncReset; - - /// Session token - String token; - - /// Last update date - String updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionCreateResponseDto && - other.appVersion == appVersion && - other.createdAt == createdAt && - other.current == current && - other.deviceOS == deviceOS && - other.deviceType == deviceType && - other.expiresAt == expiresAt && - other.id == id && - other.isPendingSyncReset == isPendingSyncReset && - other.token == token && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (appVersion == null ? 0 : appVersion!.hashCode) + - (createdAt.hashCode) + - (current.hashCode) + - (deviceOS.hashCode) + - (deviceType.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (isPendingSyncReset.hashCode) + - (token.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SessionCreateResponseDto[appVersion=$appVersion, createdAt=$createdAt, current=$current, deviceOS=$deviceOS, deviceType=$deviceType, expiresAt=$expiresAt, id=$id, isPendingSyncReset=$isPendingSyncReset, token=$token, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.appVersion != null) { - json[r'appVersion'] = this.appVersion; - } else { - json[r'appVersion'] = null; - } - json[r'createdAt'] = this.createdAt; - json[r'current'] = this.current; - json[r'deviceOS'] = this.deviceOS; - json[r'deviceType'] = this.deviceType; - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value; - } - json[r'id'] = this.id; - json[r'isPendingSyncReset'] = this.isPendingSyncReset; - json[r'token'] = this.token; - json[r'updatedAt'] = this.updatedAt; - return json; - } - - /// Returns a new [SessionCreateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionCreateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SessionCreateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SessionCreateResponseDto( - appVersion: mapValueOfType(json, r'appVersion'), - createdAt: mapValueOfType(json, r'createdAt')!, - current: mapValueOfType(json, r'current')!, - deviceOS: mapValueOfType(json, r'deviceOS')!, - deviceType: mapValueOfType(json, r'deviceType')!, - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapValueOfType(json, r'expiresAt')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isPendingSyncReset: mapValueOfType(json, r'isPendingSyncReset')!, - token: mapValueOfType(json, r'token')!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionCreateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionCreateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionCreateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionCreateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'appVersion', - 'createdAt', - 'current', - 'deviceOS', - 'deviceType', - 'id', - 'isPendingSyncReset', - 'token', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/session_response_dto.dart b/mobile/openapi/lib/model/session_response_dto.dart deleted file mode 100644 index e1e20619cb..0000000000 --- a/mobile/openapi/lib/model/session_response_dto.dart +++ /dev/null @@ -1,184 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionResponseDto { - /// Returns a new [SessionResponseDto] instance. - SessionResponseDto({ - required this.appVersion, - required this.createdAt, - required this.current, - required this.deviceOS, - required this.deviceType, - this.expiresAt = const Optional.absent(), - required this.id, - required this.isPendingSyncReset, - required this.updatedAt, - }); - - /// App version - String? appVersion; - - /// Creation date - String createdAt; - - /// Is current session - bool current; - - /// Device OS - String deviceOS; - - /// Device type - String deviceType; - - /// Expiration date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional expiresAt; - - /// Session ID - String id; - - /// Is pending sync reset - bool isPendingSyncReset; - - /// Last update date - String updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionResponseDto && - other.appVersion == appVersion && - other.createdAt == createdAt && - other.current == current && - other.deviceOS == deviceOS && - other.deviceType == deviceType && - other.expiresAt == expiresAt && - other.id == id && - other.isPendingSyncReset == isPendingSyncReset && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (appVersion == null ? 0 : appVersion!.hashCode) + - (createdAt.hashCode) + - (current.hashCode) + - (deviceOS.hashCode) + - (deviceType.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (isPendingSyncReset.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SessionResponseDto[appVersion=$appVersion, createdAt=$createdAt, current=$current, deviceOS=$deviceOS, deviceType=$deviceType, expiresAt=$expiresAt, id=$id, isPendingSyncReset=$isPendingSyncReset, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.appVersion != null) { - json[r'appVersion'] = this.appVersion; - } else { - json[r'appVersion'] = null; - } - json[r'createdAt'] = this.createdAt; - json[r'current'] = this.current; - json[r'deviceOS'] = this.deviceOS; - json[r'deviceType'] = this.deviceType; - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value; - } - json[r'id'] = this.id; - json[r'isPendingSyncReset'] = this.isPendingSyncReset; - json[r'updatedAt'] = this.updatedAt; - return json; - } - - /// Returns a new [SessionResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SessionResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SessionResponseDto( - appVersion: mapValueOfType(json, r'appVersion'), - createdAt: mapValueOfType(json, r'createdAt')!, - current: mapValueOfType(json, r'current')!, - deviceOS: mapValueOfType(json, r'deviceOS')!, - deviceType: mapValueOfType(json, r'deviceType')!, - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapValueOfType(json, r'expiresAt')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isPendingSyncReset: mapValueOfType(json, r'isPendingSyncReset')!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'appVersion', - 'createdAt', - 'current', - 'deviceOS', - 'deviceType', - 'id', - 'isPendingSyncReset', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/session_unlock_dto.dart b/mobile/openapi/lib/model/session_unlock_dto.dart deleted file mode 100644 index 960b58acf0..0000000000 --- a/mobile/openapi/lib/model/session_unlock_dto.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionUnlockDto { - /// Returns a new [SessionUnlockDto] instance. - SessionUnlockDto({ - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - }); - - /// User password (required if PIN code is not provided) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - /// New PIN code (4-6 digits) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionUnlockDto && - other.password == password && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); - - @override - String toString() => 'SessionUnlockDto[password=$password, pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - return json; - } - - /// Returns a new [SessionUnlockDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionUnlockDto? fromJson(dynamic value) { - upgradeDto(value, "SessionUnlockDto"); - if (value is Map) { - final json = value.cast(); - - return SessionUnlockDto( - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionUnlockDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionUnlockDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionUnlockDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionUnlockDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/session_update_dto.dart b/mobile/openapi/lib/model/session_update_dto.dart deleted file mode 100644 index 90cbaffaf4..0000000000 --- a/mobile/openapi/lib/model/session_update_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionUpdateDto { - /// Returns a new [SessionUpdateDto] instance. - SessionUpdateDto({ - this.isPendingSyncReset = const Optional.absent(), - }); - - /// Reset pending sync state - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isPendingSyncReset; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionUpdateDto && - other.isPendingSyncReset == isPendingSyncReset; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isPendingSyncReset == null ? 0 : isPendingSyncReset!.hashCode); - - @override - String toString() => 'SessionUpdateDto[isPendingSyncReset=$isPendingSyncReset]'; - - Map toJson() { - final json = {}; - if (this.isPendingSyncReset.isPresent) { - final value = this.isPendingSyncReset.value; - json[r'isPendingSyncReset'] = value; - } - return json; - } - - /// Returns a new [SessionUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "SessionUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return SessionUpdateDto( - isPendingSyncReset: json.containsKey(r'isPendingSyncReset') ? Optional.present(mapValueOfType(json, r'isPendingSyncReset')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/set_maintenance_mode_dto.dart b/mobile/openapi/lib/model/set_maintenance_mode_dto.dart deleted file mode 100644 index 21f123bb84..0000000000 --- a/mobile/openapi/lib/model/set_maintenance_mode_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SetMaintenanceModeDto { - /// Returns a new [SetMaintenanceModeDto] instance. - SetMaintenanceModeDto({ - required this.action, - this.restoreBackupFilename = const Optional.absent(), - }); - - MaintenanceAction action; - - /// Restore backup filename - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional restoreBackupFilename; - - @override - bool operator ==(Object other) => identical(this, other) || other is SetMaintenanceModeDto && - other.action == action && - other.restoreBackupFilename == restoreBackupFilename; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (restoreBackupFilename == null ? 0 : restoreBackupFilename!.hashCode); - - @override - String toString() => 'SetMaintenanceModeDto[action=$action, restoreBackupFilename=$restoreBackupFilename]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - if (this.restoreBackupFilename.isPresent) { - final value = this.restoreBackupFilename.value; - json[r'restoreBackupFilename'] = value; - } - return json; - } - - /// Returns a new [SetMaintenanceModeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SetMaintenanceModeDto? fromJson(dynamic value) { - upgradeDto(value, "SetMaintenanceModeDto"); - if (value is Map) { - final json = value.cast(); - - return SetMaintenanceModeDto( - action: MaintenanceAction.fromJson(json[r'action'])!, - restoreBackupFilename: json.containsKey(r'restoreBackupFilename') ? Optional.present(mapValueOfType(json, r'restoreBackupFilename')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SetMaintenanceModeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SetMaintenanceModeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SetMaintenanceModeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SetMaintenanceModeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_create_dto.dart b/mobile/openapi/lib/model/shared_link_create_dto.dart deleted file mode 100644 index f6c7b66181..0000000000 --- a/mobile/openapi/lib/model/shared_link_create_dto.dart +++ /dev/null @@ -1,214 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinkCreateDto { - /// Returns a new [SharedLinkCreateDto] instance. - SharedLinkCreateDto({ - this.albumId = const Optional.absent(), - this.allowDownload = const Optional.present(true), - this.allowUpload = const Optional.absent(), - this.assetIds = const Optional.present(const []), - this.description = const Optional.absent(), - this.expiresAt = const Optional.absent(), - this.password = const Optional.absent(), - this.showMetadata = const Optional.present(true), - this.slug = const Optional.absent(), - required this.type, - }); - - /// Album ID (for album sharing) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumId; - - /// Allow downloads - Optional allowDownload; - - /// Allow uploads - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional allowUpload; - - /// Asset IDs (for individual assets) - Optional?> assetIds; - - /// Link description - Optional description; - - /// Expiration date - Optional expiresAt; - - /// Link password - Optional password; - - /// Show metadata - Optional showMetadata; - - /// Custom URL slug - Optional slug; - - SharedLinkType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkCreateDto && - other.albumId == albumId && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - _deepEquality.equals(other.assetIds, assetIds) && - other.description == description && - other.expiresAt == expiresAt && - other.password == password && - other.showMetadata == showMetadata && - other.slug == slug && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId == null ? 0 : albumId!.hashCode) + - (allowDownload.hashCode) + - (allowUpload == null ? 0 : allowUpload!.hashCode) + - (assetIds.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (showMetadata.hashCode) + - (slug == null ? 0 : slug!.hashCode) + - (type.hashCode); - - @override - String toString() => 'SharedLinkCreateDto[albumId=$albumId, allowDownload=$allowDownload, allowUpload=$allowUpload, assetIds=$assetIds, description=$description, expiresAt=$expiresAt, password=$password, showMetadata=$showMetadata, slug=$slug, type=$type]'; - - Map toJson() { - final json = {}; - if (this.albumId.isPresent) { - final value = this.albumId.value; - json[r'albumId'] = value; - } - if (this.allowDownload.isPresent) { - final value = this.allowDownload.value; - json[r'allowDownload'] = value; - } - if (this.allowUpload.isPresent) { - final value = this.allowUpload.value; - json[r'allowUpload'] = value; - } - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.showMetadata.isPresent) { - final value = this.showMetadata.value; - json[r'showMetadata'] = value; - } - if (this.slug.isPresent) { - final value = this.slug.value; - json[r'slug'] = value; - } - json[r'type'] = this.type; - return json; - } - - /// Returns a new [SharedLinkCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkCreateDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkCreateDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkCreateDto( - albumId: json.containsKey(r'albumId') ? Optional.present(mapValueOfType(json, r'albumId')) : const Optional.absent(), - allowDownload: json.containsKey(r'allowDownload') ? Optional.present(mapValueOfType(json, r'allowDownload')) : const Optional.absent(), - allowUpload: json.containsKey(r'allowUpload') ? Optional.present(mapValueOfType(json, r'allowUpload')) : const Optional.absent(), - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapDateTime(json, r'expiresAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - showMetadata: json.containsKey(r'showMetadata') ? Optional.present(mapValueOfType(json, r'showMetadata')) : const Optional.absent(), - slug: json.containsKey(r'slug') ? Optional.present(mapValueOfType(json, r'slug')) : const Optional.absent(), - type: SharedLinkType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_edit_dto.dart b/mobile/openapi/lib/model/shared_link_edit_dto.dart deleted file mode 100644 index 6cc0353370..0000000000 --- a/mobile/openapi/lib/model/shared_link_edit_dto.dart +++ /dev/null @@ -1,188 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinkEditDto { - /// Returns a new [SharedLinkEditDto] instance. - SharedLinkEditDto({ - this.allowDownload = const Optional.absent(), - this.allowUpload = const Optional.absent(), - this.description = const Optional.absent(), - this.expiresAt = const Optional.absent(), - this.password = const Optional.absent(), - this.showMetadata = const Optional.absent(), - this.slug = const Optional.absent(), - }); - - /// Allow downloads - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional allowDownload; - - /// Allow uploads - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional allowUpload; - - /// Link description - Optional description; - - /// Expiration date - Optional expiresAt; - - /// Link password - Optional password; - - /// Show metadata - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional showMetadata; - - /// Custom URL slug - Optional slug; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkEditDto && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - other.description == description && - other.expiresAt == expiresAt && - other.password == password && - other.showMetadata == showMetadata && - other.slug == slug; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (allowDownload == null ? 0 : allowDownload!.hashCode) + - (allowUpload == null ? 0 : allowUpload!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (showMetadata == null ? 0 : showMetadata!.hashCode) + - (slug == null ? 0 : slug!.hashCode); - - @override - String toString() => 'SharedLinkEditDto[allowDownload=$allowDownload, allowUpload=$allowUpload, description=$description, expiresAt=$expiresAt, password=$password, showMetadata=$showMetadata, slug=$slug]'; - - Map toJson() { - final json = {}; - if (this.allowDownload.isPresent) { - final value = this.allowDownload.value; - json[r'allowDownload'] = value; - } - if (this.allowUpload.isPresent) { - final value = this.allowUpload.value; - json[r'allowUpload'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.showMetadata.isPresent) { - final value = this.showMetadata.value; - json[r'showMetadata'] = value; - } - if (this.slug.isPresent) { - final value = this.slug.value; - json[r'slug'] = value; - } - return json; - } - - /// Returns a new [SharedLinkEditDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkEditDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkEditDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkEditDto( - allowDownload: json.containsKey(r'allowDownload') ? Optional.present(mapValueOfType(json, r'allowDownload')) : const Optional.absent(), - allowUpload: json.containsKey(r'allowUpload') ? Optional.present(mapValueOfType(json, r'allowUpload')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapDateTime(json, r'expiresAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - showMetadata: json.containsKey(r'showMetadata') ? Optional.present(mapValueOfType(json, r'showMetadata')) : const Optional.absent(), - slug: json.containsKey(r'slug') ? Optional.present(mapValueOfType(json, r'slug')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkEditDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkEditDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkEditDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkEditDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_login_dto.dart b/mobile/openapi/lib/model/shared_link_login_dto.dart deleted file mode 100644 index 1ab1bc9349..0000000000 --- a/mobile/openapi/lib/model/shared_link_login_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinkLoginDto { - /// Returns a new [SharedLinkLoginDto] instance. - SharedLinkLoginDto({ - required this.password, - }); - - /// Shared link password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkLoginDto && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (password.hashCode); - - @override - String toString() => 'SharedLinkLoginDto[password=$password]'; - - Map toJson() { - final json = {}; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [SharedLinkLoginDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkLoginDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkLoginDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkLoginDto( - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkLoginDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkLoginDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkLoginDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkLoginDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_response_dto.dart b/mobile/openapi/lib/model/shared_link_response_dto.dart deleted file mode 100644 index 2c86b21515..0000000000 --- a/mobile/openapi/lib/model/shared_link_response_dto.dart +++ /dev/null @@ -1,242 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinkResponseDto { - /// Returns a new [SharedLinkResponseDto] instance. - SharedLinkResponseDto({ - this.album = const Optional.absent(), - required this.allowDownload, - required this.allowUpload, - this.assets = const [], - required this.createdAt, - required this.description, - required this.expiresAt, - required this.id, - required this.key, - required this.password, - required this.showMetadata, - required this.slug, - required this.type, - required this.userId, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional album; - - /// Allow downloads - bool allowDownload; - - /// Allow uploads - bool allowUpload; - - List assets; - - /// Creation date - DateTime createdAt; - - /// Link description - String? description; - - /// Expiration date - DateTime? expiresAt; - - /// Shared link ID - String id; - - /// Encryption key (base64url) - String key; - - /// Has password - String? password; - - /// Show metadata - bool showMetadata; - - /// Custom URL slug - String? slug; - - SharedLinkType type; - - /// Owner user ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkResponseDto && - other.album == album && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - _deepEquality.equals(other.assets, assets) && - other.createdAt == createdAt && - other.description == description && - other.expiresAt == expiresAt && - other.id == id && - other.key == key && - other.password == password && - other.showMetadata == showMetadata && - other.slug == slug && - other.type == type && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (album == null ? 0 : album!.hashCode) + - (allowDownload.hashCode) + - (allowUpload.hashCode) + - (assets.hashCode) + - (createdAt.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (key.hashCode) + - (password == null ? 0 : password!.hashCode) + - (showMetadata.hashCode) + - (slug == null ? 0 : slug!.hashCode) + - (type.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SharedLinkResponseDto[album=$album, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, password=$password, showMetadata=$showMetadata, slug=$slug, type=$type, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.album.isPresent) { - final value = this.album.value; - json[r'album'] = value; - } - json[r'allowDownload'] = this.allowDownload; - json[r'allowUpload'] = this.allowUpload; - json[r'assets'] = this.assets; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - if (this.expiresAt != null) { - json[r'expiresAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.expiresAt!.millisecondsSinceEpoch - : this.expiresAt!.toUtc().toIso8601String(); - } else { - json[r'expiresAt'] = null; - } - json[r'id'] = this.id; - json[r'key'] = this.key; - if (this.password != null) { - json[r'password'] = this.password; - } else { - json[r'password'] = null; - } - json[r'showMetadata'] = this.showMetadata; - if (this.slug != null) { - json[r'slug'] = this.slug; - } else { - json[r'slug'] = null; - } - json[r'type'] = this.type; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SharedLinkResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkResponseDto( - album: json.containsKey(r'album') ? Optional.present(AlbumResponseDto.fromJson(json[r'album'])) : const Optional.absent(), - allowDownload: mapValueOfType(json, r'allowDownload')!, - allowUpload: mapValueOfType(json, r'allowUpload')!, - assets: AssetResponseDto.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - description: mapValueOfType(json, r'description'), - expiresAt: mapDateTime(json, r'expiresAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - id: mapValueOfType(json, r'id')!, - key: mapValueOfType(json, r'key')!, - password: mapValueOfType(json, r'password'), - showMetadata: mapValueOfType(json, r'showMetadata')!, - slug: mapValueOfType(json, r'slug'), - type: SharedLinkType.fromJson(json[r'type'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'allowDownload', - 'allowUpload', - 'assets', - 'createdAt', - 'description', - 'expiresAt', - 'id', - 'key', - 'password', - 'showMetadata', - 'slug', - 'type', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_type.dart b/mobile/openapi/lib/model/shared_link_type.dart deleted file mode 100644 index ed459cbcce..0000000000 --- a/mobile/openapi/lib/model/shared_link_type.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Shared link type -enum SharedLinkType { - ALBUM._(r'ALBUM'), - INDIVIDUAL._(r'INDIVIDUAL'), - ; - - /// Instantiate a new enum with the provided value. - const SharedLinkType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SharedLinkType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SharedLinkType? fromJson(dynamic value) => SharedLinkTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SharedLinkType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SharedLinkType] to String, -/// and [decode] dynamic data back to [SharedLinkType]. -class SharedLinkTypeTypeTransformer { - factory SharedLinkTypeTypeTransformer() => _instance ??= const SharedLinkTypeTypeTransformer._(); - - const SharedLinkTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SharedLinkType data) => data._value; - - /// Returns the instance of [SharedLinkType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SharedLinkType? decode(dynamic data, {bool allowNull = true}) { - if (data is SharedLinkType) { - return data; - } - if (data != null) { - switch (data) { - case r'ALBUM': return SharedLinkType.ALBUM; - case r'INDIVIDUAL': return SharedLinkType.INDIVIDUAL; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SharedLinkTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/shared_links_response.dart b/mobile/openapi/lib/model/shared_links_response.dart deleted file mode 100644 index 2b32a57540..0000000000 --- a/mobile/openapi/lib/model/shared_links_response.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinksResponse { - /// Returns a new [SharedLinksResponse] instance. - SharedLinksResponse({ - required this.enabled, - required this.sidebarWeb, - }); - - /// Whether shared links are enabled - bool enabled; - - /// Whether shared links appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinksResponse && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'SharedLinksResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [SharedLinksResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinksResponse? fromJson(dynamic value) { - upgradeDto(value, "SharedLinksResponse"); - if (value is Map) { - final json = value.cast(); - - return SharedLinksResponse( - enabled: mapValueOfType(json, r'enabled')!, - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinksResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinksResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinksResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinksResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/shared_links_update.dart b/mobile/openapi/lib/model/shared_links_update.dart deleted file mode 100644 index 7c5761e343..0000000000 --- a/mobile/openapi/lib/model/shared_links_update.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinksUpdate { - /// Returns a new [SharedLinksUpdate] instance. - SharedLinksUpdate({ - this.enabled = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether shared links are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Whether shared links appear in web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinksUpdate && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'SharedLinksUpdate[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [SharedLinksUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinksUpdate? fromJson(dynamic value) { - upgradeDto(value, "SharedLinksUpdate"); - if (value is Map) { - final json = value.cast(); - - return SharedLinksUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinksUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinksUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinksUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinksUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/sign_up_dto.dart b/mobile/openapi/lib/model/sign_up_dto.dart deleted file mode 100644 index 54c8fa07d2..0000000000 --- a/mobile/openapi/lib/model/sign_up_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SignUpDto { - /// Returns a new [SignUpDto] instance. - SignUpDto({ - required this.email, - required this.name, - required this.password, - }); - - /// User email - String email; - - /// User name - String name; - - /// User password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is SignUpDto && - other.email == email && - other.name == name && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (email.hashCode) + - (name.hashCode) + - (password.hashCode); - - @override - String toString() => 'SignUpDto[email=$email, name=$name, password=$password]'; - - Map toJson() { - final json = {}; - json[r'email'] = this.email; - json[r'name'] = this.name; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [SignUpDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SignUpDto? fromJson(dynamic value) { - upgradeDto(value, "SignUpDto"); - if (value is Map) { - final json = value.cast(); - - return SignUpDto( - email: mapValueOfType(json, r'email')!, - name: mapValueOfType(json, r'name')!, - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SignUpDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SignUpDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SignUpDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SignUpDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - 'name', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/smart_search_dto.dart b/mobile/openapi/lib/model/smart_search_dto.dart deleted file mode 100644 index 70c9a9354e..0000000000 --- a/mobile/openapi/lib/model/smart_search_dto.dart +++ /dev/null @@ -1,632 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SmartSearchDto { - /// Returns a new [SmartSearchDto] instance. - SmartSearchDto({ - this.albumIds = const Optional.present(const []), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.language = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.page = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.query = const Optional.absent(), - this.queryAssetId = const Optional.absent(), - this.rating = const Optional.absent(), - this.size = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - this.withDeleted = const Optional.absent(), - this.withExif = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdBefore; - - /// Filter by encoded status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isOffline; - - /// Search language code - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional language; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ocr; - - /// Page number - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional page; - - /// Filter by person IDs - Optional?> personIds; - - /// Natural language search query - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional query; - - /// Asset ID to use as search reference - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional queryAssetId; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Number of results to return - /// - /// Minimum value: 1 - /// Maximum value: 1000 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional size; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenBefore; - - /// Filter by trash date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// Filter by update date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - /// Include deleted assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withDeleted; - - /// Include EXIF data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withExif; - - @override - bool operator ==(Object other) => identical(this, other) || other is SmartSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.language == language && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - other.page == page && - _deepEquality.equals(other.personIds, personIds) && - other.query == query && - other.queryAssetId == queryAssetId && - other.rating == rating && - other.size == size && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility && - other.withDeleted == withDeleted && - other.withExif == withExif; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (language == null ? 0 : language!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (page == null ? 0 : page!.hashCode) + - (personIds.hashCode) + - (query == null ? 0 : query!.hashCode) + - (queryAssetId == null ? 0 : queryAssetId!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (size == null ? 0 : size!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode) + - (withDeleted == null ? 0 : withDeleted!.hashCode) + - (withExif == null ? 0 : withExif!.hashCode); - - @override - String toString() => 'SmartSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, language=$language, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, page=$page, personIds=$personIds, query=$query, queryAssetId=$queryAssetId, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.language.isPresent) { - final value = this.language.value; - json[r'language'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.page.isPresent) { - final value = this.page.value; - json[r'page'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.query.isPresent) { - final value = this.query.value; - json[r'query'] = value; - } - if (this.queryAssetId.isPresent) { - final value = this.queryAssetId.value; - json[r'queryAssetId'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.size.isPresent) { - final value = this.size.value; - json[r'size'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - if (this.withDeleted.isPresent) { - final value = this.withDeleted.value; - json[r'withDeleted'] = value; - } - if (this.withExif.isPresent) { - final value = this.withExif.value; - json[r'withExif'] = value; - } - return json; - } - - /// Returns a new [SmartSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SmartSearchDto? fromJson(dynamic value) { - upgradeDto(value, "SmartSearchDto"); - if (value is Map) { - final json = value.cast(); - - return SmartSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - language: json.containsKey(r'language') ? Optional.present(mapValueOfType(json, r'language')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - page: json.containsKey(r'page') ? Optional.present(json[r'page'] == null ? null : int.parse('${json[r'page']}')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - query: json.containsKey(r'query') ? Optional.present(mapValueOfType(json, r'query')) : const Optional.absent(), - queryAssetId: json.containsKey(r'queryAssetId') ? Optional.present(mapValueOfType(json, r'queryAssetId')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - size: json.containsKey(r'size') ? Optional.present(json[r'size'] == null ? null : int.parse('${json[r'size']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - withDeleted: json.containsKey(r'withDeleted') ? Optional.present(mapValueOfType(json, r'withDeleted')) : const Optional.absent(), - withExif: json.containsKey(r'withExif') ? Optional.present(mapValueOfType(json, r'withExif')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SmartSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SmartSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SmartSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SmartSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/source_type.dart b/mobile/openapi/lib/model/source_type.dart deleted file mode 100644 index 53fb1cb53d..0000000000 --- a/mobile/openapi/lib/model/source_type.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Face detection source type -enum SourceType { - machineLearning._(r'machine-learning'), - exif._(r'exif'), - manual._(r'manual'), - ; - - /// Instantiate a new enum with the provided value. - const SourceType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SourceType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SourceType? fromJson(dynamic value) => SourceTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SourceType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SourceType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SourceType] to String, -/// and [decode] dynamic data back to [SourceType]. -class SourceTypeTypeTransformer { - factory SourceTypeTypeTransformer() => _instance ??= const SourceTypeTypeTransformer._(); - - const SourceTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SourceType data) => data._value; - - /// Returns the instance of [SourceType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SourceType? decode(dynamic data, {bool allowNull = true}) { - if (data is SourceType) { - return data; - } - if (data != null) { - switch (data) { - case r'machine-learning': return SourceType.machineLearning; - case r'exif': return SourceType.exif; - case r'manual': return SourceType.manual; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SourceTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/stack_create_dto.dart b/mobile/openapi/lib/model/stack_create_dto.dart deleted file mode 100644 index 6b08c83401..0000000000 --- a/mobile/openapi/lib/model/stack_create_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class StackCreateDto { - /// Returns a new [StackCreateDto] instance. - StackCreateDto({ - this.assetIds = const [], - }); - - /// Asset IDs (first becomes primary, min 2) - List assetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is StackCreateDto && - _deepEquality.equals(other.assetIds, assetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode); - - @override - String toString() => 'StackCreateDto[assetIds=$assetIds]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - return json; - } - - /// Returns a new [StackCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StackCreateDto? fromJson(dynamic value) { - upgradeDto(value, "StackCreateDto"); - if (value is Map) { - final json = value.cast(); - - return StackCreateDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StackCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StackCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StackCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StackCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/stack_response_dto.dart b/mobile/openapi/lib/model/stack_response_dto.dart deleted file mode 100644 index 326f83a03d..0000000000 --- a/mobile/openapi/lib/model/stack_response_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class StackResponseDto { - /// Returns a new [StackResponseDto] instance. - StackResponseDto({ - this.assets = const [], - required this.id, - required this.primaryAssetId, - }); - - List assets; - - /// Stack ID - String id; - - /// Primary asset ID - String primaryAssetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is StackResponseDto && - _deepEquality.equals(other.assets, assets) && - other.id == id && - other.primaryAssetId == primaryAssetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (id.hashCode) + - (primaryAssetId.hashCode); - - @override - String toString() => 'StackResponseDto[assets=$assets, id=$id, primaryAssetId=$primaryAssetId]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'id'] = this.id; - json[r'primaryAssetId'] = this.primaryAssetId; - return json; - } - - /// Returns a new [StackResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StackResponseDto? fromJson(dynamic value) { - upgradeDto(value, "StackResponseDto"); - if (value is Map) { - final json = value.cast(); - - return StackResponseDto( - assets: AssetResponseDto.listFromJson(json[r'assets']), - id: mapValueOfType(json, r'id')!, - primaryAssetId: mapValueOfType(json, r'primaryAssetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StackResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StackResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StackResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StackResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'id', - 'primaryAssetId', - }; -} - diff --git a/mobile/openapi/lib/model/stack_update_dto.dart b/mobile/openapi/lib/model/stack_update_dto.dart deleted file mode 100644 index 98787f3a43..0000000000 --- a/mobile/openapi/lib/model/stack_update_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class StackUpdateDto { - /// Returns a new [StackUpdateDto] instance. - StackUpdateDto({ - this.primaryAssetId = const Optional.absent(), - }); - - /// Primary asset ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional primaryAssetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is StackUpdateDto && - other.primaryAssetId == primaryAssetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (primaryAssetId == null ? 0 : primaryAssetId!.hashCode); - - @override - String toString() => 'StackUpdateDto[primaryAssetId=$primaryAssetId]'; - - Map toJson() { - final json = {}; - if (this.primaryAssetId.isPresent) { - final value = this.primaryAssetId.value; - json[r'primaryAssetId'] = value; - } - return json; - } - - /// Returns a new [StackUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StackUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "StackUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return StackUpdateDto( - primaryAssetId: json.containsKey(r'primaryAssetId') ? Optional.present(mapValueOfType(json, r'primaryAssetId')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StackUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StackUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StackUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StackUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/statistics_search_dto.dart b/mobile/openapi/lib/model/statistics_search_dto.dart deleted file mode 100644 index 37328cd7f4..0000000000 --- a/mobile/openapi/lib/model/statistics_search_dto.dart +++ /dev/null @@ -1,524 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class StatisticsSearchDto { - /// Returns a new [StatisticsSearchDto] instance. - StatisticsSearchDto({ - this.albumIds = const Optional.present(const []), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.description = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.rating = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdBefore; - - /// Filter by description text - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Filter by encoded status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isOffline; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ocr; - - /// Filter by person IDs - Optional?> personIds; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenBefore; - - /// Filter by trash date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// Filter by update date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is StatisticsSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.description == description && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - _deepEquality.equals(other.personIds, personIds) && - other.rating == rating && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (personIds.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode); - - @override - String toString() => 'StatisticsSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - return json; - } - - /// Returns a new [StatisticsSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StatisticsSearchDto? fromJson(dynamic value) { - upgradeDto(value, "StatisticsSearchDto"); - if (value is Map) { - final json = value.cast(); - - return StatisticsSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StatisticsSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StatisticsSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StatisticsSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StatisticsSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/storage_folder.dart b/mobile/openapi/lib/model/storage_folder.dart deleted file mode 100644 index 34f3fcf9bc..0000000000 --- a/mobile/openapi/lib/model/storage_folder.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Storage folder -enum StorageFolder { - encodedVideo._(r'encoded-video'), - library_._(r'library'), - upload._(r'upload'), - profile._(r'profile'), - thumbs._(r'thumbs'), - backups._(r'backups'), - ; - - /// Instantiate a new enum with the provided value. - const StorageFolder._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [StorageFolder] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static StorageFolder? fromJson(dynamic value) => StorageFolderTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [StorageFolder] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StorageFolder.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [StorageFolder] to String, -/// and [decode] dynamic data back to [StorageFolder]. -class StorageFolderTypeTransformer { - factory StorageFolderTypeTransformer() => _instance ??= const StorageFolderTypeTransformer._(); - - const StorageFolderTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(StorageFolder data) => data._value; - - /// Returns the instance of [StorageFolder] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - StorageFolder? decode(dynamic data, {bool allowNull = true}) { - if (data is StorageFolder) { - return data; - } - if (data != null) { - switch (data) { - case r'encoded-video': return StorageFolder.encodedVideo; - case r'library': return StorageFolder.library_; - case r'upload': return StorageFolder.upload; - case r'profile': return StorageFolder.profile; - case r'thumbs': return StorageFolder.thumbs; - case r'backups': return StorageFolder.backups; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static StorageFolderTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/sync_ack_delete_dto.dart b/mobile/openapi/lib/model/sync_ack_delete_dto.dart deleted file mode 100644 index 76e2b780a7..0000000000 --- a/mobile/openapi/lib/model/sync_ack_delete_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAckDeleteDto { - /// Returns a new [SyncAckDeleteDto] instance. - SyncAckDeleteDto({ - this.types = const Optional.present(const []), - }); - - /// Sync entity types to delete acks for - Optional?> types; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAckDeleteDto && - _deepEquality.equals(other.types, types); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (types.hashCode); - - @override - String toString() => 'SyncAckDeleteDto[types=$types]'; - - Map toJson() { - final json = {}; - if (this.types.isPresent) { - final value = this.types.value; - json[r'types'] = value; - } - return json; - } - - /// Returns a new [SyncAckDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAckDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "SyncAckDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return SyncAckDeleteDto( - types: json.containsKey(r'types') ? Optional.present(SyncEntityType.listFromJson(json[r'types'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAckDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAckDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAckDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAckDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/sync_ack_dto.dart b/mobile/openapi/lib/model/sync_ack_dto.dart deleted file mode 100644 index fa7e20a832..0000000000 --- a/mobile/openapi/lib/model/sync_ack_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAckDto { - /// Returns a new [SyncAckDto] instance. - SyncAckDto({ - required this.ack, - required this.type, - }); - - /// Acknowledgment ID - String ack; - - SyncEntityType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAckDto && - other.ack == ack && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ack.hashCode) + - (type.hashCode); - - @override - String toString() => 'SyncAckDto[ack=$ack, type=$type]'; - - Map toJson() { - final json = {}; - json[r'ack'] = this.ack; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [SyncAckDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAckDto? fromJson(dynamic value) { - upgradeDto(value, "SyncAckDto"); - if (value is Map) { - final json = value.cast(); - - return SyncAckDto( - ack: mapValueOfType(json, r'ack')!, - type: SyncEntityType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAckDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAckDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAckDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAckDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ack', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/sync_ack_set_dto.dart b/mobile/openapi/lib/model/sync_ack_set_dto.dart deleted file mode 100644 index 531a9dc763..0000000000 --- a/mobile/openapi/lib/model/sync_ack_set_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAckSetDto { - /// Returns a new [SyncAckSetDto] instance. - SyncAckSetDto({ - this.acks = const [], - }); - - /// Acknowledgment IDs (max 1000) - List acks; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAckSetDto && - _deepEquality.equals(other.acks, acks); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (acks.hashCode); - - @override - String toString() => 'SyncAckSetDto[acks=$acks]'; - - Map toJson() { - final json = {}; - json[r'acks'] = this.acks; - return json; - } - - /// Returns a new [SyncAckSetDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAckSetDto? fromJson(dynamic value) { - upgradeDto(value, "SyncAckSetDto"); - if (value is Map) { - final json = value.cast(); - - return SyncAckSetDto( - acks: json[r'acks'] is Iterable - ? (json[r'acks'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAckSetDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAckSetDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAckSetDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAckSetDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'acks', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_delete_v1.dart b/mobile/openapi/lib/model/sync_album_delete_v1.dart deleted file mode 100644 index a6fdf5c68c..0000000000 --- a/mobile/openapi/lib/model/sync_album_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumDeleteV1 { - /// Returns a new [SyncAlbumDeleteV1] instance. - SyncAlbumDeleteV1({ - required this.albumId, - }); - - /// Album ID - String albumId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumDeleteV1 && - other.albumId == albumId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode); - - @override - String toString() => 'SyncAlbumDeleteV1[albumId=$albumId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - return json; - } - - /// Returns a new [SyncAlbumDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumDeleteV1( - albumId: mapValueOfType(json, r'albumId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart b/mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart deleted file mode 100644 index 08952b90ed..0000000000 --- a/mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumToAssetDeleteV1 { - /// Returns a new [SyncAlbumToAssetDeleteV1] instance. - SyncAlbumToAssetDeleteV1({ - required this.albumId, - required this.assetId, - }); - - /// Album ID - String albumId; - - /// Asset ID - String assetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumToAssetDeleteV1 && - other.albumId == albumId && - other.assetId == assetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (assetId.hashCode); - - @override - String toString() => 'SyncAlbumToAssetDeleteV1[albumId=$albumId, assetId=$assetId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'assetId'] = this.assetId; - return json; - } - - /// Returns a new [SyncAlbumToAssetDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumToAssetDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumToAssetDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumToAssetDeleteV1( - albumId: mapValueOfType(json, r'albumId')!, - assetId: mapValueOfType(json, r'assetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumToAssetDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumToAssetDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumToAssetDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumToAssetDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'assetId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_to_asset_v1.dart b/mobile/openapi/lib/model/sync_album_to_asset_v1.dart deleted file mode 100644 index 5f38b35088..0000000000 --- a/mobile/openapi/lib/model/sync_album_to_asset_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumToAssetV1 { - /// Returns a new [SyncAlbumToAssetV1] instance. - SyncAlbumToAssetV1({ - required this.albumId, - required this.assetId, - }); - - /// Album ID - String albumId; - - /// Asset ID - String assetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumToAssetV1 && - other.albumId == albumId && - other.assetId == assetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (assetId.hashCode); - - @override - String toString() => 'SyncAlbumToAssetV1[albumId=$albumId, assetId=$assetId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'assetId'] = this.assetId; - return json; - } - - /// Returns a new [SyncAlbumToAssetV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumToAssetV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumToAssetV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumToAssetV1( - albumId: mapValueOfType(json, r'albumId')!, - assetId: mapValueOfType(json, r'assetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumToAssetV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumToAssetV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumToAssetV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumToAssetV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'assetId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_user_delete_v1.dart b/mobile/openapi/lib/model/sync_album_user_delete_v1.dart deleted file mode 100644 index 526bcc6b6e..0000000000 --- a/mobile/openapi/lib/model/sync_album_user_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumUserDeleteV1 { - /// Returns a new [SyncAlbumUserDeleteV1] instance. - SyncAlbumUserDeleteV1({ - required this.albumId, - required this.userId, - }); - - /// Album ID - String albumId; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumUserDeleteV1 && - other.albumId == albumId && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SyncAlbumUserDeleteV1[albumId=$albumId, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncAlbumUserDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumUserDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumUserDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumUserDeleteV1( - albumId: mapValueOfType(json, r'albumId')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumUserDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumUserDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumUserDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumUserDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_user_v1.dart b/mobile/openapi/lib/model/sync_album_user_v1.dart deleted file mode 100644 index 1efe7da029..0000000000 --- a/mobile/openapi/lib/model/sync_album_user_v1.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumUserV1 { - /// Returns a new [SyncAlbumUserV1] instance. - SyncAlbumUserV1({ - required this.albumId, - required this.role, - required this.userId, - }); - - /// Album ID - String albumId; - - AlbumUserRole role; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumUserV1 && - other.albumId == albumId && - other.role == role && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (role.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SyncAlbumUserV1[albumId=$albumId, role=$role, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'role'] = this.role; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncAlbumUserV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumUserV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumUserV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumUserV1( - albumId: mapValueOfType(json, r'albumId')!, - role: AlbumUserRole.fromJson(json[r'role'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumUserV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumUserV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumUserV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumUserV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'role', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_v1.dart b/mobile/openapi/lib/model/sync_album_v1.dart deleted file mode 100644 index 677795fd58..0000000000 --- a/mobile/openapi/lib/model/sync_album_v1.dart +++ /dev/null @@ -1,179 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumV1 { - /// Returns a new [SyncAlbumV1] instance. - SyncAlbumV1({ - required this.createdAt, - required this.description, - required this.id, - required this.isActivityEnabled, - required this.name, - required this.order, - required this.ownerId, - required this.thumbnailAssetId, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Album description - String description; - - /// Album ID - String id; - - /// Is activity enabled - bool isActivityEnabled; - - /// Album name - String name; - - AssetOrder order; - - /// Owner ID - String ownerId; - - /// Thumbnail asset ID - String? thumbnailAssetId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumV1 && - other.createdAt == createdAt && - other.description == description && - other.id == id && - other.isActivityEnabled == isActivityEnabled && - other.name == name && - other.order == order && - other.ownerId == ownerId && - other.thumbnailAssetId == thumbnailAssetId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (description.hashCode) + - (id.hashCode) + - (isActivityEnabled.hashCode) + - (name.hashCode) + - (order.hashCode) + - (ownerId.hashCode) + - (thumbnailAssetId == null ? 0 : thumbnailAssetId!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncAlbumV1[createdAt=$createdAt, description=$description, id=$id, isActivityEnabled=$isActivityEnabled, name=$name, order=$order, ownerId=$ownerId, thumbnailAssetId=$thumbnailAssetId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'isActivityEnabled'] = this.isActivityEnabled; - json[r'name'] = this.name; - json[r'order'] = this.order; - json[r'ownerId'] = this.ownerId; - if (this.thumbnailAssetId != null) { - json[r'thumbnailAssetId'] = this.thumbnailAssetId; - } else { - json[r'thumbnailAssetId'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncAlbumV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumV1( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - isActivityEnabled: mapValueOfType(json, r'isActivityEnabled')!, - name: mapValueOfType(json, r'name')!, - order: AssetOrder.fromJson(json[r'order'])!, - ownerId: mapValueOfType(json, r'ownerId')!, - thumbnailAssetId: mapValueOfType(json, r'thumbnailAssetId'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'description', - 'id', - 'isActivityEnabled', - 'name', - 'order', - 'ownerId', - 'thumbnailAssetId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_v2.dart b/mobile/openapi/lib/model/sync_album_v2.dart deleted file mode 100644 index 701c0c94ec..0000000000 --- a/mobile/openapi/lib/model/sync_album_v2.dart +++ /dev/null @@ -1,170 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumV2 { - /// Returns a new [SyncAlbumV2] instance. - SyncAlbumV2({ - required this.createdAt, - required this.description, - required this.id, - required this.isActivityEnabled, - required this.name, - required this.order, - required this.thumbnailAssetId, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Album description - String description; - - /// Album ID - String id; - - /// Is activity enabled - bool isActivityEnabled; - - /// Album name - String name; - - AssetOrder order; - - /// Thumbnail asset ID - String? thumbnailAssetId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumV2 && - other.createdAt == createdAt && - other.description == description && - other.id == id && - other.isActivityEnabled == isActivityEnabled && - other.name == name && - other.order == order && - other.thumbnailAssetId == thumbnailAssetId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (description.hashCode) + - (id.hashCode) + - (isActivityEnabled.hashCode) + - (name.hashCode) + - (order.hashCode) + - (thumbnailAssetId == null ? 0 : thumbnailAssetId!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncAlbumV2[createdAt=$createdAt, description=$description, id=$id, isActivityEnabled=$isActivityEnabled, name=$name, order=$order, thumbnailAssetId=$thumbnailAssetId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'isActivityEnabled'] = this.isActivityEnabled; - json[r'name'] = this.name; - json[r'order'] = this.order; - if (this.thumbnailAssetId != null) { - json[r'thumbnailAssetId'] = this.thumbnailAssetId; - } else { - json[r'thumbnailAssetId'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncAlbumV2] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumV2? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumV2"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumV2( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - isActivityEnabled: mapValueOfType(json, r'isActivityEnabled')!, - name: mapValueOfType(json, r'name')!, - order: AssetOrder.fromJson(json[r'order'])!, - thumbnailAssetId: mapValueOfType(json, r'thumbnailAssetId'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumV2.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumV2.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumV2-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumV2.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'description', - 'id', - 'isActivityEnabled', - 'name', - 'order', - 'thumbnailAssetId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_delete_v1.dart deleted file mode 100644 index 1d5a947774..0000000000 --- a/mobile/openapi/lib/model/sync_asset_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetDeleteV1 { - /// Returns a new [SyncAssetDeleteV1] instance. - SyncAssetDeleteV1({ - required this.assetId, - }); - - /// Asset ID - String assetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetDeleteV1 && - other.assetId == assetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode); - - @override - String toString() => 'SyncAssetDeleteV1[assetId=$assetId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - return json; - } - - /// Returns a new [SyncAssetDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart deleted file mode 100644 index e0c98bfef3..0000000000 --- a/mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetEditDeleteV1 { - /// Returns a new [SyncAssetEditDeleteV1] instance. - SyncAssetEditDeleteV1({ - required this.editId, - }); - - /// Edit ID - String editId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetEditDeleteV1 && - other.editId == editId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (editId.hashCode); - - @override - String toString() => 'SyncAssetEditDeleteV1[editId=$editId]'; - - Map toJson() { - final json = {}; - json[r'editId'] = this.editId; - return json; - } - - /// Returns a new [SyncAssetEditDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetEditDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetEditDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetEditDeleteV1( - editId: mapValueOfType(json, r'editId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetEditDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetEditDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetEditDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetEditDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'editId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_edit_v1.dart b/mobile/openapi/lib/model/sync_asset_edit_v1.dart deleted file mode 100644 index 8acfad5f6a..0000000000 --- a/mobile/openapi/lib/model/sync_asset_edit_v1.dart +++ /dev/null @@ -1,138 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetEditV1 { - /// Returns a new [SyncAssetEditV1] instance. - SyncAssetEditV1({ - required this.action, - required this.assetId, - required this.id, - this.parameters = const {}, - required this.sequence, - }); - - AssetEditAction action; - - /// Asset ID - String assetId; - - /// Edit ID - String id; - - /// Edit parameters - Map parameters; - - /// Edit sequence - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int sequence; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetEditV1 && - other.action == action && - other.assetId == assetId && - other.id == id && - _deepEquality.equals(other.parameters, parameters) && - other.sequence == sequence; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (assetId.hashCode) + - (id.hashCode) + - (parameters.hashCode) + - (sequence.hashCode); - - @override - String toString() => 'SyncAssetEditV1[action=$action, assetId=$assetId, id=$id, parameters=$parameters, sequence=$sequence]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'assetId'] = this.assetId; - json[r'id'] = this.id; - json[r'parameters'] = this.parameters; - json[r'sequence'] = this.sequence; - return json; - } - - /// Returns a new [SyncAssetEditV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetEditV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetEditV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetEditV1( - action: AssetEditAction.fromJson(json[r'action'])!, - assetId: mapValueOfType(json, r'assetId')!, - id: mapValueOfType(json, r'id')!, - parameters: mapCastOfType(json, r'parameters')!, - sequence: mapValueOfType(json, r'sequence')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetEditV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetEditV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetEditV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetEditV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'assetId', - 'id', - 'parameters', - 'sequence', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_exif_v1.dart b/mobile/openapi/lib/model/sync_asset_exif_v1.dart deleted file mode 100644 index f5bc4d021d..0000000000 --- a/mobile/openapi/lib/model/sync_asset_exif_v1.dart +++ /dev/null @@ -1,431 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetExifV1 { - /// Returns a new [SyncAssetExifV1] instance. - SyncAssetExifV1({ - required this.assetId, - required this.city, - required this.country, - required this.dateTimeOriginal, - required this.description, - required this.exifImageHeight, - required this.exifImageWidth, - required this.exposureTime, - required this.fNumber, - required this.fileSizeInByte, - required this.focalLength, - required this.fps, - required this.iso, - required this.latitude, - required this.lensModel, - required this.longitude, - required this.make, - required this.model, - required this.modifyDate, - required this.orientation, - required this.profileDescription, - required this.projectionType, - required this.rating, - required this.state, - required this.timeZone, - }); - - /// Asset ID - String assetId; - - /// City - String? city; - - /// Country - String? country; - - /// Date time original - DateTime? dateTimeOriginal; - - /// Description - String? description; - - /// Exif image height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? exifImageHeight; - - /// Exif image width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? exifImageWidth; - - /// Exposure time - String? exposureTime; - - /// F number - double? fNumber; - - /// File size in byte - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? fileSizeInByte; - - /// Focal length - double? focalLength; - - /// FPS - double? fps; - - /// ISO - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? iso; - - /// Latitude - double? latitude; - - /// Lens model - String? lensModel; - - /// Longitude - double? longitude; - - /// Make - String? make; - - /// Model - String? model; - - /// Modify date - DateTime? modifyDate; - - /// Orientation - String? orientation; - - /// Profile description - String? profileDescription; - - /// Projection type - String? projectionType; - - /// Rating - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? rating; - - /// State - String? state; - - /// Time zone - String? timeZone; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetExifV1 && - other.assetId == assetId && - other.city == city && - other.country == country && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.exifImageHeight == exifImageHeight && - other.exifImageWidth == exifImageWidth && - other.exposureTime == exposureTime && - other.fNumber == fNumber && - other.fileSizeInByte == fileSizeInByte && - other.focalLength == focalLength && - other.fps == fps && - other.iso == iso && - other.latitude == latitude && - other.lensModel == lensModel && - other.longitude == longitude && - other.make == make && - other.model == model && - other.modifyDate == modifyDate && - other.orientation == orientation && - other.profileDescription == profileDescription && - other.projectionType == projectionType && - other.rating == rating && - other.state == state && - other.timeZone == timeZone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (exifImageHeight == null ? 0 : exifImageHeight!.hashCode) + - (exifImageWidth == null ? 0 : exifImageWidth!.hashCode) + - (exposureTime == null ? 0 : exposureTime!.hashCode) + - (fNumber == null ? 0 : fNumber!.hashCode) + - (fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) + - (focalLength == null ? 0 : focalLength!.hashCode) + - (fps == null ? 0 : fps!.hashCode) + - (iso == null ? 0 : iso!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (modifyDate == null ? 0 : modifyDate!.hashCode) + - (orientation == null ? 0 : orientation!.hashCode) + - (profileDescription == null ? 0 : profileDescription!.hashCode) + - (projectionType == null ? 0 : projectionType!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode); - - @override - String toString() => 'SyncAssetExifV1[assetId=$assetId, city=$city, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, fps=$fps, iso=$iso, latitude=$latitude, lensModel=$lensModel, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, profileDescription=$profileDescription, projectionType=$projectionType, rating=$rating, state=$state, timeZone=$timeZone]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - json[r'country'] = null; - } - if (this.dateTimeOriginal != null) { - json[r'dateTimeOriginal'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.dateTimeOriginal!.millisecondsSinceEpoch - : this.dateTimeOriginal!.toUtc().toIso8601String(); - } else { - json[r'dateTimeOriginal'] = null; - } - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - if (this.exifImageHeight != null) { - json[r'exifImageHeight'] = this.exifImageHeight; - } else { - json[r'exifImageHeight'] = null; - } - if (this.exifImageWidth != null) { - json[r'exifImageWidth'] = this.exifImageWidth; - } else { - json[r'exifImageWidth'] = null; - } - if (this.exposureTime != null) { - json[r'exposureTime'] = this.exposureTime; - } else { - json[r'exposureTime'] = null; - } - if (this.fNumber != null) { - json[r'fNumber'] = this.fNumber; - } else { - json[r'fNumber'] = null; - } - if (this.fileSizeInByte != null) { - json[r'fileSizeInByte'] = this.fileSizeInByte; - } else { - json[r'fileSizeInByte'] = null; - } - if (this.focalLength != null) { - json[r'focalLength'] = this.focalLength; - } else { - json[r'focalLength'] = null; - } - if (this.fps != null) { - json[r'fps'] = this.fps; - } else { - json[r'fps'] = null; - } - if (this.iso != null) { - json[r'iso'] = this.iso; - } else { - json[r'iso'] = null; - } - if (this.latitude != null) { - json[r'latitude'] = this.latitude; - } else { - json[r'latitude'] = null; - } - if (this.lensModel != null) { - json[r'lensModel'] = this.lensModel; - } else { - json[r'lensModel'] = null; - } - if (this.longitude != null) { - json[r'longitude'] = this.longitude; - } else { - json[r'longitude'] = null; - } - if (this.make != null) { - json[r'make'] = this.make; - } else { - json[r'make'] = null; - } - if (this.model != null) { - json[r'model'] = this.model; - } else { - json[r'model'] = null; - } - if (this.modifyDate != null) { - json[r'modifyDate'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.modifyDate!.millisecondsSinceEpoch - : this.modifyDate!.toUtc().toIso8601String(); - } else { - json[r'modifyDate'] = null; - } - if (this.orientation != null) { - json[r'orientation'] = this.orientation; - } else { - json[r'orientation'] = null; - } - if (this.profileDescription != null) { - json[r'profileDescription'] = this.profileDescription; - } else { - json[r'profileDescription'] = null; - } - if (this.projectionType != null) { - json[r'projectionType'] = this.projectionType; - } else { - json[r'projectionType'] = null; - } - if (this.rating != null) { - json[r'rating'] = this.rating; - } else { - json[r'rating'] = null; - } - if (this.state != null) { - json[r'state'] = this.state; - } else { - json[r'state'] = null; - } - if (this.timeZone != null) { - json[r'timeZone'] = this.timeZone; - } else { - json[r'timeZone'] = null; - } - return json; - } - - /// Returns a new [SyncAssetExifV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetExifV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetExifV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetExifV1( - assetId: mapValueOfType(json, r'assetId')!, - city: mapValueOfType(json, r'city'), - country: mapValueOfType(json, r'country'), - dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - description: mapValueOfType(json, r'description'), - exifImageHeight: mapValueOfType(json, r'exifImageHeight'), - exifImageWidth: mapValueOfType(json, r'exifImageWidth'), - exposureTime: mapValueOfType(json, r'exposureTime'), - fNumber: mapValueOfType(json, r'fNumber'), - fileSizeInByte: mapValueOfType(json, r'fileSizeInByte'), - focalLength: mapValueOfType(json, r'focalLength'), - fps: mapValueOfType(json, r'fps'), - iso: mapValueOfType(json, r'iso'), - latitude: mapValueOfType(json, r'latitude'), - lensModel: mapValueOfType(json, r'lensModel'), - longitude: mapValueOfType(json, r'longitude'), - make: mapValueOfType(json, r'make'), - model: mapValueOfType(json, r'model'), - modifyDate: mapDateTime(json, r'modifyDate', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - orientation: mapValueOfType(json, r'orientation'), - profileDescription: mapValueOfType(json, r'profileDescription'), - projectionType: mapValueOfType(json, r'projectionType'), - rating: mapValueOfType(json, r'rating'), - state: mapValueOfType(json, r'state'), - timeZone: mapValueOfType(json, r'timeZone'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetExifV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetExifV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetExifV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetExifV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'city', - 'country', - 'dateTimeOriginal', - 'description', - 'exifImageHeight', - 'exifImageWidth', - 'exposureTime', - 'fNumber', - 'fileSizeInByte', - 'focalLength', - 'fps', - 'iso', - 'latitude', - 'lensModel', - 'longitude', - 'make', - 'model', - 'modifyDate', - 'orientation', - 'profileDescription', - 'projectionType', - 'rating', - 'state', - 'timeZone', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_face_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_face_delete_v1.dart deleted file mode 100644 index 9cfb8814a7..0000000000 --- a/mobile/openapi/lib/model/sync_asset_face_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetFaceDeleteV1 { - /// Returns a new [SyncAssetFaceDeleteV1] instance. - SyncAssetFaceDeleteV1({ - required this.assetFaceId, - }); - - /// Asset face ID - String assetFaceId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetFaceDeleteV1 && - other.assetFaceId == assetFaceId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetFaceId.hashCode); - - @override - String toString() => 'SyncAssetFaceDeleteV1[assetFaceId=$assetFaceId]'; - - Map toJson() { - final json = {}; - json[r'assetFaceId'] = this.assetFaceId; - return json; - } - - /// Returns a new [SyncAssetFaceDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetFaceDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetFaceDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetFaceDeleteV1( - assetFaceId: mapValueOfType(json, r'assetFaceId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetFaceDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetFaceDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetFaceDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetFaceDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetFaceId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_face_v1.dart b/mobile/openapi/lib/model/sync_asset_face_v1.dart deleted file mode 100644 index 7ccc455f47..0000000000 --- a/mobile/openapi/lib/model/sync_asset_face_v1.dart +++ /dev/null @@ -1,203 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetFaceV1 { - /// Returns a new [SyncAssetFaceV1] instance. - SyncAssetFaceV1({ - required this.assetId, - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - required this.id, - required this.imageHeight, - required this.imageWidth, - required this.personId, - required this.sourceType, - }); - - /// Asset ID - String assetId; - - /// Bounding box X1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX1; - - /// Bounding box X2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX2; - - /// Bounding box Y1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY1; - - /// Bounding box Y2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY2; - - /// Asset face ID - String id; - - /// Image height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageWidth; - - /// Person ID - String? personId; - - /// Source type - String sourceType; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetFaceV1 && - other.assetId == assetId && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.id == id && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.personId == personId && - other.sourceType == sourceType; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (id.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (personId == null ? 0 : personId!.hashCode) + - (sourceType.hashCode); - - @override - String toString() => 'SyncAssetFaceV1[assetId=$assetId, boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, id=$id, imageHeight=$imageHeight, imageWidth=$imageWidth, personId=$personId, sourceType=$sourceType]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - json[r'id'] = this.id; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - if (this.personId != null) { - json[r'personId'] = this.personId; - } else { - json[r'personId'] = null; - } - json[r'sourceType'] = this.sourceType; - return json; - } - - /// Returns a new [SyncAssetFaceV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetFaceV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetFaceV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetFaceV1( - assetId: mapValueOfType(json, r'assetId')!, - boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, - boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, - boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, - boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, - id: mapValueOfType(json, r'id')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - personId: mapValueOfType(json, r'personId'), - sourceType: mapValueOfType(json, r'sourceType')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetFaceV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetFaceV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetFaceV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetFaceV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'id', - 'imageHeight', - 'imageWidth', - 'personId', - 'sourceType', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_face_v2.dart b/mobile/openapi/lib/model/sync_asset_face_v2.dart deleted file mode 100644 index 3b714b7632..0000000000 --- a/mobile/openapi/lib/model/sync_asset_face_v2.dart +++ /dev/null @@ -1,227 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetFaceV2 { - /// Returns a new [SyncAssetFaceV2] instance. - SyncAssetFaceV2({ - required this.assetId, - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - required this.deletedAt, - required this.id, - required this.imageHeight, - required this.imageWidth, - required this.isVisible, - required this.personId, - required this.sourceType, - }); - - /// Asset ID - String assetId; - - /// Bounding box X1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX1; - - /// Bounding box X2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX2; - - /// Bounding box Y1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY1; - - /// Bounding box Y2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY2; - - /// Face deleted at - DateTime? deletedAt; - - /// Asset face ID - String id; - - /// Image height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageWidth; - - /// Is the face visible in the asset - bool isVisible; - - /// Person ID - String? personId; - - /// Source type - String sourceType; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetFaceV2 && - other.assetId == assetId && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.deletedAt == deletedAt && - other.id == id && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.isVisible == isVisible && - other.personId == personId && - other.sourceType == sourceType; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (id.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (isVisible.hashCode) + - (personId == null ? 0 : personId!.hashCode) + - (sourceType.hashCode); - - @override - String toString() => 'SyncAssetFaceV2[assetId=$assetId, boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, deletedAt=$deletedAt, id=$id, imageHeight=$imageHeight, imageWidth=$imageWidth, isVisible=$isVisible, personId=$personId, sourceType=$sourceType]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'id'] = this.id; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - json[r'isVisible'] = this.isVisible; - if (this.personId != null) { - json[r'personId'] = this.personId; - } else { - json[r'personId'] = null; - } - json[r'sourceType'] = this.sourceType; - return json; - } - - /// Returns a new [SyncAssetFaceV2] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetFaceV2? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetFaceV2"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetFaceV2( - assetId: mapValueOfType(json, r'assetId')!, - boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, - boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, - boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, - boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - id: mapValueOfType(json, r'id')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - isVisible: mapValueOfType(json, r'isVisible')!, - personId: mapValueOfType(json, r'personId'), - sourceType: mapValueOfType(json, r'sourceType')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetFaceV2.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetFaceV2.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetFaceV2-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetFaceV2.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'deletedAt', - 'id', - 'imageHeight', - 'imageWidth', - 'isVisible', - 'personId', - 'sourceType', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart deleted file mode 100644 index 326555ef13..0000000000 --- a/mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetMetadataDeleteV1 { - /// Returns a new [SyncAssetMetadataDeleteV1] instance. - SyncAssetMetadataDeleteV1({ - required this.assetId, - required this.key, - }); - - /// Asset ID - String assetId; - - /// Key - String key; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetMetadataDeleteV1 && - other.assetId == assetId && - other.key == key; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode); - - @override - String toString() => 'SyncAssetMetadataDeleteV1[assetId=$assetId, key=$key]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - return json; - } - - /// Returns a new [SyncAssetMetadataDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetMetadataDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetMetadataDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetMetadataDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetMetadataDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetMetadataDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetMetadataDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetMetadataDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_metadata_v1.dart b/mobile/openapi/lib/model/sync_asset_metadata_v1.dart deleted file mode 100644 index 08d7eae49b..0000000000 --- a/mobile/openapi/lib/model/sync_asset_metadata_v1.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetMetadataV1 { - /// Returns a new [SyncAssetMetadataV1] instance. - SyncAssetMetadataV1({ - required this.assetId, - required this.key, - this.value = const {}, - }); - - /// Asset ID - String assetId; - - /// Key - String key; - - /// Value - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetMetadataV1 && - other.assetId == assetId && - other.key == key && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode) + - (value.hashCode); - - @override - String toString() => 'SyncAssetMetadataV1[assetId=$assetId, key=$key, value=$value]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SyncAssetMetadataV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetMetadataV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetMetadataV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetMetadataV1( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetMetadataV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetMetadataV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetMetadataV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetMetadataV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart deleted file mode 100644 index 018c134644..0000000000 --- a/mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetOcrDeleteV1 { - /// Returns a new [SyncAssetOcrDeleteV1] instance. - SyncAssetOcrDeleteV1({ - required this.assetId, - required this.deletedAt, - required this.id, - }); - - /// Original asset ID of the deleted OCR entry - String assetId; - - /// Timestamp when the OCR entry was deleted - DateTime deletedAt; - - /// Audit row ID of the deleted OCR entry - String id; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetOcrDeleteV1 && - other.assetId == assetId && - other.deletedAt == deletedAt && - other.id == id; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (deletedAt.hashCode) + - (id.hashCode); - - @override - String toString() => 'SyncAssetOcrDeleteV1[assetId=$assetId, deletedAt=$deletedAt, id=$id]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt.millisecondsSinceEpoch - : this.deletedAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - return json; - } - - /// Returns a new [SyncAssetOcrDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetOcrDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetOcrDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetOcrDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetOcrDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetOcrDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetOcrDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetOcrDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'deletedAt', - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_ocr_v1.dart b/mobile/openapi/lib/model/sync_asset_ocr_v1.dart deleted file mode 100644 index 616583189a..0000000000 --- a/mobile/openapi/lib/model/sync_asset_ocr_v1.dart +++ /dev/null @@ -1,217 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetOcrV1 { - /// Returns a new [SyncAssetOcrV1] instance. - SyncAssetOcrV1({ - required this.assetId, - required this.boxScore, - required this.id, - required this.isVisible, - required this.text, - required this.textScore, - required this.x1, - required this.x2, - required this.x3, - required this.x4, - required this.y1, - required this.y2, - required this.y3, - required this.y4, - }); - - /// Asset ID - String assetId; - - /// Confidence score of the bounding box - double boxScore; - - /// OCR entry ID - String id; - - /// Whether the OCR entry is visible - bool isVisible; - - /// Recognized text content - String text; - - /// Confidence score of the recognized text - double textScore; - - /// Top-left X coordinate (normalized 0–1) - double x1; - - /// Top-right X coordinate (normalized 0–1) - double x2; - - /// Bottom-right X coordinate (normalized 0–1) - double x3; - - /// Bottom-left X coordinate (normalized 0–1) - double x4; - - /// Top-left Y coordinate (normalized 0–1) - double y1; - - /// Top-right Y coordinate (normalized 0–1) - double y2; - - /// Bottom-right Y coordinate (normalized 0–1) - double y3; - - /// Bottom-left Y coordinate (normalized 0–1) - double y4; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetOcrV1 && - other.assetId == assetId && - other.boxScore == boxScore && - other.id == id && - other.isVisible == isVisible && - other.text == text && - other.textScore == textScore && - other.x1 == x1 && - other.x2 == x2 && - other.x3 == x3 && - other.x4 == x4 && - other.y1 == y1 && - other.y2 == y2 && - other.y3 == y3 && - other.y4 == y4; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boxScore.hashCode) + - (id.hashCode) + - (isVisible.hashCode) + - (text.hashCode) + - (textScore.hashCode) + - (x1.hashCode) + - (x2.hashCode) + - (x3.hashCode) + - (x4.hashCode) + - (y1.hashCode) + - (y2.hashCode) + - (y3.hashCode) + - (y4.hashCode); - - @override - String toString() => 'SyncAssetOcrV1[assetId=$assetId, boxScore=$boxScore, id=$id, isVisible=$isVisible, text=$text, textScore=$textScore, x1=$x1, x2=$x2, x3=$x3, x4=$x4, y1=$y1, y2=$y2, y3=$y3, y4=$y4]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boxScore'] = this.boxScore; - json[r'id'] = this.id; - json[r'isVisible'] = this.isVisible; - json[r'text'] = this.text; - json[r'textScore'] = this.textScore; - json[r'x1'] = this.x1; - json[r'x2'] = this.x2; - json[r'x3'] = this.x3; - json[r'x4'] = this.x4; - json[r'y1'] = this.y1; - json[r'y2'] = this.y2; - json[r'y3'] = this.y3; - json[r'y4'] = this.y4; - return json; - } - - /// Returns a new [SyncAssetOcrV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetOcrV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetOcrV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetOcrV1( - assetId: mapValueOfType(json, r'assetId')!, - boxScore: mapValueOfType(json, r'boxScore')!, - id: mapValueOfType(json, r'id')!, - isVisible: mapValueOfType(json, r'isVisible')!, - text: mapValueOfType(json, r'text')!, - textScore: mapValueOfType(json, r'textScore')!, - x1: mapValueOfType(json, r'x1')!, - x2: mapValueOfType(json, r'x2')!, - x3: mapValueOfType(json, r'x3')!, - x4: mapValueOfType(json, r'x4')!, - y1: mapValueOfType(json, r'y1')!, - y2: mapValueOfType(json, r'y2')!, - y3: mapValueOfType(json, r'y3')!, - y4: mapValueOfType(json, r'y4')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetOcrV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetOcrV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetOcrV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetOcrV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boxScore', - 'id', - 'isVisible', - 'text', - 'textScore', - 'x1', - 'x2', - 'x3', - 'x4', - 'y1', - 'y2', - 'y3', - 'y4', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_v1.dart b/mobile/openapi/lib/model/sync_asset_v1.dart deleted file mode 100644 index 1bcfadd4e1..0000000000 --- a/mobile/openapi/lib/model/sync_asset_v1.dart +++ /dev/null @@ -1,333 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetV1 { - /// Returns a new [SyncAssetV1] instance. - SyncAssetV1({ - required this.checksum, - required this.createdAt, - required this.deletedAt, - required this.duration, - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.height, - required this.id, - required this.isEdited, - required this.isFavorite, - required this.libraryId, - required this.livePhotoVideoId, - required this.localDateTime, - required this.originalFileName, - required this.ownerId, - required this.stackId, - required this.thumbhash, - required this.type, - required this.visibility, - required this.width, - }); - - /// Checksum - String checksum; - - /// Uploaded to Immich at - DateTime? createdAt; - - /// Deleted at - DateTime? deletedAt; - - /// Duration - String? duration; - - /// File created at - DateTime? fileCreatedAt; - - /// File modified at - DateTime? fileModifiedAt; - - /// Asset height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? height; - - /// Asset ID - String id; - - /// Is edited - bool isEdited; - - /// Is favorite - bool isFavorite; - - /// Library ID - String? libraryId; - - /// Live photo video ID - String? livePhotoVideoId; - - /// Local date time - DateTime? localDateTime; - - /// Original file name - String originalFileName; - - /// Owner ID - String ownerId; - - /// Stack ID - String? stackId; - - /// Thumbhash - String? thumbhash; - - AssetTypeEnum type; - - AssetVisibility visibility; - - /// Asset width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? width; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetV1 && - other.checksum == checksum && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.duration == duration && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.height == height && - other.id == id && - other.isEdited == isEdited && - other.isFavorite == isFavorite && - other.libraryId == libraryId && - other.livePhotoVideoId == livePhotoVideoId && - other.localDateTime == localDateTime && - other.originalFileName == originalFileName && - other.ownerId == ownerId && - other.stackId == stackId && - other.thumbhash == thumbhash && - other.type == type && - other.visibility == visibility && - other.width == width; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (createdAt == null ? 0 : createdAt!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (fileCreatedAt == null ? 0 : fileCreatedAt!.hashCode) + - (fileModifiedAt == null ? 0 : fileModifiedAt!.hashCode) + - (height == null ? 0 : height!.hashCode) + - (id.hashCode) + - (isEdited.hashCode) + - (isFavorite.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (localDateTime == null ? 0 : localDateTime!.hashCode) + - (originalFileName.hashCode) + - (ownerId.hashCode) + - (stackId == null ? 0 : stackId!.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (visibility.hashCode) + - (width == null ? 0 : width!.hashCode); - - @override - String toString() => 'SyncAssetV1[checksum=$checksum, createdAt=$createdAt, deletedAt=$deletedAt, duration=$duration, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, height=$height, id=$id, isEdited=$isEdited, isFavorite=$isFavorite, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, ownerId=$ownerId, stackId=$stackId, thumbhash=$thumbhash, type=$type, visibility=$visibility, width=$width]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - if (this.createdAt != null) { - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt!.millisecondsSinceEpoch - : this.createdAt!.toUtc().toIso8601String(); - } else { - json[r'createdAt'] = null; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - json[r'duration'] = null; - } - if (this.fileCreatedAt != null) { - json[r'fileCreatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileCreatedAt!.millisecondsSinceEpoch - : this.fileCreatedAt!.toUtc().toIso8601String(); - } else { - json[r'fileCreatedAt'] = null; - } - if (this.fileModifiedAt != null) { - json[r'fileModifiedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileModifiedAt!.millisecondsSinceEpoch - : this.fileModifiedAt!.toUtc().toIso8601String(); - } else { - json[r'fileModifiedAt'] = null; - } - if (this.height != null) { - json[r'height'] = this.height; - } else { - json[r'height'] = null; - } - json[r'id'] = this.id; - json[r'isEdited'] = this.isEdited; - json[r'isFavorite'] = this.isFavorite; - if (this.libraryId != null) { - json[r'libraryId'] = this.libraryId; - } else { - json[r'libraryId'] = null; - } - if (this.livePhotoVideoId != null) { - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - } else { - json[r'livePhotoVideoId'] = null; - } - if (this.localDateTime != null) { - json[r'localDateTime'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.localDateTime!.millisecondsSinceEpoch - : this.localDateTime!.toUtc().toIso8601String(); - } else { - json[r'localDateTime'] = null; - } - json[r'originalFileName'] = this.originalFileName; - json[r'ownerId'] = this.ownerId; - if (this.stackId != null) { - json[r'stackId'] = this.stackId; - } else { - json[r'stackId'] = null; - } - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'visibility'] = this.visibility; - if (this.width != null) { - json[r'width'] = this.width; - } else { - json[r'width'] = null; - } - return json; - } - - /// Returns a new [SyncAssetV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetV1( - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - duration: mapValueOfType(json, r'duration'), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - height: mapValueOfType(json, r'height'), - id: mapValueOfType(json, r'id')!, - isEdited: mapValueOfType(json, r'isEdited')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - libraryId: mapValueOfType(json, r'libraryId'), - livePhotoVideoId: mapValueOfType(json, r'livePhotoVideoId'), - localDateTime: mapDateTime(json, r'localDateTime', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - originalFileName: mapValueOfType(json, r'originalFileName')!, - ownerId: mapValueOfType(json, r'ownerId')!, - stackId: mapValueOfType(json, r'stackId'), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetTypeEnum.fromJson(json[r'type'])!, - visibility: AssetVisibility.fromJson(json[r'visibility'])!, - width: mapValueOfType(json, r'width'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'deletedAt', - 'duration', - 'fileCreatedAt', - 'fileModifiedAt', - 'height', - 'id', - 'isEdited', - 'isFavorite', - 'libraryId', - 'livePhotoVideoId', - 'localDateTime', - 'originalFileName', - 'ownerId', - 'stackId', - 'thumbhash', - 'type', - 'visibility', - 'width', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_v2.dart b/mobile/openapi/lib/model/sync_asset_v2.dart deleted file mode 100644 index 37751f9f91..0000000000 --- a/mobile/openapi/lib/model/sync_asset_v2.dart +++ /dev/null @@ -1,336 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetV2 { - /// Returns a new [SyncAssetV2] instance. - SyncAssetV2({ - required this.checksum, - required this.createdAt, - required this.deletedAt, - required this.duration, - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.height, - required this.id, - required this.isEdited, - required this.isFavorite, - required this.libraryId, - required this.livePhotoVideoId, - required this.localDateTime, - required this.originalFileName, - required this.ownerId, - required this.stackId, - required this.thumbhash, - required this.type, - required this.visibility, - required this.width, - }); - - /// Checksum - String checksum; - - /// Uploaded to Immich at - DateTime? createdAt; - - /// Deleted at - DateTime? deletedAt; - - /// Duration - /// - /// Minimum value: 0 - /// Maximum value: 2147483647 - int? duration; - - /// File created at - DateTime? fileCreatedAt; - - /// File modified at - DateTime? fileModifiedAt; - - /// Asset height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? height; - - /// Asset ID - String id; - - /// Is edited - bool isEdited; - - /// Is favorite - bool isFavorite; - - /// Library ID - String? libraryId; - - /// Live photo video ID - String? livePhotoVideoId; - - /// Local date time - DateTime? localDateTime; - - /// Original file name - String originalFileName; - - /// Owner ID - String ownerId; - - /// Stack ID - String? stackId; - - /// Thumbhash - String? thumbhash; - - AssetTypeEnum type; - - AssetVisibility visibility; - - /// Asset width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? width; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetV2 && - other.checksum == checksum && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.duration == duration && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.height == height && - other.id == id && - other.isEdited == isEdited && - other.isFavorite == isFavorite && - other.libraryId == libraryId && - other.livePhotoVideoId == livePhotoVideoId && - other.localDateTime == localDateTime && - other.originalFileName == originalFileName && - other.ownerId == ownerId && - other.stackId == stackId && - other.thumbhash == thumbhash && - other.type == type && - other.visibility == visibility && - other.width == width; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (createdAt == null ? 0 : createdAt!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (fileCreatedAt == null ? 0 : fileCreatedAt!.hashCode) + - (fileModifiedAt == null ? 0 : fileModifiedAt!.hashCode) + - (height == null ? 0 : height!.hashCode) + - (id.hashCode) + - (isEdited.hashCode) + - (isFavorite.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (localDateTime == null ? 0 : localDateTime!.hashCode) + - (originalFileName.hashCode) + - (ownerId.hashCode) + - (stackId == null ? 0 : stackId!.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (visibility.hashCode) + - (width == null ? 0 : width!.hashCode); - - @override - String toString() => 'SyncAssetV2[checksum=$checksum, createdAt=$createdAt, deletedAt=$deletedAt, duration=$duration, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, height=$height, id=$id, isEdited=$isEdited, isFavorite=$isFavorite, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, ownerId=$ownerId, stackId=$stackId, thumbhash=$thumbhash, type=$type, visibility=$visibility, width=$width]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - if (this.createdAt != null) { - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt!.millisecondsSinceEpoch - : this.createdAt!.toUtc().toIso8601String(); - } else { - json[r'createdAt'] = null; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - json[r'duration'] = null; - } - if (this.fileCreatedAt != null) { - json[r'fileCreatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileCreatedAt!.millisecondsSinceEpoch - : this.fileCreatedAt!.toUtc().toIso8601String(); - } else { - json[r'fileCreatedAt'] = null; - } - if (this.fileModifiedAt != null) { - json[r'fileModifiedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileModifiedAt!.millisecondsSinceEpoch - : this.fileModifiedAt!.toUtc().toIso8601String(); - } else { - json[r'fileModifiedAt'] = null; - } - if (this.height != null) { - json[r'height'] = this.height; - } else { - json[r'height'] = null; - } - json[r'id'] = this.id; - json[r'isEdited'] = this.isEdited; - json[r'isFavorite'] = this.isFavorite; - if (this.libraryId != null) { - json[r'libraryId'] = this.libraryId; - } else { - json[r'libraryId'] = null; - } - if (this.livePhotoVideoId != null) { - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - } else { - json[r'livePhotoVideoId'] = null; - } - if (this.localDateTime != null) { - json[r'localDateTime'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.localDateTime!.millisecondsSinceEpoch - : this.localDateTime!.toUtc().toIso8601String(); - } else { - json[r'localDateTime'] = null; - } - json[r'originalFileName'] = this.originalFileName; - json[r'ownerId'] = this.ownerId; - if (this.stackId != null) { - json[r'stackId'] = this.stackId; - } else { - json[r'stackId'] = null; - } - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'visibility'] = this.visibility; - if (this.width != null) { - json[r'width'] = this.width; - } else { - json[r'width'] = null; - } - return json; - } - - /// Returns a new [SyncAssetV2] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetV2? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetV2"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetV2( - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - duration: mapValueOfType(json, r'duration'), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - height: mapValueOfType(json, r'height'), - id: mapValueOfType(json, r'id')!, - isEdited: mapValueOfType(json, r'isEdited')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - libraryId: mapValueOfType(json, r'libraryId'), - livePhotoVideoId: mapValueOfType(json, r'livePhotoVideoId'), - localDateTime: mapDateTime(json, r'localDateTime', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - originalFileName: mapValueOfType(json, r'originalFileName')!, - ownerId: mapValueOfType(json, r'ownerId')!, - stackId: mapValueOfType(json, r'stackId'), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetTypeEnum.fromJson(json[r'type'])!, - visibility: AssetVisibility.fromJson(json[r'visibility'])!, - width: mapValueOfType(json, r'width'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetV2.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetV2.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetV2-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetV2.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'deletedAt', - 'duration', - 'fileCreatedAt', - 'fileModifiedAt', - 'height', - 'id', - 'isEdited', - 'isFavorite', - 'libraryId', - 'livePhotoVideoId', - 'localDateTime', - 'originalFileName', - 'ownerId', - 'stackId', - 'thumbhash', - 'type', - 'visibility', - 'width', - }; -} - diff --git a/mobile/openapi/lib/model/sync_auth_user_v1.dart b/mobile/openapi/lib/model/sync_auth_user_v1.dart deleted file mode 100644 index 24e8bc897e..0000000000 --- a/mobile/openapi/lib/model/sync_auth_user_v1.dart +++ /dev/null @@ -1,235 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAuthUserV1 { - /// Returns a new [SyncAuthUserV1] instance. - SyncAuthUserV1({ - this.avatarColor = const Optional.absent(), - required this.deletedAt, - required this.email, - required this.hasProfileImage, - required this.id, - required this.isAdmin, - required this.name, - required this.oauthId, - required this.pinCode, - required this.profileChangedAt, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - required this.storageLabel, - }); - - Optional avatarColor; - - /// User deleted at - DateTime? deletedAt; - - /// User email - String email; - - /// User has profile image - bool hasProfileImage; - - /// User ID - String id; - - /// User is admin - bool isAdmin; - - /// User name - String name; - - /// User OAuth ID - String oauthId; - - /// User pin code - String? pinCode; - - /// User profile changed at - DateTime profileChangedAt; - - /// Quota size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? quotaSizeInBytes; - - /// Quota usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int quotaUsageInBytes; - - /// User storage label - String? storageLabel; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAuthUserV1 && - other.avatarColor == avatarColor && - other.deletedAt == deletedAt && - other.email == email && - other.hasProfileImage == hasProfileImage && - other.id == id && - other.isAdmin == isAdmin && - other.name == name && - other.oauthId == oauthId && - other.pinCode == pinCode && - other.profileChangedAt == profileChangedAt && - other.quotaSizeInBytes == quotaSizeInBytes && - other.quotaUsageInBytes == quotaUsageInBytes && - other.storageLabel == storageLabel; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (hasProfileImage.hashCode) + - (id.hashCode) + - (isAdmin.hashCode) + - (name.hashCode) + - (oauthId.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode) + - (profileChangedAt.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (quotaUsageInBytes.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode); - - @override - String toString() => 'SyncAuthUserV1[avatarColor=$avatarColor, deletedAt=$deletedAt, email=$email, hasProfileImage=$hasProfileImage, id=$id, isAdmin=$isAdmin, name=$name, oauthId=$oauthId, pinCode=$pinCode, profileChangedAt=$profileChangedAt, quotaSizeInBytes=$quotaSizeInBytes, quotaUsageInBytes=$quotaUsageInBytes, storageLabel=$storageLabel]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - json[r'hasProfileImage'] = this.hasProfileImage; - json[r'id'] = this.id; - json[r'isAdmin'] = this.isAdmin; - json[r'name'] = this.name; - json[r'oauthId'] = this.oauthId; - if (this.pinCode != null) { - json[r'pinCode'] = this.pinCode; - } else { - json[r'pinCode'] = null; - } - json[r'profileChangedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.profileChangedAt.millisecondsSinceEpoch - : this.profileChangedAt.toUtc().toIso8601String(); - if (this.quotaSizeInBytes != null) { - json[r'quotaSizeInBytes'] = this.quotaSizeInBytes; - } else { - json[r'quotaSizeInBytes'] = null; - } - json[r'quotaUsageInBytes'] = this.quotaUsageInBytes; - if (this.storageLabel != null) { - json[r'storageLabel'] = this.storageLabel; - } else { - json[r'storageLabel'] = null; - } - return json; - } - - /// Returns a new [SyncAuthUserV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAuthUserV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAuthUserV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAuthUserV1( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - email: mapValueOfType(json, r'email')!, - hasProfileImage: mapValueOfType(json, r'hasProfileImage')!, - id: mapValueOfType(json, r'id')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - name: mapValueOfType(json, r'name')!, - oauthId: mapValueOfType(json, r'oauthId')!, - pinCode: mapValueOfType(json, r'pinCode'), - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - quotaSizeInBytes: mapValueOfType(json, r'quotaSizeInBytes'), - quotaUsageInBytes: mapValueOfType(json, r'quotaUsageInBytes')!, - storageLabel: mapValueOfType(json, r'storageLabel'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAuthUserV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAuthUserV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAuthUserV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAuthUserV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'deletedAt', - 'email', - 'hasProfileImage', - 'id', - 'isAdmin', - 'name', - 'oauthId', - 'pinCode', - 'profileChangedAt', - 'quotaSizeInBytes', - 'quotaUsageInBytes', - 'storageLabel', - }; -} - diff --git a/mobile/openapi/lib/model/sync_entity_type.dart b/mobile/openapi/lib/model/sync_entity_type.dart deleted file mode 100644 index 7a6a518a9f..0000000000 --- a/mobile/openapi/lib/model/sync_entity_type.dart +++ /dev/null @@ -1,204 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Sync entity type -enum SyncEntityType { - authUserV1._(r'AuthUserV1'), - userV1._(r'UserV1'), - userDeleteV1._(r'UserDeleteV1'), - assetV1._(r'AssetV1'), - assetV2._(r'AssetV2'), - assetDeleteV1._(r'AssetDeleteV1'), - assetExifV1._(r'AssetExifV1'), - assetEditV1._(r'AssetEditV1'), - assetEditDeleteV1._(r'AssetEditDeleteV1'), - assetMetadataV1._(r'AssetMetadataV1'), - assetMetadataDeleteV1._(r'AssetMetadataDeleteV1'), - assetOcrV1._(r'AssetOcrV1'), - assetOcrDeleteV1._(r'AssetOcrDeleteV1'), - partnerV1._(r'PartnerV1'), - partnerDeleteV1._(r'PartnerDeleteV1'), - partnerAssetV1._(r'PartnerAssetV1'), - partnerAssetV2._(r'PartnerAssetV2'), - partnerAssetBackfillV1._(r'PartnerAssetBackfillV1'), - partnerAssetBackfillV2._(r'PartnerAssetBackfillV2'), - partnerAssetDeleteV1._(r'PartnerAssetDeleteV1'), - partnerAssetExifV1._(r'PartnerAssetExifV1'), - partnerAssetExifBackfillV1._(r'PartnerAssetExifBackfillV1'), - partnerStackBackfillV1._(r'PartnerStackBackfillV1'), - partnerStackDeleteV1._(r'PartnerStackDeleteV1'), - partnerStackV1._(r'PartnerStackV1'), - albumV1._(r'AlbumV1'), - albumV2._(r'AlbumV2'), - albumDeleteV1._(r'AlbumDeleteV1'), - albumUserV1._(r'AlbumUserV1'), - albumUserBackfillV1._(r'AlbumUserBackfillV1'), - albumUserDeleteV1._(r'AlbumUserDeleteV1'), - albumAssetCreateV1._(r'AlbumAssetCreateV1'), - albumAssetCreateV2._(r'AlbumAssetCreateV2'), - albumAssetUpdateV1._(r'AlbumAssetUpdateV1'), - albumAssetUpdateV2._(r'AlbumAssetUpdateV2'), - albumAssetBackfillV1._(r'AlbumAssetBackfillV1'), - albumAssetBackfillV2._(r'AlbumAssetBackfillV2'), - albumAssetExifCreateV1._(r'AlbumAssetExifCreateV1'), - albumAssetExifUpdateV1._(r'AlbumAssetExifUpdateV1'), - albumAssetExifBackfillV1._(r'AlbumAssetExifBackfillV1'), - albumToAssetV1._(r'AlbumToAssetV1'), - albumToAssetDeleteV1._(r'AlbumToAssetDeleteV1'), - albumToAssetBackfillV1._(r'AlbumToAssetBackfillV1'), - memoryV1._(r'MemoryV1'), - memoryDeleteV1._(r'MemoryDeleteV1'), - memoryToAssetV1._(r'MemoryToAssetV1'), - memoryToAssetDeleteV1._(r'MemoryToAssetDeleteV1'), - stackV1._(r'StackV1'), - stackDeleteV1._(r'StackDeleteV1'), - personV1._(r'PersonV1'), - personDeleteV1._(r'PersonDeleteV1'), - assetFaceV1._(r'AssetFaceV1'), - assetFaceV2._(r'AssetFaceV2'), - assetFaceDeleteV1._(r'AssetFaceDeleteV1'), - userMetadataV1._(r'UserMetadataV1'), - userMetadataDeleteV1._(r'UserMetadataDeleteV1'), - syncAckV1._(r'SyncAckV1'), - syncResetV1._(r'SyncResetV1'), - syncCompleteV1._(r'SyncCompleteV1'), - ; - - /// Instantiate a new enum with the provided value. - const SyncEntityType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SyncEntityType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SyncEntityType? fromJson(dynamic value) => SyncEntityTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SyncEntityType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncEntityType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SyncEntityType] to String, -/// and [decode] dynamic data back to [SyncEntityType]. -class SyncEntityTypeTypeTransformer { - factory SyncEntityTypeTypeTransformer() => _instance ??= const SyncEntityTypeTypeTransformer._(); - - const SyncEntityTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SyncEntityType data) => data._value; - - /// Returns the instance of [SyncEntityType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SyncEntityType? decode(dynamic data, {bool allowNull = true}) { - if (data is SyncEntityType) { - return data; - } - if (data != null) { - switch (data) { - case r'AuthUserV1': return SyncEntityType.authUserV1; - case r'UserV1': return SyncEntityType.userV1; - case r'UserDeleteV1': return SyncEntityType.userDeleteV1; - case r'AssetV1': return SyncEntityType.assetV1; - case r'AssetV2': return SyncEntityType.assetV2; - case r'AssetDeleteV1': return SyncEntityType.assetDeleteV1; - case r'AssetExifV1': return SyncEntityType.assetExifV1; - case r'AssetEditV1': return SyncEntityType.assetEditV1; - case r'AssetEditDeleteV1': return SyncEntityType.assetEditDeleteV1; - case r'AssetMetadataV1': return SyncEntityType.assetMetadataV1; - case r'AssetMetadataDeleteV1': return SyncEntityType.assetMetadataDeleteV1; - case r'AssetOcrV1': return SyncEntityType.assetOcrV1; - case r'AssetOcrDeleteV1': return SyncEntityType.assetOcrDeleteV1; - case r'PartnerV1': return SyncEntityType.partnerV1; - case r'PartnerDeleteV1': return SyncEntityType.partnerDeleteV1; - case r'PartnerAssetV1': return SyncEntityType.partnerAssetV1; - case r'PartnerAssetV2': return SyncEntityType.partnerAssetV2; - case r'PartnerAssetBackfillV1': return SyncEntityType.partnerAssetBackfillV1; - case r'PartnerAssetBackfillV2': return SyncEntityType.partnerAssetBackfillV2; - case r'PartnerAssetDeleteV1': return SyncEntityType.partnerAssetDeleteV1; - case r'PartnerAssetExifV1': return SyncEntityType.partnerAssetExifV1; - case r'PartnerAssetExifBackfillV1': return SyncEntityType.partnerAssetExifBackfillV1; - case r'PartnerStackBackfillV1': return SyncEntityType.partnerStackBackfillV1; - case r'PartnerStackDeleteV1': return SyncEntityType.partnerStackDeleteV1; - case r'PartnerStackV1': return SyncEntityType.partnerStackV1; - case r'AlbumV1': return SyncEntityType.albumV1; - case r'AlbumV2': return SyncEntityType.albumV2; - case r'AlbumDeleteV1': return SyncEntityType.albumDeleteV1; - case r'AlbumUserV1': return SyncEntityType.albumUserV1; - case r'AlbumUserBackfillV1': return SyncEntityType.albumUserBackfillV1; - case r'AlbumUserDeleteV1': return SyncEntityType.albumUserDeleteV1; - case r'AlbumAssetCreateV1': return SyncEntityType.albumAssetCreateV1; - case r'AlbumAssetCreateV2': return SyncEntityType.albumAssetCreateV2; - case r'AlbumAssetUpdateV1': return SyncEntityType.albumAssetUpdateV1; - case r'AlbumAssetUpdateV2': return SyncEntityType.albumAssetUpdateV2; - case r'AlbumAssetBackfillV1': return SyncEntityType.albumAssetBackfillV1; - case r'AlbumAssetBackfillV2': return SyncEntityType.albumAssetBackfillV2; - case r'AlbumAssetExifCreateV1': return SyncEntityType.albumAssetExifCreateV1; - case r'AlbumAssetExifUpdateV1': return SyncEntityType.albumAssetExifUpdateV1; - case r'AlbumAssetExifBackfillV1': return SyncEntityType.albumAssetExifBackfillV1; - case r'AlbumToAssetV1': return SyncEntityType.albumToAssetV1; - case r'AlbumToAssetDeleteV1': return SyncEntityType.albumToAssetDeleteV1; - case r'AlbumToAssetBackfillV1': return SyncEntityType.albumToAssetBackfillV1; - case r'MemoryV1': return SyncEntityType.memoryV1; - case r'MemoryDeleteV1': return SyncEntityType.memoryDeleteV1; - case r'MemoryToAssetV1': return SyncEntityType.memoryToAssetV1; - case r'MemoryToAssetDeleteV1': return SyncEntityType.memoryToAssetDeleteV1; - case r'StackV1': return SyncEntityType.stackV1; - case r'StackDeleteV1': return SyncEntityType.stackDeleteV1; - case r'PersonV1': return SyncEntityType.personV1; - case r'PersonDeleteV1': return SyncEntityType.personDeleteV1; - case r'AssetFaceV1': return SyncEntityType.assetFaceV1; - case r'AssetFaceV2': return SyncEntityType.assetFaceV2; - case r'AssetFaceDeleteV1': return SyncEntityType.assetFaceDeleteV1; - case r'UserMetadataV1': return SyncEntityType.userMetadataV1; - case r'UserMetadataDeleteV1': return SyncEntityType.userMetadataDeleteV1; - case r'SyncAckV1': return SyncEntityType.syncAckV1; - case r'SyncResetV1': return SyncEntityType.syncResetV1; - case r'SyncCompleteV1': return SyncEntityType.syncCompleteV1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SyncEntityTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart b/mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart deleted file mode 100644 index c37682d02d..0000000000 --- a/mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncMemoryAssetDeleteV1 { - /// Returns a new [SyncMemoryAssetDeleteV1] instance. - SyncMemoryAssetDeleteV1({ - required this.assetId, - required this.memoryId, - }); - - /// Asset ID - String assetId; - - /// Memory ID - String memoryId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryAssetDeleteV1 && - other.assetId == assetId && - other.memoryId == memoryId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (memoryId.hashCode); - - @override - String toString() => 'SyncMemoryAssetDeleteV1[assetId=$assetId, memoryId=$memoryId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'memoryId'] = this.memoryId; - return json; - } - - /// Returns a new [SyncMemoryAssetDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryAssetDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryAssetDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryAssetDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - memoryId: mapValueOfType(json, r'memoryId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryAssetDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryAssetDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryAssetDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryAssetDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'memoryId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_memory_asset_v1.dart b/mobile/openapi/lib/model/sync_memory_asset_v1.dart deleted file mode 100644 index 2cfab98afd..0000000000 --- a/mobile/openapi/lib/model/sync_memory_asset_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncMemoryAssetV1 { - /// Returns a new [SyncMemoryAssetV1] instance. - SyncMemoryAssetV1({ - required this.assetId, - required this.memoryId, - }); - - /// Asset ID - String assetId; - - /// Memory ID - String memoryId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryAssetV1 && - other.assetId == assetId && - other.memoryId == memoryId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (memoryId.hashCode); - - @override - String toString() => 'SyncMemoryAssetV1[assetId=$assetId, memoryId=$memoryId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'memoryId'] = this.memoryId; - return json; - } - - /// Returns a new [SyncMemoryAssetV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryAssetV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryAssetV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryAssetV1( - assetId: mapValueOfType(json, r'assetId')!, - memoryId: mapValueOfType(json, r'memoryId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryAssetV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryAssetV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryAssetV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryAssetV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'memoryId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_memory_delete_v1.dart b/mobile/openapi/lib/model/sync_memory_delete_v1.dart deleted file mode 100644 index d5f63ec8fa..0000000000 --- a/mobile/openapi/lib/model/sync_memory_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncMemoryDeleteV1 { - /// Returns a new [SyncMemoryDeleteV1] instance. - SyncMemoryDeleteV1({ - required this.memoryId, - }); - - /// Memory ID - String memoryId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryDeleteV1 && - other.memoryId == memoryId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (memoryId.hashCode); - - @override - String toString() => 'SyncMemoryDeleteV1[memoryId=$memoryId]'; - - Map toJson() { - final json = {}; - json[r'memoryId'] = this.memoryId; - return json; - } - - /// Returns a new [SyncMemoryDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryDeleteV1( - memoryId: mapValueOfType(json, r'memoryId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'memoryId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_memory_v1.dart b/mobile/openapi/lib/model/sync_memory_v1.dart deleted file mode 100644 index 95f5751f1f..0000000000 --- a/mobile/openapi/lib/model/sync_memory_v1.dart +++ /dev/null @@ -1,228 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncMemoryV1 { - /// Returns a new [SyncMemoryV1] instance. - SyncMemoryV1({ - required this.createdAt, - this.data = const {}, - required this.deletedAt, - required this.hideAt, - required this.id, - required this.isSaved, - required this.memoryAt, - required this.ownerId, - required this.seenAt, - required this.showAt, - required this.type, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Data - Map data; - - /// Deleted at - DateTime? deletedAt; - - /// Hide at - DateTime? hideAt; - - /// Memory ID - String id; - - /// Is saved - bool isSaved; - - /// Memory at - DateTime memoryAt; - - /// Owner ID - String ownerId; - - /// Seen at - DateTime? seenAt; - - /// Show at - DateTime? showAt; - - MemoryType type; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryV1 && - other.createdAt == createdAt && - _deepEquality.equals(other.data, data) && - other.deletedAt == deletedAt && - other.hideAt == hideAt && - other.id == id && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.ownerId == ownerId && - other.seenAt == seenAt && - other.showAt == showAt && - other.type == type && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (data.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (hideAt == null ? 0 : hideAt!.hashCode) + - (id.hashCode) + - (isSaved.hashCode) + - (memoryAt.hashCode) + - (ownerId.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode) + - (showAt == null ? 0 : showAt!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncMemoryV1[createdAt=$createdAt, data=$data, deletedAt=$deletedAt, hideAt=$hideAt, id=$id, isSaved=$isSaved, memoryAt=$memoryAt, ownerId=$ownerId, seenAt=$seenAt, showAt=$showAt, type=$type, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'data'] = this.data; - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - if (this.hideAt != null) { - json[r'hideAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.hideAt!.millisecondsSinceEpoch - : this.hideAt!.toUtc().toIso8601String(); - } else { - json[r'hideAt'] = null; - } - json[r'id'] = this.id; - json[r'isSaved'] = this.isSaved; - json[r'memoryAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.memoryAt.millisecondsSinceEpoch - : this.memoryAt.toUtc().toIso8601String(); - json[r'ownerId'] = this.ownerId; - if (this.seenAt != null) { - json[r'seenAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.seenAt!.millisecondsSinceEpoch - : this.seenAt!.toUtc().toIso8601String(); - } else { - json[r'seenAt'] = null; - } - if (this.showAt != null) { - json[r'showAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.showAt!.millisecondsSinceEpoch - : this.showAt!.toUtc().toIso8601String(); - } else { - json[r'showAt'] = null; - } - json[r'type'] = this.type; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncMemoryV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryV1( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - data: mapCastOfType(json, r'data')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - hideAt: mapDateTime(json, r'hideAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - id: mapValueOfType(json, r'id')!, - isSaved: mapValueOfType(json, r'isSaved')!, - memoryAt: mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ownerId: mapValueOfType(json, r'ownerId')!, - seenAt: mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - showAt: mapDateTime(json, r'showAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - type: MemoryType.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'data', - 'deletedAt', - 'hideAt', - 'id', - 'isSaved', - 'memoryAt', - 'ownerId', - 'seenAt', - 'showAt', - 'type', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_partner_delete_v1.dart b/mobile/openapi/lib/model/sync_partner_delete_v1.dart deleted file mode 100644 index 64dfb4eb98..0000000000 --- a/mobile/openapi/lib/model/sync_partner_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncPartnerDeleteV1 { - /// Returns a new [SyncPartnerDeleteV1] instance. - SyncPartnerDeleteV1({ - required this.sharedById, - required this.sharedWithId, - }); - - /// Shared by ID - String sharedById; - - /// Shared with ID - String sharedWithId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPartnerDeleteV1 && - other.sharedById == sharedById && - other.sharedWithId == sharedWithId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sharedById.hashCode) + - (sharedWithId.hashCode); - - @override - String toString() => 'SyncPartnerDeleteV1[sharedById=$sharedById, sharedWithId=$sharedWithId]'; - - Map toJson() { - final json = {}; - json[r'sharedById'] = this.sharedById; - json[r'sharedWithId'] = this.sharedWithId; - return json; - } - - /// Returns a new [SyncPartnerDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPartnerDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPartnerDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPartnerDeleteV1( - sharedById: mapValueOfType(json, r'sharedById')!, - sharedWithId: mapValueOfType(json, r'sharedWithId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPartnerDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPartnerDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPartnerDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPartnerDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sharedById', - 'sharedWithId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_partner_v1.dart b/mobile/openapi/lib/model/sync_partner_v1.dart deleted file mode 100644 index 9f9c3d14c1..0000000000 --- a/mobile/openapi/lib/model/sync_partner_v1.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncPartnerV1 { - /// Returns a new [SyncPartnerV1] instance. - SyncPartnerV1({ - required this.inTimeline, - required this.sharedById, - required this.sharedWithId, - }); - - /// In timeline - bool inTimeline; - - /// Shared by ID - String sharedById; - - /// Shared with ID - String sharedWithId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPartnerV1 && - other.inTimeline == inTimeline && - other.sharedById == sharedById && - other.sharedWithId == sharedWithId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (inTimeline.hashCode) + - (sharedById.hashCode) + - (sharedWithId.hashCode); - - @override - String toString() => 'SyncPartnerV1[inTimeline=$inTimeline, sharedById=$sharedById, sharedWithId=$sharedWithId]'; - - Map toJson() { - final json = {}; - json[r'inTimeline'] = this.inTimeline; - json[r'sharedById'] = this.sharedById; - json[r'sharedWithId'] = this.sharedWithId; - return json; - } - - /// Returns a new [SyncPartnerV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPartnerV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPartnerV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPartnerV1( - inTimeline: mapValueOfType(json, r'inTimeline')!, - sharedById: mapValueOfType(json, r'sharedById')!, - sharedWithId: mapValueOfType(json, r'sharedWithId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPartnerV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPartnerV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPartnerV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPartnerV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'inTimeline', - 'sharedById', - 'sharedWithId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_person_delete_v1.dart b/mobile/openapi/lib/model/sync_person_delete_v1.dart deleted file mode 100644 index 526bc26187..0000000000 --- a/mobile/openapi/lib/model/sync_person_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncPersonDeleteV1 { - /// Returns a new [SyncPersonDeleteV1] instance. - SyncPersonDeleteV1({ - required this.personId, - }); - - /// Person ID - String personId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPersonDeleteV1 && - other.personId == personId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (personId.hashCode); - - @override - String toString() => 'SyncPersonDeleteV1[personId=$personId]'; - - Map toJson() { - final json = {}; - json[r'personId'] = this.personId; - return json; - } - - /// Returns a new [SyncPersonDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPersonDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPersonDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPersonDeleteV1( - personId: mapValueOfType(json, r'personId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPersonDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPersonDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPersonDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPersonDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'personId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_person_v1.dart b/mobile/openapi/lib/model/sync_person_v1.dart deleted file mode 100644 index 6a669a0306..0000000000 --- a/mobile/openapi/lib/model/sync_person_v1.dart +++ /dev/null @@ -1,199 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncPersonV1 { - /// Returns a new [SyncPersonV1] instance. - SyncPersonV1({ - required this.birthDate, - required this.color, - required this.createdAt, - required this.faceAssetId, - required this.id, - required this.isFavorite, - required this.isHidden, - required this.name, - required this.ownerId, - required this.updatedAt, - }); - - /// Birth date - DateTime? birthDate; - - /// Color - String? color; - - /// Created at - DateTime createdAt; - - /// Face asset ID - String? faceAssetId; - - /// Person ID - String id; - - /// Is favorite - bool isFavorite; - - /// Is hidden - bool isHidden; - - /// Person name - String name; - - /// Owner ID - String ownerId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPersonV1 && - other.birthDate == birthDate && - other.color == color && - other.createdAt == createdAt && - other.faceAssetId == faceAssetId && - other.id == id && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name && - other.ownerId == ownerId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (createdAt.hashCode) + - (faceAssetId == null ? 0 : faceAssetId!.hashCode) + - (id.hashCode) + - (isFavorite.hashCode) + - (isHidden.hashCode) + - (name.hashCode) + - (ownerId.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncPersonV1[birthDate=$birthDate, color=$color, createdAt=$createdAt, faceAssetId=$faceAssetId, id=$id, isFavorite=$isFavorite, isHidden=$isHidden, name=$name, ownerId=$ownerId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.birthDate != null) { - json[r'birthDate'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.birthDate!.millisecondsSinceEpoch - : this.birthDate!.toUtc().toIso8601String(); - } else { - json[r'birthDate'] = null; - } - if (this.color != null) { - json[r'color'] = this.color; - } else { - json[r'color'] = null; - } - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.faceAssetId != null) { - json[r'faceAssetId'] = this.faceAssetId; - } else { - json[r'faceAssetId'] = null; - } - json[r'id'] = this.id; - json[r'isFavorite'] = this.isFavorite; - json[r'isHidden'] = this.isHidden; - json[r'name'] = this.name; - json[r'ownerId'] = this.ownerId; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncPersonV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPersonV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPersonV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPersonV1( - birthDate: mapDateTime(json, r'birthDate', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - color: mapValueOfType(json, r'color'), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - faceAssetId: mapValueOfType(json, r'faceAssetId'), - id: mapValueOfType(json, r'id')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - isHidden: mapValueOfType(json, r'isHidden')!, - name: mapValueOfType(json, r'name')!, - ownerId: mapValueOfType(json, r'ownerId')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPersonV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPersonV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPersonV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPersonV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'birthDate', - 'color', - 'createdAt', - 'faceAssetId', - 'id', - 'isFavorite', - 'isHidden', - 'name', - 'ownerId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_request_type.dart b/mobile/openapi/lib/model/sync_request_type.dart deleted file mode 100644 index f7c964d0e5..0000000000 --- a/mobile/openapi/lib/model/sync_request_type.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Sync request type -enum SyncRequestType { - albumsV1._(r'AlbumsV1'), - albumsV2._(r'AlbumsV2'), - albumUsersV1._(r'AlbumUsersV1'), - albumToAssetsV1._(r'AlbumToAssetsV1'), - albumAssetsV1._(r'AlbumAssetsV1'), - albumAssetsV2._(r'AlbumAssetsV2'), - albumAssetExifsV1._(r'AlbumAssetExifsV1'), - assetsV1._(r'AssetsV1'), - assetsV2._(r'AssetsV2'), - assetExifsV1._(r'AssetExifsV1'), - assetEditsV1._(r'AssetEditsV1'), - assetMetadataV1._(r'AssetMetadataV1'), - assetOcrV1._(r'AssetOcrV1'), - authUsersV1._(r'AuthUsersV1'), - memoriesV1._(r'MemoriesV1'), - memoryToAssetsV1._(r'MemoryToAssetsV1'), - partnersV1._(r'PartnersV1'), - partnerAssetsV1._(r'PartnerAssetsV1'), - partnerAssetsV2._(r'PartnerAssetsV2'), - partnerAssetExifsV1._(r'PartnerAssetExifsV1'), - partnerStacksV1._(r'PartnerStacksV1'), - stacksV1._(r'StacksV1'), - usersV1._(r'UsersV1'), - peopleV1._(r'PeopleV1'), - assetFacesV1._(r'AssetFacesV1'), - assetFacesV2._(r'AssetFacesV2'), - userMetadataV1._(r'UserMetadataV1'), - ; - - /// Instantiate a new enum with the provided value. - const SyncRequestType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SyncRequestType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SyncRequestType? fromJson(dynamic value) => SyncRequestTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SyncRequestType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncRequestType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SyncRequestType] to String, -/// and [decode] dynamic data back to [SyncRequestType]. -class SyncRequestTypeTypeTransformer { - factory SyncRequestTypeTypeTransformer() => _instance ??= const SyncRequestTypeTypeTransformer._(); - - const SyncRequestTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SyncRequestType data) => data._value; - - /// Returns the instance of [SyncRequestType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SyncRequestType? decode(dynamic data, {bool allowNull = true}) { - if (data is SyncRequestType) { - return data; - } - if (data != null) { - switch (data) { - case r'AlbumsV1': return SyncRequestType.albumsV1; - case r'AlbumsV2': return SyncRequestType.albumsV2; - case r'AlbumUsersV1': return SyncRequestType.albumUsersV1; - case r'AlbumToAssetsV1': return SyncRequestType.albumToAssetsV1; - case r'AlbumAssetsV1': return SyncRequestType.albumAssetsV1; - case r'AlbumAssetsV2': return SyncRequestType.albumAssetsV2; - case r'AlbumAssetExifsV1': return SyncRequestType.albumAssetExifsV1; - case r'AssetsV1': return SyncRequestType.assetsV1; - case r'AssetsV2': return SyncRequestType.assetsV2; - case r'AssetExifsV1': return SyncRequestType.assetExifsV1; - case r'AssetEditsV1': return SyncRequestType.assetEditsV1; - case r'AssetMetadataV1': return SyncRequestType.assetMetadataV1; - case r'AssetOcrV1': return SyncRequestType.assetOcrV1; - case r'AuthUsersV1': return SyncRequestType.authUsersV1; - case r'MemoriesV1': return SyncRequestType.memoriesV1; - case r'MemoryToAssetsV1': return SyncRequestType.memoryToAssetsV1; - case r'PartnersV1': return SyncRequestType.partnersV1; - case r'PartnerAssetsV1': return SyncRequestType.partnerAssetsV1; - case r'PartnerAssetsV2': return SyncRequestType.partnerAssetsV2; - case r'PartnerAssetExifsV1': return SyncRequestType.partnerAssetExifsV1; - case r'PartnerStacksV1': return SyncRequestType.partnerStacksV1; - case r'StacksV1': return SyncRequestType.stacksV1; - case r'UsersV1': return SyncRequestType.usersV1; - case r'PeopleV1': return SyncRequestType.peopleV1; - case r'AssetFacesV1': return SyncRequestType.assetFacesV1; - case r'AssetFacesV2': return SyncRequestType.assetFacesV2; - case r'UserMetadataV1': return SyncRequestType.userMetadataV1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SyncRequestTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/sync_stack_delete_v1.dart b/mobile/openapi/lib/model/sync_stack_delete_v1.dart deleted file mode 100644 index 2a7398291a..0000000000 --- a/mobile/openapi/lib/model/sync_stack_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncStackDeleteV1 { - /// Returns a new [SyncStackDeleteV1] instance. - SyncStackDeleteV1({ - required this.stackId, - }); - - /// Stack ID - String stackId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncStackDeleteV1 && - other.stackId == stackId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (stackId.hashCode); - - @override - String toString() => 'SyncStackDeleteV1[stackId=$stackId]'; - - Map toJson() { - final json = {}; - json[r'stackId'] = this.stackId; - return json; - } - - /// Returns a new [SyncStackDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncStackDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncStackDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncStackDeleteV1( - stackId: mapValueOfType(json, r'stackId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncStackDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncStackDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncStackDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncStackDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'stackId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_stack_v1.dart b/mobile/openapi/lib/model/sync_stack_v1.dart deleted file mode 100644 index 6da2243872..0000000000 --- a/mobile/openapi/lib/model/sync_stack_v1.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncStackV1 { - /// Returns a new [SyncStackV1] instance. - SyncStackV1({ - required this.createdAt, - required this.id, - required this.ownerId, - required this.primaryAssetId, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Stack ID - String id; - - /// Owner ID - String ownerId; - - /// Primary asset ID - String primaryAssetId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncStackV1 && - other.createdAt == createdAt && - other.id == id && - other.ownerId == ownerId && - other.primaryAssetId == primaryAssetId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (id.hashCode) + - (ownerId.hashCode) + - (primaryAssetId.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncStackV1[createdAt=$createdAt, id=$id, ownerId=$ownerId, primaryAssetId=$primaryAssetId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'ownerId'] = this.ownerId; - json[r'primaryAssetId'] = this.primaryAssetId; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncStackV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncStackV1? fromJson(dynamic value) { - upgradeDto(value, "SyncStackV1"); - if (value is Map) { - final json = value.cast(); - - return SyncStackV1( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - ownerId: mapValueOfType(json, r'ownerId')!, - primaryAssetId: mapValueOfType(json, r'primaryAssetId')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncStackV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncStackV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncStackV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncStackV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'ownerId', - 'primaryAssetId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_stream_dto.dart b/mobile/openapi/lib/model/sync_stream_dto.dart deleted file mode 100644 index 12dcfb4b84..0000000000 --- a/mobile/openapi/lib/model/sync_stream_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncStreamDto { - /// Returns a new [SyncStreamDto] instance. - SyncStreamDto({ - this.reset = const Optional.absent(), - this.types = const [], - }); - - /// Reset sync state - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional reset; - - /// Sync request types - List types; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncStreamDto && - other.reset == reset && - _deepEquality.equals(other.types, types); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (reset == null ? 0 : reset!.hashCode) + - (types.hashCode); - - @override - String toString() => 'SyncStreamDto[reset=$reset, types=$types]'; - - Map toJson() { - final json = {}; - if (this.reset.isPresent) { - final value = this.reset.value; - json[r'reset'] = value; - } - json[r'types'] = this.types; - return json; - } - - /// Returns a new [SyncStreamDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncStreamDto? fromJson(dynamic value) { - upgradeDto(value, "SyncStreamDto"); - if (value is Map) { - final json = value.cast(); - - return SyncStreamDto( - reset: json.containsKey(r'reset') ? Optional.present(mapValueOfType(json, r'reset')) : const Optional.absent(), - types: SyncRequestType.listFromJson(json[r'types']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncStreamDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncStreamDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncStreamDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncStreamDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'types', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_delete_v1.dart b/mobile/openapi/lib/model/sync_user_delete_v1.dart deleted file mode 100644 index bbbdc147dd..0000000000 --- a/mobile/openapi/lib/model/sync_user_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncUserDeleteV1 { - /// Returns a new [SyncUserDeleteV1] instance. - SyncUserDeleteV1({ - required this.userId, - }); - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserDeleteV1 && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (userId.hashCode); - - @override - String toString() => 'SyncUserDeleteV1[userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncUserDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserDeleteV1( - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart b/mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart deleted file mode 100644 index 67976108e1..0000000000 --- a/mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncUserMetadataDeleteV1 { - /// Returns a new [SyncUserMetadataDeleteV1] instance. - SyncUserMetadataDeleteV1({ - required this.key, - required this.userId, - }); - - UserMetadataKey key; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserMetadataDeleteV1 && - other.key == key && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SyncUserMetadataDeleteV1[key=$key, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncUserMetadataDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserMetadataDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserMetadataDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserMetadataDeleteV1( - key: UserMetadataKey.fromJson(json[r'key'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserMetadataDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserMetadataDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserMetadataDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserMetadataDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_metadata_v1.dart b/mobile/openapi/lib/model/sync_user_metadata_v1.dart deleted file mode 100644 index ddde7c0513..0000000000 --- a/mobile/openapi/lib/model/sync_user_metadata_v1.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncUserMetadataV1 { - /// Returns a new [SyncUserMetadataV1] instance. - SyncUserMetadataV1({ - required this.key, - required this.userId, - this.value = const {}, - }); - - UserMetadataKey key; - - /// User ID - String userId; - - /// User metadata value - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserMetadataV1 && - other.key == key && - other.userId == userId && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (userId.hashCode) + - (value.hashCode); - - @override - String toString() => 'SyncUserMetadataV1[key=$key, userId=$userId, value=$value]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'userId'] = this.userId; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SyncUserMetadataV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserMetadataV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserMetadataV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserMetadataV1( - key: UserMetadataKey.fromJson(json[r'key'])!, - userId: mapValueOfType(json, r'userId')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserMetadataV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserMetadataV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserMetadataV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserMetadataV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'userId', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_v1.dart b/mobile/openapi/lib/model/sync_user_v1.dart deleted file mode 100644 index d86680179e..0000000000 --- a/mobile/openapi/lib/model/sync_user_v1.dart +++ /dev/null @@ -1,163 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncUserV1 { - /// Returns a new [SyncUserV1] instance. - SyncUserV1({ - this.avatarColor = const Optional.absent(), - required this.deletedAt, - required this.email, - required this.hasProfileImage, - required this.id, - required this.name, - required this.profileChangedAt, - }); - - Optional avatarColor; - - /// User deleted at - DateTime? deletedAt; - - /// User email - String email; - - /// User has profile image - bool hasProfileImage; - - /// User ID - String id; - - /// User name - String name; - - /// User profile changed at - DateTime profileChangedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserV1 && - other.avatarColor == avatarColor && - other.deletedAt == deletedAt && - other.email == email && - other.hasProfileImage == hasProfileImage && - other.id == id && - other.name == name && - other.profileChangedAt == profileChangedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (hasProfileImage.hashCode) + - (id.hashCode) + - (name.hashCode) + - (profileChangedAt.hashCode); - - @override - String toString() => 'SyncUserV1[avatarColor=$avatarColor, deletedAt=$deletedAt, email=$email, hasProfileImage=$hasProfileImage, id=$id, name=$name, profileChangedAt=$profileChangedAt]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - json[r'hasProfileImage'] = this.hasProfileImage; - json[r'id'] = this.id; - json[r'name'] = this.name; - json[r'profileChangedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.profileChangedAt.millisecondsSinceEpoch - : this.profileChangedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncUserV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserV1( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - email: mapValueOfType(json, r'email')!, - hasProfileImage: mapValueOfType(json, r'hasProfileImage')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'deletedAt', - 'email', - 'hasProfileImage', - 'id', - 'name', - 'profileChangedAt', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_backups_dto.dart b/mobile/openapi/lib/model/system_config_backups_dto.dart deleted file mode 100644 index 82cd6e59eb..0000000000 --- a/mobile/openapi/lib/model/system_config_backups_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigBackupsDto { - /// Returns a new [SystemConfigBackupsDto] instance. - SystemConfigBackupsDto({ - required this.database, - }); - - DatabaseBackupConfig database; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigBackupsDto && - other.database == database; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (database.hashCode); - - @override - String toString() => 'SystemConfigBackupsDto[database=$database]'; - - Map toJson() { - final json = {}; - json[r'database'] = this.database; - return json; - } - - /// Returns a new [SystemConfigBackupsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigBackupsDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigBackupsDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigBackupsDto( - database: DatabaseBackupConfig.fromJson(json[r'database'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigBackupsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigBackupsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigBackupsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigBackupsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'database', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_dto.dart b/mobile/openapi/lib/model/system_config_dto.dart deleted file mode 100644 index 3a5e15b030..0000000000 --- a/mobile/openapi/lib/model/system_config_dto.dart +++ /dev/null @@ -1,267 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigDto { - /// Returns a new [SystemConfigDto] instance. - SystemConfigDto({ - required this.backup, - required this.ffmpeg, - required this.image, - required this.integrityChecks, - required this.job, - required this.library_, - required this.logging, - required this.machineLearning, - required this.map, - required this.metadata, - required this.newVersionCheck, - required this.nightlyTasks, - required this.notifications, - required this.oauth, - required this.passwordLogin, - required this.reverseGeocoding, - required this.server, - required this.storageTemplate, - required this.templates, - required this.theme, - required this.trash, - required this.user, - }); - - SystemConfigBackupsDto backup; - - SystemConfigFFmpegDto ffmpeg; - - SystemConfigImageDto image; - - SystemConfigIntegrityChecks integrityChecks; - - SystemConfigJobDto job; - - SystemConfigLibraryDto library_; - - SystemConfigLoggingDto logging; - - SystemConfigMachineLearningDto machineLearning; - - SystemConfigMapDto map; - - SystemConfigMetadataDto metadata; - - SystemConfigNewVersionCheckDto newVersionCheck; - - SystemConfigNightlyTasksDto nightlyTasks; - - SystemConfigNotificationsDto notifications; - - SystemConfigOAuthDto oauth; - - SystemConfigPasswordLoginDto passwordLogin; - - SystemConfigReverseGeocodingDto reverseGeocoding; - - SystemConfigServerDto server; - - SystemConfigStorageTemplateDto storageTemplate; - - SystemConfigTemplatesDto templates; - - SystemConfigThemeDto theme; - - SystemConfigTrashDto trash; - - SystemConfigUserDto user; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigDto && - other.backup == backup && - other.ffmpeg == ffmpeg && - other.image == image && - other.integrityChecks == integrityChecks && - other.job == job && - other.library_ == library_ && - other.logging == logging && - other.machineLearning == machineLearning && - other.map == map && - other.metadata == metadata && - other.newVersionCheck == newVersionCheck && - other.nightlyTasks == nightlyTasks && - other.notifications == notifications && - other.oauth == oauth && - other.passwordLogin == passwordLogin && - other.reverseGeocoding == reverseGeocoding && - other.server == server && - other.storageTemplate == storageTemplate && - other.templates == templates && - other.theme == theme && - other.trash == trash && - other.user == user; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backup.hashCode) + - (ffmpeg.hashCode) + - (image.hashCode) + - (integrityChecks.hashCode) + - (job.hashCode) + - (library_.hashCode) + - (logging.hashCode) + - (machineLearning.hashCode) + - (map.hashCode) + - (metadata.hashCode) + - (newVersionCheck.hashCode) + - (nightlyTasks.hashCode) + - (notifications.hashCode) + - (oauth.hashCode) + - (passwordLogin.hashCode) + - (reverseGeocoding.hashCode) + - (server.hashCode) + - (storageTemplate.hashCode) + - (templates.hashCode) + - (theme.hashCode) + - (trash.hashCode) + - (user.hashCode); - - @override - String toString() => 'SystemConfigDto[backup=$backup, ffmpeg=$ffmpeg, image=$image, integrityChecks=$integrityChecks, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, metadata=$metadata, newVersionCheck=$newVersionCheck, nightlyTasks=$nightlyTasks, notifications=$notifications, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, server=$server, storageTemplate=$storageTemplate, templates=$templates, theme=$theme, trash=$trash, user=$user]'; - - Map toJson() { - final json = {}; - json[r'backup'] = this.backup; - json[r'ffmpeg'] = this.ffmpeg; - json[r'image'] = this.image; - json[r'integrityChecks'] = this.integrityChecks; - json[r'job'] = this.job; - json[r'library'] = this.library_; - json[r'logging'] = this.logging; - json[r'machineLearning'] = this.machineLearning; - json[r'map'] = this.map; - json[r'metadata'] = this.metadata; - json[r'newVersionCheck'] = this.newVersionCheck; - json[r'nightlyTasks'] = this.nightlyTasks; - json[r'notifications'] = this.notifications; - json[r'oauth'] = this.oauth; - json[r'passwordLogin'] = this.passwordLogin; - json[r'reverseGeocoding'] = this.reverseGeocoding; - json[r'server'] = this.server; - json[r'storageTemplate'] = this.storageTemplate; - json[r'templates'] = this.templates; - json[r'theme'] = this.theme; - json[r'trash'] = this.trash; - json[r'user'] = this.user; - return json; - } - - /// Returns a new [SystemConfigDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigDto( - backup: SystemConfigBackupsDto.fromJson(json[r'backup'])!, - ffmpeg: SystemConfigFFmpegDto.fromJson(json[r'ffmpeg'])!, - image: SystemConfigImageDto.fromJson(json[r'image'])!, - integrityChecks: SystemConfigIntegrityChecks.fromJson(json[r'integrityChecks'])!, - job: SystemConfigJobDto.fromJson(json[r'job'])!, - library_: SystemConfigLibraryDto.fromJson(json[r'library'])!, - logging: SystemConfigLoggingDto.fromJson(json[r'logging'])!, - machineLearning: SystemConfigMachineLearningDto.fromJson(json[r'machineLearning'])!, - map: SystemConfigMapDto.fromJson(json[r'map'])!, - metadata: SystemConfigMetadataDto.fromJson(json[r'metadata'])!, - newVersionCheck: SystemConfigNewVersionCheckDto.fromJson(json[r'newVersionCheck'])!, - nightlyTasks: SystemConfigNightlyTasksDto.fromJson(json[r'nightlyTasks'])!, - notifications: SystemConfigNotificationsDto.fromJson(json[r'notifications'])!, - oauth: SystemConfigOAuthDto.fromJson(json[r'oauth'])!, - passwordLogin: SystemConfigPasswordLoginDto.fromJson(json[r'passwordLogin'])!, - reverseGeocoding: SystemConfigReverseGeocodingDto.fromJson(json[r'reverseGeocoding'])!, - server: SystemConfigServerDto.fromJson(json[r'server'])!, - storageTemplate: SystemConfigStorageTemplateDto.fromJson(json[r'storageTemplate'])!, - templates: SystemConfigTemplatesDto.fromJson(json[r'templates'])!, - theme: SystemConfigThemeDto.fromJson(json[r'theme'])!, - trash: SystemConfigTrashDto.fromJson(json[r'trash'])!, - user: SystemConfigUserDto.fromJson(json[r'user'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backup', - 'ffmpeg', - 'image', - 'integrityChecks', - 'job', - 'library', - 'logging', - 'machineLearning', - 'map', - 'metadata', - 'newVersionCheck', - 'nightlyTasks', - 'notifications', - 'oauth', - 'passwordLogin', - 'reverseGeocoding', - 'server', - 'storageTemplate', - 'templates', - 'theme', - 'trash', - 'user', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart b/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart deleted file mode 100644 index 79da8da97f..0000000000 --- a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart +++ /dev/null @@ -1,297 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigFFmpegDto { - /// Returns a new [SystemConfigFFmpegDto] instance. - SystemConfigFFmpegDto({ - required this.accel, - required this.accelDecode, - this.acceptedAudioCodecs = const [], - this.acceptedContainers = const [], - this.acceptedVideoCodecs = const [], - required this.bframes, - required this.cqMode, - required this.crf, - required this.gopSize, - required this.maxBitrate, - required this.preferredHwDevice, - required this.preset, - required this.realtime, - required this.refs, - required this.targetAudioCodec, - required this.targetResolution, - required this.targetVideoCodec, - required this.temporalAQ, - required this.threads, - required this.tonemap, - required this.transcode, - required this.twoPass, - }); - - TranscodeHWAccel accel; - - /// Accelerated decode - bool accelDecode; - - /// Accepted audio codecs - List acceptedAudioCodecs; - - /// Accepted containers - List acceptedContainers; - - /// Accepted video codecs - List acceptedVideoCodecs; - - /// B-frames - /// - /// Minimum value: -1 - /// Maximum value: 16 - int bframes; - - CQMode cqMode; - - /// CRF - /// - /// Minimum value: 0 - /// Maximum value: 51 - int crf; - - /// GOP size - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int gopSize; - - /// Max bitrate - String maxBitrate; - - /// Preferred hardware device - String preferredHwDevice; - - /// Preset - String preset; - - SystemConfigFFmpegRealtimeDto realtime; - - /// References - /// - /// Minimum value: 0 - /// Maximum value: 6 - int refs; - - AudioCodec targetAudioCodec; - - /// Target resolution - String targetResolution; - - VideoCodec targetVideoCodec; - - /// Temporal AQ - bool temporalAQ; - - /// Threads - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int threads; - - ToneMapping tonemap; - - TranscodePolicy transcode; - - /// Two pass - bool twoPass; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigFFmpegDto && - other.accel == accel && - other.accelDecode == accelDecode && - _deepEquality.equals(other.acceptedAudioCodecs, acceptedAudioCodecs) && - _deepEquality.equals(other.acceptedContainers, acceptedContainers) && - _deepEquality.equals(other.acceptedVideoCodecs, acceptedVideoCodecs) && - other.bframes == bframes && - other.cqMode == cqMode && - other.crf == crf && - other.gopSize == gopSize && - other.maxBitrate == maxBitrate && - other.preferredHwDevice == preferredHwDevice && - other.preset == preset && - other.realtime == realtime && - other.refs == refs && - other.targetAudioCodec == targetAudioCodec && - other.targetResolution == targetResolution && - other.targetVideoCodec == targetVideoCodec && - other.temporalAQ == temporalAQ && - other.threads == threads && - other.tonemap == tonemap && - other.transcode == transcode && - other.twoPass == twoPass; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (accel.hashCode) + - (accelDecode.hashCode) + - (acceptedAudioCodecs.hashCode) + - (acceptedContainers.hashCode) + - (acceptedVideoCodecs.hashCode) + - (bframes.hashCode) + - (cqMode.hashCode) + - (crf.hashCode) + - (gopSize.hashCode) + - (maxBitrate.hashCode) + - (preferredHwDevice.hashCode) + - (preset.hashCode) + - (realtime.hashCode) + - (refs.hashCode) + - (targetAudioCodec.hashCode) + - (targetResolution.hashCode) + - (targetVideoCodec.hashCode) + - (temporalAQ.hashCode) + - (threads.hashCode) + - (tonemap.hashCode) + - (transcode.hashCode) + - (twoPass.hashCode); - - @override - String toString() => 'SystemConfigFFmpegDto[accel=$accel, accelDecode=$accelDecode, acceptedAudioCodecs=$acceptedAudioCodecs, acceptedContainers=$acceptedContainers, acceptedVideoCodecs=$acceptedVideoCodecs, bframes=$bframes, cqMode=$cqMode, crf=$crf, gopSize=$gopSize, maxBitrate=$maxBitrate, preferredHwDevice=$preferredHwDevice, preset=$preset, realtime=$realtime, refs=$refs, targetAudioCodec=$targetAudioCodec, targetResolution=$targetResolution, targetVideoCodec=$targetVideoCodec, temporalAQ=$temporalAQ, threads=$threads, tonemap=$tonemap, transcode=$transcode, twoPass=$twoPass]'; - - Map toJson() { - final json = {}; - json[r'accel'] = this.accel; - json[r'accelDecode'] = this.accelDecode; - json[r'acceptedAudioCodecs'] = this.acceptedAudioCodecs; - json[r'acceptedContainers'] = this.acceptedContainers; - json[r'acceptedVideoCodecs'] = this.acceptedVideoCodecs; - json[r'bframes'] = this.bframes; - json[r'cqMode'] = this.cqMode; - json[r'crf'] = this.crf; - json[r'gopSize'] = this.gopSize; - json[r'maxBitrate'] = this.maxBitrate; - json[r'preferredHwDevice'] = this.preferredHwDevice; - json[r'preset'] = this.preset; - json[r'realtime'] = this.realtime; - json[r'refs'] = this.refs; - json[r'targetAudioCodec'] = this.targetAudioCodec; - json[r'targetResolution'] = this.targetResolution; - json[r'targetVideoCodec'] = this.targetVideoCodec; - json[r'temporalAQ'] = this.temporalAQ; - json[r'threads'] = this.threads; - json[r'tonemap'] = this.tonemap; - json[r'transcode'] = this.transcode; - json[r'twoPass'] = this.twoPass; - return json; - } - - /// Returns a new [SystemConfigFFmpegDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigFFmpegDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigFFmpegDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigFFmpegDto( - accel: TranscodeHWAccel.fromJson(json[r'accel'])!, - accelDecode: mapValueOfType(json, r'accelDecode')!, - acceptedAudioCodecs: AudioCodec.listFromJson(json[r'acceptedAudioCodecs']), - acceptedContainers: VideoContainer.listFromJson(json[r'acceptedContainers']), - acceptedVideoCodecs: VideoCodec.listFromJson(json[r'acceptedVideoCodecs']), - bframes: mapValueOfType(json, r'bframes')!, - cqMode: CQMode.fromJson(json[r'cqMode'])!, - crf: mapValueOfType(json, r'crf')!, - gopSize: mapValueOfType(json, r'gopSize')!, - maxBitrate: mapValueOfType(json, r'maxBitrate')!, - preferredHwDevice: mapValueOfType(json, r'preferredHwDevice')!, - preset: mapValueOfType(json, r'preset')!, - realtime: SystemConfigFFmpegRealtimeDto.fromJson(json[r'realtime'])!, - refs: mapValueOfType(json, r'refs')!, - targetAudioCodec: AudioCodec.fromJson(json[r'targetAudioCodec'])!, - targetResolution: mapValueOfType(json, r'targetResolution')!, - targetVideoCodec: VideoCodec.fromJson(json[r'targetVideoCodec'])!, - temporalAQ: mapValueOfType(json, r'temporalAQ')!, - threads: mapValueOfType(json, r'threads')!, - tonemap: ToneMapping.fromJson(json[r'tonemap'])!, - transcode: TranscodePolicy.fromJson(json[r'transcode'])!, - twoPass: mapValueOfType(json, r'twoPass')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigFFmpegDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigFFmpegDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigFFmpegDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigFFmpegDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'accel', - 'accelDecode', - 'acceptedAudioCodecs', - 'acceptedContainers', - 'acceptedVideoCodecs', - 'bframes', - 'cqMode', - 'crf', - 'gopSize', - 'maxBitrate', - 'preferredHwDevice', - 'preset', - 'realtime', - 'refs', - 'targetAudioCodec', - 'targetResolution', - 'targetVideoCodec', - 'temporalAQ', - 'threads', - 'tonemap', - 'transcode', - 'twoPass', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart b/mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart deleted file mode 100644 index e88cd0d5c1..0000000000 --- a/mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigFFmpegRealtimeDto { - /// Returns a new [SystemConfigFFmpegRealtimeDto] instance. - SystemConfigFFmpegRealtimeDto({ - required this.enabled, - this.resolutions = const [], - this.videoCodecs = const [], - }); - - /// Enable real-time HLS transcoding (alpha) - bool enabled; - - /// Resolutions to use for real-time HLS transcoding - List resolutions; - - /// Video codecs to use for real-time HLS transcoding - List videoCodecs; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigFFmpegRealtimeDto && - other.enabled == enabled && - _deepEquality.equals(other.resolutions, resolutions) && - _deepEquality.equals(other.videoCodecs, videoCodecs); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (resolutions.hashCode) + - (videoCodecs.hashCode); - - @override - String toString() => 'SystemConfigFFmpegRealtimeDto[enabled=$enabled, resolutions=$resolutions, videoCodecs=$videoCodecs]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'resolutions'] = this.resolutions; - json[r'videoCodecs'] = this.videoCodecs; - return json; - } - - /// Returns a new [SystemConfigFFmpegRealtimeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigFFmpegRealtimeDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigFFmpegRealtimeDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigFFmpegRealtimeDto( - enabled: mapValueOfType(json, r'enabled')!, - resolutions: HlsVideoResolution.listFromJson(json[r'resolutions']), - videoCodecs: VideoCodec.listFromJson(json[r'videoCodecs']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigFFmpegRealtimeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigFFmpegRealtimeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigFFmpegRealtimeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigFFmpegRealtimeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'resolutions', - 'videoCodecs', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_faces_dto.dart b/mobile/openapi/lib/model/system_config_faces_dto.dart deleted file mode 100644 index f57303c310..0000000000 --- a/mobile/openapi/lib/model/system_config_faces_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigFacesDto { - /// Returns a new [SystemConfigFacesDto] instance. - SystemConfigFacesDto({ - required this.import_, - }); - - /// Import - bool import_; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigFacesDto && - other.import_ == import_; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (import_.hashCode); - - @override - String toString() => 'SystemConfigFacesDto[import_=$import_]'; - - Map toJson() { - final json = {}; - json[r'import'] = this.import_; - return json; - } - - /// Returns a new [SystemConfigFacesDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigFacesDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigFacesDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigFacesDto( - import_: mapValueOfType(json, r'import')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigFacesDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigFacesDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigFacesDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigFacesDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'import', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart b/mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart deleted file mode 100644 index f0d27ffa85..0000000000 --- a/mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart +++ /dev/null @@ -1,137 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigGeneratedFullsizeImageDto { - /// Returns a new [SystemConfigGeneratedFullsizeImageDto] instance. - SystemConfigGeneratedFullsizeImageDto({ - required this.enabled, - required this.format, - this.progressive = const Optional.absent(), - required this.quality, - }); - - /// Enabled - bool enabled; - - ImageFormat format; - - /// Progressive - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional progressive; - - /// Quality - /// - /// Minimum value: 1 - /// Maximum value: 100 - int quality; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigGeneratedFullsizeImageDto && - other.enabled == enabled && - other.format == format && - other.progressive == progressive && - other.quality == quality; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (format.hashCode) + - (progressive == null ? 0 : progressive!.hashCode) + - (quality.hashCode); - - @override - String toString() => 'SystemConfigGeneratedFullsizeImageDto[enabled=$enabled, format=$format, progressive=$progressive, quality=$quality]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'format'] = this.format; - if (this.progressive.isPresent) { - final value = this.progressive.value; - json[r'progressive'] = value; - } - json[r'quality'] = this.quality; - return json; - } - - /// Returns a new [SystemConfigGeneratedFullsizeImageDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigGeneratedFullsizeImageDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigGeneratedFullsizeImageDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigGeneratedFullsizeImageDto( - enabled: mapValueOfType(json, r'enabled')!, - format: ImageFormat.fromJson(json[r'format'])!, - progressive: json.containsKey(r'progressive') ? Optional.present(mapValueOfType(json, r'progressive')) : const Optional.absent(), - quality: mapValueOfType(json, r'quality')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigGeneratedFullsizeImageDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigGeneratedFullsizeImageDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigGeneratedFullsizeImageDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigGeneratedFullsizeImageDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'format', - 'quality', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_generated_image_dto.dart b/mobile/openapi/lib/model/system_config_generated_image_dto.dart deleted file mode 100644 index 6aff16322c..0000000000 --- a/mobile/openapi/lib/model/system_config_generated_image_dto.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigGeneratedImageDto { - /// Returns a new [SystemConfigGeneratedImageDto] instance. - SystemConfigGeneratedImageDto({ - required this.format, - this.progressive = const Optional.absent(), - required this.quality, - required this.size, - }); - - ImageFormat format; - - /// Progressive - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional progressive; - - /// Quality - /// - /// Minimum value: 1 - /// Maximum value: 100 - int quality; - - /// Size - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int size; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigGeneratedImageDto && - other.format == format && - other.progressive == progressive && - other.quality == quality && - other.size == size; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (format.hashCode) + - (progressive == null ? 0 : progressive!.hashCode) + - (quality.hashCode) + - (size.hashCode); - - @override - String toString() => 'SystemConfigGeneratedImageDto[format=$format, progressive=$progressive, quality=$quality, size=$size]'; - - Map toJson() { - final json = {}; - json[r'format'] = this.format; - if (this.progressive.isPresent) { - final value = this.progressive.value; - json[r'progressive'] = value; - } - json[r'quality'] = this.quality; - json[r'size'] = this.size; - return json; - } - - /// Returns a new [SystemConfigGeneratedImageDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigGeneratedImageDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigGeneratedImageDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigGeneratedImageDto( - format: ImageFormat.fromJson(json[r'format'])!, - progressive: json.containsKey(r'progressive') ? Optional.present(mapValueOfType(json, r'progressive')) : const Optional.absent(), - quality: mapValueOfType(json, r'quality')!, - size: mapValueOfType(json, r'size')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigGeneratedImageDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigGeneratedImageDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigGeneratedImageDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigGeneratedImageDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'format', - 'quality', - 'size', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_image_dto.dart b/mobile/openapi/lib/model/system_config_image_dto.dart deleted file mode 100644 index 668b740872..0000000000 --- a/mobile/openapi/lib/model/system_config_image_dto.dart +++ /dev/null @@ -1,132 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigImageDto { - /// Returns a new [SystemConfigImageDto] instance. - SystemConfigImageDto({ - required this.colorspace, - required this.extractEmbedded, - required this.fullsize, - required this.preview, - required this.thumbnail, - }); - - Colorspace colorspace; - - /// Extract embedded - bool extractEmbedded; - - SystemConfigGeneratedFullsizeImageDto fullsize; - - SystemConfigGeneratedImageDto preview; - - SystemConfigGeneratedImageDto thumbnail; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigImageDto && - other.colorspace == colorspace && - other.extractEmbedded == extractEmbedded && - other.fullsize == fullsize && - other.preview == preview && - other.thumbnail == thumbnail; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (colorspace.hashCode) + - (extractEmbedded.hashCode) + - (fullsize.hashCode) + - (preview.hashCode) + - (thumbnail.hashCode); - - @override - String toString() => 'SystemConfigImageDto[colorspace=$colorspace, extractEmbedded=$extractEmbedded, fullsize=$fullsize, preview=$preview, thumbnail=$thumbnail]'; - - Map toJson() { - final json = {}; - json[r'colorspace'] = this.colorspace; - json[r'extractEmbedded'] = this.extractEmbedded; - json[r'fullsize'] = this.fullsize; - json[r'preview'] = this.preview; - json[r'thumbnail'] = this.thumbnail; - return json; - } - - /// Returns a new [SystemConfigImageDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigImageDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigImageDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigImageDto( - colorspace: Colorspace.fromJson(json[r'colorspace'])!, - extractEmbedded: mapValueOfType(json, r'extractEmbedded')!, - fullsize: SystemConfigGeneratedFullsizeImageDto.fromJson(json[r'fullsize'])!, - preview: SystemConfigGeneratedImageDto.fromJson(json[r'preview'])!, - thumbnail: SystemConfigGeneratedImageDto.fromJson(json[r'thumbnail'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigImageDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigImageDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigImageDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigImageDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'colorspace', - 'extractEmbedded', - 'fullsize', - 'preview', - 'thumbnail', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_integrity_checks.dart b/mobile/openapi/lib/model/system_config_integrity_checks.dart deleted file mode 100644 index ef047e156a..0000000000 --- a/mobile/openapi/lib/model/system_config_integrity_checks.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigIntegrityChecks { - /// Returns a new [SystemConfigIntegrityChecks] instance. - SystemConfigIntegrityChecks({ - required this.checksumFiles, - required this.missingFiles, - required this.untrackedFiles, - }); - - SystemConfigIntegrityChecksumJob checksumFiles; - - SystemConfigIntegrityJob missingFiles; - - SystemConfigIntegrityJob untrackedFiles; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigIntegrityChecks && - other.checksumFiles == checksumFiles && - other.missingFiles == missingFiles && - other.untrackedFiles == untrackedFiles; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksumFiles.hashCode) + - (missingFiles.hashCode) + - (untrackedFiles.hashCode); - - @override - String toString() => 'SystemConfigIntegrityChecks[checksumFiles=$checksumFiles, missingFiles=$missingFiles, untrackedFiles=$untrackedFiles]'; - - Map toJson() { - final json = {}; - json[r'checksumFiles'] = this.checksumFiles; - json[r'missingFiles'] = this.missingFiles; - json[r'untrackedFiles'] = this.untrackedFiles; - return json; - } - - /// Returns a new [SystemConfigIntegrityChecks] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigIntegrityChecks? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigIntegrityChecks"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigIntegrityChecks( - checksumFiles: SystemConfigIntegrityChecksumJob.fromJson(json[r'checksumFiles'])!, - missingFiles: SystemConfigIntegrityJob.fromJson(json[r'missingFiles'])!, - untrackedFiles: SystemConfigIntegrityJob.fromJson(json[r'untrackedFiles'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigIntegrityChecks.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigIntegrityChecks.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigIntegrityChecks-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigIntegrityChecks.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksumFiles', - 'missingFiles', - 'untrackedFiles', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_integrity_checksum_job.dart b/mobile/openapi/lib/model/system_config_integrity_checksum_job.dart deleted file mode 100644 index 514a52505b..0000000000 --- a/mobile/openapi/lib/model/system_config_integrity_checksum_job.dart +++ /dev/null @@ -1,133 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigIntegrityChecksumJob { - /// Returns a new [SystemConfigIntegrityChecksumJob] instance. - SystemConfigIntegrityChecksumJob({ - required this.cronExpression, - required this.enabled, - required this.percentageLimit, - required this.timeLimit, - }); - - /// Cron expression for when the integrity check should run - String cronExpression; - - /// Enabled - bool enabled; - - /// Percentage limit of the integrity checksum job - /// - /// Minimum value: 0 - /// Maximum value: 1 - double percentageLimit; - - /// How long the integrity checksum job may run for - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int timeLimit; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigIntegrityChecksumJob && - other.cronExpression == cronExpression && - other.enabled == enabled && - other.percentageLimit == percentageLimit && - other.timeLimit == timeLimit; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode) + - (percentageLimit.hashCode) + - (timeLimit.hashCode); - - @override - String toString() => 'SystemConfigIntegrityChecksumJob[cronExpression=$cronExpression, enabled=$enabled, percentageLimit=$percentageLimit, timeLimit=$timeLimit]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - json[r'percentageLimit'] = this.percentageLimit; - json[r'timeLimit'] = this.timeLimit; - return json; - } - - /// Returns a new [SystemConfigIntegrityChecksumJob] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigIntegrityChecksumJob? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigIntegrityChecksumJob"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigIntegrityChecksumJob( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - percentageLimit: mapValueOfType(json, r'percentageLimit')!, - timeLimit: mapValueOfType(json, r'timeLimit')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigIntegrityChecksumJob.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigIntegrityChecksumJob.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigIntegrityChecksumJob-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigIntegrityChecksumJob.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - 'percentageLimit', - 'timeLimit', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_integrity_job.dart b/mobile/openapi/lib/model/system_config_integrity_job.dart deleted file mode 100644 index 52afcfa187..0000000000 --- a/mobile/openapi/lib/model/system_config_integrity_job.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigIntegrityJob { - /// Returns a new [SystemConfigIntegrityJob] instance. - SystemConfigIntegrityJob({ - required this.cronExpression, - required this.enabled, - }); - - /// Cron expression for when the integrity check should run - String cronExpression; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigIntegrityJob && - other.cronExpression == cronExpression && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigIntegrityJob[cronExpression=$cronExpression, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigIntegrityJob] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigIntegrityJob? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigIntegrityJob"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigIntegrityJob( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigIntegrityJob.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigIntegrityJob.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigIntegrityJob-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigIntegrityJob.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_job_dto.dart b/mobile/openapi/lib/model/system_config_job_dto.dart deleted file mode 100644 index 08b07cc37c..0000000000 --- a/mobile/openapi/lib/model/system_config_job_dto.dart +++ /dev/null @@ -1,211 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigJobDto { - /// Returns a new [SystemConfigJobDto] instance. - SystemConfigJobDto({ - required this.backgroundTask, - required this.editor, - required this.faceDetection, - required this.integrityCheck, - required this.library_, - required this.metadataExtraction, - required this.migration, - required this.notifications, - required this.ocr, - required this.search, - required this.sidecar, - required this.smartSearch, - required this.thumbnailGeneration, - required this.videoConversion, - required this.workflow, - }); - - JobSettingsDto backgroundTask; - - JobSettingsDto editor; - - JobSettingsDto faceDetection; - - JobSettingsDto integrityCheck; - - JobSettingsDto library_; - - JobSettingsDto metadataExtraction; - - JobSettingsDto migration; - - JobSettingsDto notifications; - - JobSettingsDto ocr; - - JobSettingsDto search; - - JobSettingsDto sidecar; - - JobSettingsDto smartSearch; - - JobSettingsDto thumbnailGeneration; - - JobSettingsDto videoConversion; - - JobSettingsDto workflow; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigJobDto && - other.backgroundTask == backgroundTask && - other.editor == editor && - other.faceDetection == faceDetection && - other.integrityCheck == integrityCheck && - other.library_ == library_ && - other.metadataExtraction == metadataExtraction && - other.migration == migration && - other.notifications == notifications && - other.ocr == ocr && - other.search == search && - other.sidecar == sidecar && - other.smartSearch == smartSearch && - other.thumbnailGeneration == thumbnailGeneration && - other.videoConversion == videoConversion && - other.workflow == workflow; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backgroundTask.hashCode) + - (editor.hashCode) + - (faceDetection.hashCode) + - (integrityCheck.hashCode) + - (library_.hashCode) + - (metadataExtraction.hashCode) + - (migration.hashCode) + - (notifications.hashCode) + - (ocr.hashCode) + - (search.hashCode) + - (sidecar.hashCode) + - (smartSearch.hashCode) + - (thumbnailGeneration.hashCode) + - (videoConversion.hashCode) + - (workflow.hashCode); - - @override - String toString() => 'SystemConfigJobDto[backgroundTask=$backgroundTask, editor=$editor, faceDetection=$faceDetection, integrityCheck=$integrityCheck, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, notifications=$notifications, ocr=$ocr, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion, workflow=$workflow]'; - - Map toJson() { - final json = {}; - json[r'backgroundTask'] = this.backgroundTask; - json[r'editor'] = this.editor; - json[r'faceDetection'] = this.faceDetection; - json[r'integrityCheck'] = this.integrityCheck; - json[r'library'] = this.library_; - json[r'metadataExtraction'] = this.metadataExtraction; - json[r'migration'] = this.migration; - json[r'notifications'] = this.notifications; - json[r'ocr'] = this.ocr; - json[r'search'] = this.search; - json[r'sidecar'] = this.sidecar; - json[r'smartSearch'] = this.smartSearch; - json[r'thumbnailGeneration'] = this.thumbnailGeneration; - json[r'videoConversion'] = this.videoConversion; - json[r'workflow'] = this.workflow; - return json; - } - - /// Returns a new [SystemConfigJobDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigJobDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigJobDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigJobDto( - backgroundTask: JobSettingsDto.fromJson(json[r'backgroundTask'])!, - editor: JobSettingsDto.fromJson(json[r'editor'])!, - faceDetection: JobSettingsDto.fromJson(json[r'faceDetection'])!, - integrityCheck: JobSettingsDto.fromJson(json[r'integrityCheck'])!, - library_: JobSettingsDto.fromJson(json[r'library'])!, - metadataExtraction: JobSettingsDto.fromJson(json[r'metadataExtraction'])!, - migration: JobSettingsDto.fromJson(json[r'migration'])!, - notifications: JobSettingsDto.fromJson(json[r'notifications'])!, - ocr: JobSettingsDto.fromJson(json[r'ocr'])!, - search: JobSettingsDto.fromJson(json[r'search'])!, - sidecar: JobSettingsDto.fromJson(json[r'sidecar'])!, - smartSearch: JobSettingsDto.fromJson(json[r'smartSearch'])!, - thumbnailGeneration: JobSettingsDto.fromJson(json[r'thumbnailGeneration'])!, - videoConversion: JobSettingsDto.fromJson(json[r'videoConversion'])!, - workflow: JobSettingsDto.fromJson(json[r'workflow'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigJobDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigJobDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigJobDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigJobDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backgroundTask', - 'editor', - 'faceDetection', - 'integrityCheck', - 'library', - 'metadataExtraction', - 'migration', - 'notifications', - 'ocr', - 'search', - 'sidecar', - 'smartSearch', - 'thumbnailGeneration', - 'videoConversion', - 'workflow', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_library_dto.dart b/mobile/openapi/lib/model/system_config_library_dto.dart deleted file mode 100644 index e728b0bf20..0000000000 --- a/mobile/openapi/lib/model/system_config_library_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigLibraryDto { - /// Returns a new [SystemConfigLibraryDto] instance. - SystemConfigLibraryDto({ - required this.scan, - required this.watch, - }); - - SystemConfigLibraryScanDto scan; - - SystemConfigLibraryWatchDto watch; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLibraryDto && - other.scan == scan && - other.watch == watch; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (scan.hashCode) + - (watch.hashCode); - - @override - String toString() => 'SystemConfigLibraryDto[scan=$scan, watch=$watch]'; - - Map toJson() { - final json = {}; - json[r'scan'] = this.scan; - json[r'watch'] = this.watch; - return json; - } - - /// Returns a new [SystemConfigLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLibraryDto( - scan: SystemConfigLibraryScanDto.fromJson(json[r'scan'])!, - watch: SystemConfigLibraryWatchDto.fromJson(json[r'watch'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'scan', - 'watch', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_library_scan_dto.dart b/mobile/openapi/lib/model/system_config_library_scan_dto.dart deleted file mode 100644 index 003000d2ec..0000000000 --- a/mobile/openapi/lib/model/system_config_library_scan_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigLibraryScanDto { - /// Returns a new [SystemConfigLibraryScanDto] instance. - SystemConfigLibraryScanDto({ - required this.cronExpression, - required this.enabled, - }); - - /// Cron expression - String cronExpression; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLibraryScanDto && - other.cronExpression == cronExpression && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigLibraryScanDto[cronExpression=$cronExpression, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigLibraryScanDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLibraryScanDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLibraryScanDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLibraryScanDto( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLibraryScanDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLibraryScanDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLibraryScanDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLibraryScanDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_library_watch_dto.dart b/mobile/openapi/lib/model/system_config_library_watch_dto.dart deleted file mode 100644 index b4f171bd25..0000000000 --- a/mobile/openapi/lib/model/system_config_library_watch_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigLibraryWatchDto { - /// Returns a new [SystemConfigLibraryWatchDto] instance. - SystemConfigLibraryWatchDto({ - required this.enabled, - }); - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLibraryWatchDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigLibraryWatchDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigLibraryWatchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLibraryWatchDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLibraryWatchDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLibraryWatchDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLibraryWatchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLibraryWatchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLibraryWatchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLibraryWatchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_logging_dto.dart b/mobile/openapi/lib/model/system_config_logging_dto.dart deleted file mode 100644 index 54278893db..0000000000 --- a/mobile/openapi/lib/model/system_config_logging_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigLoggingDto { - /// Returns a new [SystemConfigLoggingDto] instance. - SystemConfigLoggingDto({ - required this.enabled, - required this.level, - }); - - /// Enabled - bool enabled; - - LogLevel level; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLoggingDto && - other.enabled == enabled && - other.level == level; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (level.hashCode); - - @override - String toString() => 'SystemConfigLoggingDto[enabled=$enabled, level=$level]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'level'] = this.level; - return json; - } - - /// Returns a new [SystemConfigLoggingDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLoggingDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLoggingDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLoggingDto( - enabled: mapValueOfType(json, r'enabled')!, - level: LogLevel.fromJson(json[r'level'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLoggingDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLoggingDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLoggingDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLoggingDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'level', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_machine_learning_dto.dart b/mobile/openapi/lib/model/system_config_machine_learning_dto.dart deleted file mode 100644 index 6162e72b8f..0000000000 --- a/mobile/openapi/lib/model/system_config_machine_learning_dto.dart +++ /dev/null @@ -1,151 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigMachineLearningDto { - /// Returns a new [SystemConfigMachineLearningDto] instance. - SystemConfigMachineLearningDto({ - required this.availabilityChecks, - required this.clip, - required this.duplicateDetection, - required this.enabled, - required this.facialRecognition, - required this.ocr, - this.urls = const [], - }); - - MachineLearningAvailabilityChecksDto availabilityChecks; - - CLIPConfig clip; - - DuplicateDetectionConfig duplicateDetection; - - /// Enabled - bool enabled; - - FacialRecognitionConfig facialRecognition; - - OcrConfig ocr; - - /// ML service URLs - List urls; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigMachineLearningDto && - other.availabilityChecks == availabilityChecks && - other.clip == clip && - other.duplicateDetection == duplicateDetection && - other.enabled == enabled && - other.facialRecognition == facialRecognition && - other.ocr == ocr && - _deepEquality.equals(other.urls, urls); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (availabilityChecks.hashCode) + - (clip.hashCode) + - (duplicateDetection.hashCode) + - (enabled.hashCode) + - (facialRecognition.hashCode) + - (ocr.hashCode) + - (urls.hashCode); - - @override - String toString() => 'SystemConfigMachineLearningDto[availabilityChecks=$availabilityChecks, clip=$clip, duplicateDetection=$duplicateDetection, enabled=$enabled, facialRecognition=$facialRecognition, ocr=$ocr, urls=$urls]'; - - Map toJson() { - final json = {}; - json[r'availabilityChecks'] = this.availabilityChecks; - json[r'clip'] = this.clip; - json[r'duplicateDetection'] = this.duplicateDetection; - json[r'enabled'] = this.enabled; - json[r'facialRecognition'] = this.facialRecognition; - json[r'ocr'] = this.ocr; - json[r'urls'] = this.urls; - return json; - } - - /// Returns a new [SystemConfigMachineLearningDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigMachineLearningDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigMachineLearningDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigMachineLearningDto( - availabilityChecks: MachineLearningAvailabilityChecksDto.fromJson(json[r'availabilityChecks'])!, - clip: CLIPConfig.fromJson(json[r'clip'])!, - duplicateDetection: DuplicateDetectionConfig.fromJson(json[r'duplicateDetection'])!, - enabled: mapValueOfType(json, r'enabled')!, - facialRecognition: FacialRecognitionConfig.fromJson(json[r'facialRecognition'])!, - ocr: OcrConfig.fromJson(json[r'ocr'])!, - urls: json[r'urls'] is Iterable - ? (json[r'urls'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigMachineLearningDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigMachineLearningDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigMachineLearningDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigMachineLearningDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'availabilityChecks', - 'clip', - 'duplicateDetection', - 'enabled', - 'facialRecognition', - 'ocr', - 'urls', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_map_dto.dart b/mobile/openapi/lib/model/system_config_map_dto.dart deleted file mode 100644 index 7a2fbb516b..0000000000 --- a/mobile/openapi/lib/model/system_config_map_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigMapDto { - /// Returns a new [SystemConfigMapDto] instance. - SystemConfigMapDto({ - required this.darkStyle, - required this.enabled, - required this.lightStyle, - }); - - /// Dark map style URL - String darkStyle; - - /// Enabled - bool enabled; - - /// Light map style URL - String lightStyle; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigMapDto && - other.darkStyle == darkStyle && - other.enabled == enabled && - other.lightStyle == lightStyle; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (darkStyle.hashCode) + - (enabled.hashCode) + - (lightStyle.hashCode); - - @override - String toString() => 'SystemConfigMapDto[darkStyle=$darkStyle, enabled=$enabled, lightStyle=$lightStyle]'; - - Map toJson() { - final json = {}; - json[r'darkStyle'] = this.darkStyle; - json[r'enabled'] = this.enabled; - json[r'lightStyle'] = this.lightStyle; - return json; - } - - /// Returns a new [SystemConfigMapDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigMapDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigMapDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigMapDto( - darkStyle: mapValueOfType(json, r'darkStyle')!, - enabled: mapValueOfType(json, r'enabled')!, - lightStyle: mapValueOfType(json, r'lightStyle')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigMapDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigMapDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigMapDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigMapDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'darkStyle', - 'enabled', - 'lightStyle', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_metadata_dto.dart b/mobile/openapi/lib/model/system_config_metadata_dto.dart deleted file mode 100644 index 3c32fc551d..0000000000 --- a/mobile/openapi/lib/model/system_config_metadata_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigMetadataDto { - /// Returns a new [SystemConfigMetadataDto] instance. - SystemConfigMetadataDto({ - required this.faces, - }); - - SystemConfigFacesDto faces; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigMetadataDto && - other.faces == faces; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (faces.hashCode); - - @override - String toString() => 'SystemConfigMetadataDto[faces=$faces]'; - - Map toJson() { - final json = {}; - json[r'faces'] = this.faces; - return json; - } - - /// Returns a new [SystemConfigMetadataDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigMetadataDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigMetadataDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigMetadataDto( - faces: SystemConfigFacesDto.fromJson(json[r'faces'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigMetadataDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigMetadataDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigMetadataDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigMetadataDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'faces', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_new_version_check_dto.dart b/mobile/openapi/lib/model/system_config_new_version_check_dto.dart deleted file mode 100644 index 17ae9577e8..0000000000 --- a/mobile/openapi/lib/model/system_config_new_version_check_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigNewVersionCheckDto { - /// Returns a new [SystemConfigNewVersionCheckDto] instance. - SystemConfigNewVersionCheckDto({ - required this.channel, - required this.enabled, - }); - - ReleaseChannel channel; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigNewVersionCheckDto && - other.channel == channel && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (channel.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigNewVersionCheckDto[channel=$channel, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'channel'] = this.channel; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigNewVersionCheckDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigNewVersionCheckDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigNewVersionCheckDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigNewVersionCheckDto( - channel: ReleaseChannel.fromJson(json[r'channel'])!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigNewVersionCheckDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigNewVersionCheckDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigNewVersionCheckDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigNewVersionCheckDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'channel', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart b/mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart deleted file mode 100644 index 4838c86065..0000000000 --- a/mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigNightlyTasksDto { - /// Returns a new [SystemConfigNightlyTasksDto] instance. - SystemConfigNightlyTasksDto({ - required this.clusterNewFaces, - required this.databaseCleanup, - required this.generateMemories, - required this.missingThumbnails, - required this.startTime, - required this.syncQuotaUsage, - }); - - /// Cluster new faces - bool clusterNewFaces; - - /// Database cleanup - bool databaseCleanup; - - /// Generate memories - bool generateMemories; - - /// Missing thumbnails - bool missingThumbnails; - - /// Start time (HH:MM) - String startTime; - - /// Sync quota usage - bool syncQuotaUsage; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigNightlyTasksDto && - other.clusterNewFaces == clusterNewFaces && - other.databaseCleanup == databaseCleanup && - other.generateMemories == generateMemories && - other.missingThumbnails == missingThumbnails && - other.startTime == startTime && - other.syncQuotaUsage == syncQuotaUsage; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (clusterNewFaces.hashCode) + - (databaseCleanup.hashCode) + - (generateMemories.hashCode) + - (missingThumbnails.hashCode) + - (startTime.hashCode) + - (syncQuotaUsage.hashCode); - - @override - String toString() => 'SystemConfigNightlyTasksDto[clusterNewFaces=$clusterNewFaces, databaseCleanup=$databaseCleanup, generateMemories=$generateMemories, missingThumbnails=$missingThumbnails, startTime=$startTime, syncQuotaUsage=$syncQuotaUsage]'; - - Map toJson() { - final json = {}; - json[r'clusterNewFaces'] = this.clusterNewFaces; - json[r'databaseCleanup'] = this.databaseCleanup; - json[r'generateMemories'] = this.generateMemories; - json[r'missingThumbnails'] = this.missingThumbnails; - json[r'startTime'] = this.startTime; - json[r'syncQuotaUsage'] = this.syncQuotaUsage; - return json; - } - - /// Returns a new [SystemConfigNightlyTasksDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigNightlyTasksDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigNightlyTasksDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigNightlyTasksDto( - clusterNewFaces: mapValueOfType(json, r'clusterNewFaces')!, - databaseCleanup: mapValueOfType(json, r'databaseCleanup')!, - generateMemories: mapValueOfType(json, r'generateMemories')!, - missingThumbnails: mapValueOfType(json, r'missingThumbnails')!, - startTime: mapValueOfType(json, r'startTime')!, - syncQuotaUsage: mapValueOfType(json, r'syncQuotaUsage')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigNightlyTasksDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigNightlyTasksDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigNightlyTasksDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigNightlyTasksDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'clusterNewFaces', - 'databaseCleanup', - 'generateMemories', - 'missingThumbnails', - 'startTime', - 'syncQuotaUsage', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_notifications_dto.dart b/mobile/openapi/lib/model/system_config_notifications_dto.dart deleted file mode 100644 index 35d3d31833..0000000000 --- a/mobile/openapi/lib/model/system_config_notifications_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigNotificationsDto { - /// Returns a new [SystemConfigNotificationsDto] instance. - SystemConfigNotificationsDto({ - required this.smtp, - }); - - SystemConfigSmtpDto smtp; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigNotificationsDto && - other.smtp == smtp; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (smtp.hashCode); - - @override - String toString() => 'SystemConfigNotificationsDto[smtp=$smtp]'; - - Map toJson() { - final json = {}; - json[r'smtp'] = this.smtp; - return json; - } - - /// Returns a new [SystemConfigNotificationsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigNotificationsDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigNotificationsDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigNotificationsDto( - smtp: SystemConfigSmtpDto.fromJson(json[r'smtp'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigNotificationsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigNotificationsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigNotificationsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigNotificationsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'smtp', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_o_auth_dto.dart b/mobile/openapi/lib/model/system_config_o_auth_dto.dart deleted file mode 100644 index 44eefe605c..0000000000 --- a/mobile/openapi/lib/model/system_config_o_auth_dto.dart +++ /dev/null @@ -1,289 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigOAuthDto { - /// Returns a new [SystemConfigOAuthDto] instance. - SystemConfigOAuthDto({ - required this.allowInsecureRequests, - required this.autoLaunch, - required this.autoRegister, - required this.buttonText, - required this.clientId, - required this.clientSecret, - required this.defaultStorageQuota, - required this.enabled, - required this.endSessionEndpoint, - required this.issuerUrl, - required this.mobileOverrideEnabled, - required this.mobileRedirectUri, - required this.profileSigningAlgorithm, - required this.prompt, - required this.roleClaim, - required this.scope, - required this.signingAlgorithm, - required this.storageLabelClaim, - required this.storageQuotaClaim, - required this.timeout, - required this.tokenEndpointAuthMethod, - }); - - /// Allow insecure requests - bool allowInsecureRequests; - - /// Auto launch - bool autoLaunch; - - /// Auto register - bool autoRegister; - - /// Button text - String buttonText; - - /// Client ID - String clientId; - - /// Client secret - String clientSecret; - - /// Default storage quota - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? defaultStorageQuota; - - /// Enabled - bool enabled; - - /// End session endpoint - String endSessionEndpoint; - - /// Issuer URL - String issuerUrl; - - /// Mobile override enabled - bool mobileOverrideEnabled; - - /// Mobile redirect URI (set to empty string to disable) - String mobileRedirectUri; - - /// Profile signing algorithm - String profileSigningAlgorithm; - - /// OAuth prompt parameter (e.g. select_account, login, consent) - String prompt; - - /// Role claim - String roleClaim; - - /// Scope - String scope; - - /// Signing algorithm - String signingAlgorithm; - - /// Storage label claim - String storageLabelClaim; - - /// Storage quota claim - String storageQuotaClaim; - - /// Timeout - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int timeout; - - OAuthTokenEndpointAuthMethod tokenEndpointAuthMethod; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigOAuthDto && - other.allowInsecureRequests == allowInsecureRequests && - other.autoLaunch == autoLaunch && - other.autoRegister == autoRegister && - other.buttonText == buttonText && - other.clientId == clientId && - other.clientSecret == clientSecret && - other.defaultStorageQuota == defaultStorageQuota && - other.enabled == enabled && - other.endSessionEndpoint == endSessionEndpoint && - other.issuerUrl == issuerUrl && - other.mobileOverrideEnabled == mobileOverrideEnabled && - other.mobileRedirectUri == mobileRedirectUri && - other.profileSigningAlgorithm == profileSigningAlgorithm && - other.prompt == prompt && - other.roleClaim == roleClaim && - other.scope == scope && - other.signingAlgorithm == signingAlgorithm && - other.storageLabelClaim == storageLabelClaim && - other.storageQuotaClaim == storageQuotaClaim && - other.timeout == timeout && - other.tokenEndpointAuthMethod == tokenEndpointAuthMethod; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (allowInsecureRequests.hashCode) + - (autoLaunch.hashCode) + - (autoRegister.hashCode) + - (buttonText.hashCode) + - (clientId.hashCode) + - (clientSecret.hashCode) + - (defaultStorageQuota == null ? 0 : defaultStorageQuota!.hashCode) + - (enabled.hashCode) + - (endSessionEndpoint.hashCode) + - (issuerUrl.hashCode) + - (mobileOverrideEnabled.hashCode) + - (mobileRedirectUri.hashCode) + - (profileSigningAlgorithm.hashCode) + - (prompt.hashCode) + - (roleClaim.hashCode) + - (scope.hashCode) + - (signingAlgorithm.hashCode) + - (storageLabelClaim.hashCode) + - (storageQuotaClaim.hashCode) + - (timeout.hashCode) + - (tokenEndpointAuthMethod.hashCode); - - @override - String toString() => 'SystemConfigOAuthDto[allowInsecureRequests=$allowInsecureRequests, autoLaunch=$autoLaunch, autoRegister=$autoRegister, buttonText=$buttonText, clientId=$clientId, clientSecret=$clientSecret, defaultStorageQuota=$defaultStorageQuota, enabled=$enabled, endSessionEndpoint=$endSessionEndpoint, issuerUrl=$issuerUrl, mobileOverrideEnabled=$mobileOverrideEnabled, mobileRedirectUri=$mobileRedirectUri, profileSigningAlgorithm=$profileSigningAlgorithm, prompt=$prompt, roleClaim=$roleClaim, scope=$scope, signingAlgorithm=$signingAlgorithm, storageLabelClaim=$storageLabelClaim, storageQuotaClaim=$storageQuotaClaim, timeout=$timeout, tokenEndpointAuthMethod=$tokenEndpointAuthMethod]'; - - Map toJson() { - final json = {}; - json[r'allowInsecureRequests'] = this.allowInsecureRequests; - json[r'autoLaunch'] = this.autoLaunch; - json[r'autoRegister'] = this.autoRegister; - json[r'buttonText'] = this.buttonText; - json[r'clientId'] = this.clientId; - json[r'clientSecret'] = this.clientSecret; - if (this.defaultStorageQuota != null) { - json[r'defaultStorageQuota'] = this.defaultStorageQuota; - } else { - json[r'defaultStorageQuota'] = null; - } - json[r'enabled'] = this.enabled; - json[r'endSessionEndpoint'] = this.endSessionEndpoint; - json[r'issuerUrl'] = this.issuerUrl; - json[r'mobileOverrideEnabled'] = this.mobileOverrideEnabled; - json[r'mobileRedirectUri'] = this.mobileRedirectUri; - json[r'profileSigningAlgorithm'] = this.profileSigningAlgorithm; - json[r'prompt'] = this.prompt; - json[r'roleClaim'] = this.roleClaim; - json[r'scope'] = this.scope; - json[r'signingAlgorithm'] = this.signingAlgorithm; - json[r'storageLabelClaim'] = this.storageLabelClaim; - json[r'storageQuotaClaim'] = this.storageQuotaClaim; - json[r'timeout'] = this.timeout; - json[r'tokenEndpointAuthMethod'] = this.tokenEndpointAuthMethod; - return json; - } - - /// Returns a new [SystemConfigOAuthDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigOAuthDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigOAuthDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigOAuthDto( - allowInsecureRequests: mapValueOfType(json, r'allowInsecureRequests')!, - autoLaunch: mapValueOfType(json, r'autoLaunch')!, - autoRegister: mapValueOfType(json, r'autoRegister')!, - buttonText: mapValueOfType(json, r'buttonText')!, - clientId: mapValueOfType(json, r'clientId')!, - clientSecret: mapValueOfType(json, r'clientSecret')!, - defaultStorageQuota: mapValueOfType(json, r'defaultStorageQuota'), - enabled: mapValueOfType(json, r'enabled')!, - endSessionEndpoint: mapValueOfType(json, r'endSessionEndpoint')!, - issuerUrl: mapValueOfType(json, r'issuerUrl')!, - mobileOverrideEnabled: mapValueOfType(json, r'mobileOverrideEnabled')!, - mobileRedirectUri: mapValueOfType(json, r'mobileRedirectUri')!, - profileSigningAlgorithm: mapValueOfType(json, r'profileSigningAlgorithm')!, - prompt: mapValueOfType(json, r'prompt')!, - roleClaim: mapValueOfType(json, r'roleClaim')!, - scope: mapValueOfType(json, r'scope')!, - signingAlgorithm: mapValueOfType(json, r'signingAlgorithm')!, - storageLabelClaim: mapValueOfType(json, r'storageLabelClaim')!, - storageQuotaClaim: mapValueOfType(json, r'storageQuotaClaim')!, - timeout: mapValueOfType(json, r'timeout')!, - tokenEndpointAuthMethod: OAuthTokenEndpointAuthMethod.fromJson(json[r'tokenEndpointAuthMethod'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigOAuthDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigOAuthDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigOAuthDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigOAuthDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'allowInsecureRequests', - 'autoLaunch', - 'autoRegister', - 'buttonText', - 'clientId', - 'clientSecret', - 'defaultStorageQuota', - 'enabled', - 'endSessionEndpoint', - 'issuerUrl', - 'mobileOverrideEnabled', - 'mobileRedirectUri', - 'profileSigningAlgorithm', - 'prompt', - 'roleClaim', - 'scope', - 'signingAlgorithm', - 'storageLabelClaim', - 'storageQuotaClaim', - 'timeout', - 'tokenEndpointAuthMethod', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_password_login_dto.dart b/mobile/openapi/lib/model/system_config_password_login_dto.dart deleted file mode 100644 index 1328a6acaa..0000000000 --- a/mobile/openapi/lib/model/system_config_password_login_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigPasswordLoginDto { - /// Returns a new [SystemConfigPasswordLoginDto] instance. - SystemConfigPasswordLoginDto({ - required this.enabled, - }); - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigPasswordLoginDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigPasswordLoginDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigPasswordLoginDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigPasswordLoginDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigPasswordLoginDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigPasswordLoginDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigPasswordLoginDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigPasswordLoginDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigPasswordLoginDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigPasswordLoginDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart b/mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart deleted file mode 100644 index 0374e19be1..0000000000 --- a/mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigReverseGeocodingDto { - /// Returns a new [SystemConfigReverseGeocodingDto] instance. - SystemConfigReverseGeocodingDto({ - required this.enabled, - }); - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigReverseGeocodingDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigReverseGeocodingDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigReverseGeocodingDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigReverseGeocodingDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigReverseGeocodingDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigReverseGeocodingDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigReverseGeocodingDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigReverseGeocodingDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigReverseGeocodingDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigReverseGeocodingDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_server_dto.dart b/mobile/openapi/lib/model/system_config_server_dto.dart deleted file mode 100644 index 200f75f7c6..0000000000 --- a/mobile/openapi/lib/model/system_config_server_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigServerDto { - /// Returns a new [SystemConfigServerDto] instance. - SystemConfigServerDto({ - required this.externalDomain, - required this.loginPageMessage, - required this.publicUsers, - }); - - /// External domain - String externalDomain; - - /// Login page message - String loginPageMessage; - - /// Public users - bool publicUsers; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigServerDto && - other.externalDomain == externalDomain && - other.loginPageMessage == loginPageMessage && - other.publicUsers == publicUsers; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (externalDomain.hashCode) + - (loginPageMessage.hashCode) + - (publicUsers.hashCode); - - @override - String toString() => 'SystemConfigServerDto[externalDomain=$externalDomain, loginPageMessage=$loginPageMessage, publicUsers=$publicUsers]'; - - Map toJson() { - final json = {}; - json[r'externalDomain'] = this.externalDomain; - json[r'loginPageMessage'] = this.loginPageMessage; - json[r'publicUsers'] = this.publicUsers; - return json; - } - - /// Returns a new [SystemConfigServerDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigServerDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigServerDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigServerDto( - externalDomain: mapValueOfType(json, r'externalDomain')!, - loginPageMessage: mapValueOfType(json, r'loginPageMessage')!, - publicUsers: mapValueOfType(json, r'publicUsers')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigServerDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigServerDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigServerDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigServerDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'externalDomain', - 'loginPageMessage', - 'publicUsers', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_smtp_dto.dart b/mobile/openapi/lib/model/system_config_smtp_dto.dart deleted file mode 100644 index a3d14cda63..0000000000 --- a/mobile/openapi/lib/model/system_config_smtp_dto.dart +++ /dev/null @@ -1,126 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigSmtpDto { - /// Returns a new [SystemConfigSmtpDto] instance. - SystemConfigSmtpDto({ - required this.enabled, - required this.from, - required this.replyTo, - required this.transport, - }); - - /// Whether SMTP email notifications are enabled - bool enabled; - - /// Email address to send from - String from; - - /// Email address for replies - String replyTo; - - SystemConfigSmtpTransportDto transport; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigSmtpDto && - other.enabled == enabled && - other.from == from && - other.replyTo == replyTo && - other.transport == transport; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (from.hashCode) + - (replyTo.hashCode) + - (transport.hashCode); - - @override - String toString() => 'SystemConfigSmtpDto[enabled=$enabled, from=$from, replyTo=$replyTo, transport=$transport]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'from'] = this.from; - json[r'replyTo'] = this.replyTo; - json[r'transport'] = this.transport; - return json; - } - - /// Returns a new [SystemConfigSmtpDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigSmtpDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigSmtpDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigSmtpDto( - enabled: mapValueOfType(json, r'enabled')!, - from: mapValueOfType(json, r'from')!, - replyTo: mapValueOfType(json, r'replyTo')!, - transport: SystemConfigSmtpTransportDto.fromJson(json[r'transport'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigSmtpDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigSmtpDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigSmtpDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigSmtpDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'from', - 'replyTo', - 'transport', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_smtp_transport_dto.dart b/mobile/openapi/lib/model/system_config_smtp_transport_dto.dart deleted file mode 100644 index 266e3f3c86..0000000000 --- a/mobile/openapi/lib/model/system_config_smtp_transport_dto.dart +++ /dev/null @@ -1,148 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigSmtpTransportDto { - /// Returns a new [SystemConfigSmtpTransportDto] instance. - SystemConfigSmtpTransportDto({ - required this.host, - required this.ignoreCert, - required this.password, - required this.port, - required this.secure, - required this.username, - }); - - /// SMTP server hostname - String host; - - /// Whether to ignore SSL certificate errors - bool ignoreCert; - - /// SMTP password - String password; - - /// SMTP server port - /// - /// Minimum value: 0 - /// Maximum value: 65535 - int port; - - /// Whether to use secure connection (TLS/SSL) - bool secure; - - /// SMTP username - String username; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigSmtpTransportDto && - other.host == host && - other.ignoreCert == ignoreCert && - other.password == password && - other.port == port && - other.secure == secure && - other.username == username; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (host.hashCode) + - (ignoreCert.hashCode) + - (password.hashCode) + - (port.hashCode) + - (secure.hashCode) + - (username.hashCode); - - @override - String toString() => 'SystemConfigSmtpTransportDto[host=$host, ignoreCert=$ignoreCert, password=$password, port=$port, secure=$secure, username=$username]'; - - Map toJson() { - final json = {}; - json[r'host'] = this.host; - json[r'ignoreCert'] = this.ignoreCert; - json[r'password'] = this.password; - json[r'port'] = this.port; - json[r'secure'] = this.secure; - json[r'username'] = this.username; - return json; - } - - /// Returns a new [SystemConfigSmtpTransportDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigSmtpTransportDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigSmtpTransportDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigSmtpTransportDto( - host: mapValueOfType(json, r'host')!, - ignoreCert: mapValueOfType(json, r'ignoreCert')!, - password: mapValueOfType(json, r'password')!, - port: mapValueOfType(json, r'port')!, - secure: mapValueOfType(json, r'secure')!, - username: mapValueOfType(json, r'username')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigSmtpTransportDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigSmtpTransportDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigSmtpTransportDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigSmtpTransportDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'host', - 'ignoreCert', - 'password', - 'port', - 'secure', - 'username', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_storage_template_dto.dart b/mobile/openapi/lib/model/system_config_storage_template_dto.dart deleted file mode 100644 index f9f37e48ad..0000000000 --- a/mobile/openapi/lib/model/system_config_storage_template_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigStorageTemplateDto { - /// Returns a new [SystemConfigStorageTemplateDto] instance. - SystemConfigStorageTemplateDto({ - required this.enabled, - required this.hashVerificationEnabled, - required this.template, - }); - - /// Enabled - bool enabled; - - /// Hash verification enabled - bool hashVerificationEnabled; - - /// Template - String template; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigStorageTemplateDto && - other.enabled == enabled && - other.hashVerificationEnabled == hashVerificationEnabled && - other.template == template; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (hashVerificationEnabled.hashCode) + - (template.hashCode); - - @override - String toString() => 'SystemConfigStorageTemplateDto[enabled=$enabled, hashVerificationEnabled=$hashVerificationEnabled, template=$template]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'hashVerificationEnabled'] = this.hashVerificationEnabled; - json[r'template'] = this.template; - return json; - } - - /// Returns a new [SystemConfigStorageTemplateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigStorageTemplateDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigStorageTemplateDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigStorageTemplateDto( - enabled: mapValueOfType(json, r'enabled')!, - hashVerificationEnabled: mapValueOfType(json, r'hashVerificationEnabled')!, - template: mapValueOfType(json, r'template')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigStorageTemplateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigStorageTemplateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigStorageTemplateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigStorageTemplateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'hashVerificationEnabled', - 'template', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_template_emails_dto.dart b/mobile/openapi/lib/model/system_config_template_emails_dto.dart deleted file mode 100644 index d29ca1fac3..0000000000 --- a/mobile/openapi/lib/model/system_config_template_emails_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigTemplateEmailsDto { - /// Returns a new [SystemConfigTemplateEmailsDto] instance. - SystemConfigTemplateEmailsDto({ - required this.albumInviteTemplate, - required this.albumUpdateTemplate, - required this.welcomeTemplate, - }); - - /// Album invite template - String albumInviteTemplate; - - /// Album update template - String albumUpdateTemplate; - - /// Welcome template - String welcomeTemplate; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplateEmailsDto && - other.albumInviteTemplate == albumInviteTemplate && - other.albumUpdateTemplate == albumUpdateTemplate && - other.welcomeTemplate == welcomeTemplate; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumInviteTemplate.hashCode) + - (albumUpdateTemplate.hashCode) + - (welcomeTemplate.hashCode); - - @override - String toString() => 'SystemConfigTemplateEmailsDto[albumInviteTemplate=$albumInviteTemplate, albumUpdateTemplate=$albumUpdateTemplate, welcomeTemplate=$welcomeTemplate]'; - - Map toJson() { - final json = {}; - json[r'albumInviteTemplate'] = this.albumInviteTemplate; - json[r'albumUpdateTemplate'] = this.albumUpdateTemplate; - json[r'welcomeTemplate'] = this.welcomeTemplate; - return json; - } - - /// Returns a new [SystemConfigTemplateEmailsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTemplateEmailsDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTemplateEmailsDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTemplateEmailsDto( - albumInviteTemplate: mapValueOfType(json, r'albumInviteTemplate')!, - albumUpdateTemplate: mapValueOfType(json, r'albumUpdateTemplate')!, - welcomeTemplate: mapValueOfType(json, r'welcomeTemplate')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTemplateEmailsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTemplateEmailsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTemplateEmailsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTemplateEmailsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumInviteTemplate', - 'albumUpdateTemplate', - 'welcomeTemplate', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart b/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart deleted file mode 100644 index 6f81513039..0000000000 --- a/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart +++ /dev/null @@ -1,179 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigTemplateStorageOptionDto { - /// Returns a new [SystemConfigTemplateStorageOptionDto] instance. - SystemConfigTemplateStorageOptionDto({ - this.dayOptions = const [], - this.hourOptions = const [], - this.minuteOptions = const [], - this.monthOptions = const [], - this.presetOptions = const [], - this.secondOptions = const [], - this.weekOptions = const [], - this.yearOptions = const [], - }); - - /// Available day format options for storage template - List dayOptions; - - /// Available hour format options for storage template - List hourOptions; - - /// Available minute format options for storage template - List minuteOptions; - - /// Available month format options for storage template - List monthOptions; - - /// Available preset template options - List presetOptions; - - /// Available second format options for storage template - List secondOptions; - - /// Available week format options for storage template - List weekOptions; - - /// Available year format options for storage template - List yearOptions; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplateStorageOptionDto && - _deepEquality.equals(other.dayOptions, dayOptions) && - _deepEquality.equals(other.hourOptions, hourOptions) && - _deepEquality.equals(other.minuteOptions, minuteOptions) && - _deepEquality.equals(other.monthOptions, monthOptions) && - _deepEquality.equals(other.presetOptions, presetOptions) && - _deepEquality.equals(other.secondOptions, secondOptions) && - _deepEquality.equals(other.weekOptions, weekOptions) && - _deepEquality.equals(other.yearOptions, yearOptions); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (dayOptions.hashCode) + - (hourOptions.hashCode) + - (minuteOptions.hashCode) + - (monthOptions.hashCode) + - (presetOptions.hashCode) + - (secondOptions.hashCode) + - (weekOptions.hashCode) + - (yearOptions.hashCode); - - @override - String toString() => 'SystemConfigTemplateStorageOptionDto[dayOptions=$dayOptions, hourOptions=$hourOptions, minuteOptions=$minuteOptions, monthOptions=$monthOptions, presetOptions=$presetOptions, secondOptions=$secondOptions, weekOptions=$weekOptions, yearOptions=$yearOptions]'; - - Map toJson() { - final json = {}; - json[r'dayOptions'] = this.dayOptions; - json[r'hourOptions'] = this.hourOptions; - json[r'minuteOptions'] = this.minuteOptions; - json[r'monthOptions'] = this.monthOptions; - json[r'presetOptions'] = this.presetOptions; - json[r'secondOptions'] = this.secondOptions; - json[r'weekOptions'] = this.weekOptions; - json[r'yearOptions'] = this.yearOptions; - return json; - } - - /// Returns a new [SystemConfigTemplateStorageOptionDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTemplateStorageOptionDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTemplateStorageOptionDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTemplateStorageOptionDto( - dayOptions: json[r'dayOptions'] is Iterable - ? (json[r'dayOptions'] as Iterable).cast().toList(growable: false) - : const [], - hourOptions: json[r'hourOptions'] is Iterable - ? (json[r'hourOptions'] as Iterable).cast().toList(growable: false) - : const [], - minuteOptions: json[r'minuteOptions'] is Iterable - ? (json[r'minuteOptions'] as Iterable).cast().toList(growable: false) - : const [], - monthOptions: json[r'monthOptions'] is Iterable - ? (json[r'monthOptions'] as Iterable).cast().toList(growable: false) - : const [], - presetOptions: json[r'presetOptions'] is Iterable - ? (json[r'presetOptions'] as Iterable).cast().toList(growable: false) - : const [], - secondOptions: json[r'secondOptions'] is Iterable - ? (json[r'secondOptions'] as Iterable).cast().toList(growable: false) - : const [], - weekOptions: json[r'weekOptions'] is Iterable - ? (json[r'weekOptions'] as Iterable).cast().toList(growable: false) - : const [], - yearOptions: json[r'yearOptions'] is Iterable - ? (json[r'yearOptions'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTemplateStorageOptionDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTemplateStorageOptionDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTemplateStorageOptionDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTemplateStorageOptionDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'dayOptions', - 'hourOptions', - 'minuteOptions', - 'monthOptions', - 'presetOptions', - 'secondOptions', - 'weekOptions', - 'yearOptions', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_templates_dto.dart b/mobile/openapi/lib/model/system_config_templates_dto.dart deleted file mode 100644 index a5e8834978..0000000000 --- a/mobile/openapi/lib/model/system_config_templates_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigTemplatesDto { - /// Returns a new [SystemConfigTemplatesDto] instance. - SystemConfigTemplatesDto({ - required this.email, - }); - - SystemConfigTemplateEmailsDto email; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplatesDto && - other.email == email; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (email.hashCode); - - @override - String toString() => 'SystemConfigTemplatesDto[email=$email]'; - - Map toJson() { - final json = {}; - json[r'email'] = this.email; - return json; - } - - /// Returns a new [SystemConfigTemplatesDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTemplatesDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTemplatesDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTemplatesDto( - email: SystemConfigTemplateEmailsDto.fromJson(json[r'email'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTemplatesDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTemplatesDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTemplatesDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTemplatesDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_theme_dto.dart b/mobile/openapi/lib/model/system_config_theme_dto.dart deleted file mode 100644 index fca38f71fb..0000000000 --- a/mobile/openapi/lib/model/system_config_theme_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigThemeDto { - /// Returns a new [SystemConfigThemeDto] instance. - SystemConfigThemeDto({ - required this.customCss, - }); - - /// Custom CSS for theming - String customCss; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigThemeDto && - other.customCss == customCss; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (customCss.hashCode); - - @override - String toString() => 'SystemConfigThemeDto[customCss=$customCss]'; - - Map toJson() { - final json = {}; - json[r'customCss'] = this.customCss; - return json; - } - - /// Returns a new [SystemConfigThemeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigThemeDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigThemeDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigThemeDto( - customCss: mapValueOfType(json, r'customCss')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigThemeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigThemeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigThemeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigThemeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'customCss', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_trash_dto.dart b/mobile/openapi/lib/model/system_config_trash_dto.dart deleted file mode 100644 index 790710751f..0000000000 --- a/mobile/openapi/lib/model/system_config_trash_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigTrashDto { - /// Returns a new [SystemConfigTrashDto] instance. - SystemConfigTrashDto({ - required this.days, - required this.enabled, - }); - - /// Days - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int days; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTrashDto && - other.days == days && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (days.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigTrashDto[days=$days, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'days'] = this.days; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigTrashDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTrashDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTrashDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTrashDto( - days: mapValueOfType(json, r'days')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTrashDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTrashDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTrashDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTrashDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'days', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_user_dto.dart b/mobile/openapi/lib/model/system_config_user_dto.dart deleted file mode 100644 index dc553e7369..0000000000 --- a/mobile/openapi/lib/model/system_config_user_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigUserDto { - /// Returns a new [SystemConfigUserDto] instance. - SystemConfigUserDto({ - required this.deleteDelay, - }); - - /// Delete delay - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int deleteDelay; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigUserDto && - other.deleteDelay == deleteDelay; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (deleteDelay.hashCode); - - @override - String toString() => 'SystemConfigUserDto[deleteDelay=$deleteDelay]'; - - Map toJson() { - final json = {}; - json[r'deleteDelay'] = this.deleteDelay; - return json; - } - - /// Returns a new [SystemConfigUserDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigUserDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigUserDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigUserDto( - deleteDelay: mapValueOfType(json, r'deleteDelay')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigUserDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigUserDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigUserDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigUserDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'deleteDelay', - }; -} - diff --git a/mobile/openapi/lib/model/tag_bulk_assets_dto.dart b/mobile/openapi/lib/model/tag_bulk_assets_dto.dart deleted file mode 100644 index 16abc3bcdc..0000000000 --- a/mobile/openapi/lib/model/tag_bulk_assets_dto.dart +++ /dev/null @@ -1,113 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagBulkAssetsDto { - /// Returns a new [TagBulkAssetsDto] instance. - TagBulkAssetsDto({ - this.assetIds = const [], - this.tagIds = const [], - }); - - /// Asset IDs - List assetIds; - - /// Tag IDs - List tagIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagBulkAssetsDto && - _deepEquality.equals(other.assetIds, assetIds) && - _deepEquality.equals(other.tagIds, tagIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (tagIds.hashCode); - - @override - String toString() => 'TagBulkAssetsDto[assetIds=$assetIds, tagIds=$tagIds]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - json[r'tagIds'] = this.tagIds; - return json; - } - - /// Returns a new [TagBulkAssetsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagBulkAssetsDto? fromJson(dynamic value) { - upgradeDto(value, "TagBulkAssetsDto"); - if (value is Map) { - final json = value.cast(); - - return TagBulkAssetsDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - tagIds: json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagBulkAssetsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagBulkAssetsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagBulkAssetsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagBulkAssetsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - 'tagIds', - }; -} - diff --git a/mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart b/mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart deleted file mode 100644 index 4d689f01a1..0000000000 --- a/mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagBulkAssetsResponseDto { - /// Returns a new [TagBulkAssetsResponseDto] instance. - TagBulkAssetsResponseDto({ - required this.count, - }); - - /// Number of assets tagged - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int count; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagBulkAssetsResponseDto && - other.count == count; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode); - - @override - String toString() => 'TagBulkAssetsResponseDto[count=$count]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - return json; - } - - /// Returns a new [TagBulkAssetsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagBulkAssetsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TagBulkAssetsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TagBulkAssetsResponseDto( - count: mapValueOfType(json, r'count')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagBulkAssetsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagBulkAssetsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagBulkAssetsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagBulkAssetsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - }; -} - diff --git a/mobile/openapi/lib/model/tag_create_dto.dart b/mobile/openapi/lib/model/tag_create_dto.dart deleted file mode 100644 index e46f3fc8b6..0000000000 --- a/mobile/openapi/lib/model/tag_create_dto.dart +++ /dev/null @@ -1,122 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagCreateDto { - /// Returns a new [TagCreateDto] instance. - TagCreateDto({ - this.color = const Optional.absent(), - required this.name, - this.parentId = const Optional.absent(), - }); - - /// Tag color (hex) - Optional color; - - /// Tag name - String name; - - /// Parent tag ID - Optional parentId; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagCreateDto && - other.color == color && - other.name == name && - other.parentId == parentId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode) + - (name.hashCode) + - (parentId == null ? 0 : parentId!.hashCode); - - @override - String toString() => 'TagCreateDto[color=$color, name=$name, parentId=$parentId]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - json[r'name'] = this.name; - if (this.parentId.isPresent) { - final value = this.parentId.value; - json[r'parentId'] = value; - } - return json; - } - - /// Returns a new [TagCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagCreateDto? fromJson(dynamic value) { - upgradeDto(value, "TagCreateDto"); - if (value is Map) { - final json = value.cast(); - - return TagCreateDto( - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - name: mapValueOfType(json, r'name')!, - parentId: json.containsKey(r'parentId') ? Optional.present(mapValueOfType(json, r'parentId')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/tag_response_dto.dart b/mobile/openapi/lib/model/tag_response_dto.dart deleted file mode 100644 index 79a89f6d33..0000000000 --- a/mobile/openapi/lib/model/tag_response_dto.dart +++ /dev/null @@ -1,170 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagResponseDto { - /// Returns a new [TagResponseDto] instance. - TagResponseDto({ - this.color = const Optional.absent(), - required this.createdAt, - required this.id, - required this.name, - this.parentId = const Optional.absent(), - required this.updatedAt, - required this.value, - }); - - /// Tag color (hex) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional color; - - /// Creation date - DateTime createdAt; - - /// Tag ID - String id; - - /// Tag name - String name; - - /// Parent tag ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional parentId; - - /// Last update date - DateTime updatedAt; - - /// Tag value (full path) - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagResponseDto && - other.color == color && - other.createdAt == createdAt && - other.id == id && - other.name == name && - other.parentId == parentId && - other.updatedAt == updatedAt && - other.value == value; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode) + - (createdAt.hashCode) + - (id.hashCode) + - (name.hashCode) + - (parentId == null ? 0 : parentId!.hashCode) + - (updatedAt.hashCode) + - (value.hashCode); - - @override - String toString() => 'TagResponseDto[color=$color, createdAt=$createdAt, id=$id, name=$name, parentId=$parentId, updatedAt=$updatedAt, value=$value]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'name'] = this.name; - if (this.parentId.isPresent) { - final value = this.parentId.value; - json[r'parentId'] = value; - } - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - json[r'value'] = this.value; - return json; - } - - /// Returns a new [TagResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TagResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TagResponseDto( - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - createdAt: mapDateTime(json, r'createdAt', r'')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - parentId: json.containsKey(r'parentId') ? Optional.present(mapValueOfType(json, r'parentId')) : const Optional.absent(), - updatedAt: mapDateTime(json, r'updatedAt', r'')!, - value: mapValueOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'name', - 'updatedAt', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/tag_update_dto.dart b/mobile/openapi/lib/model/tag_update_dto.dart deleted file mode 100644 index d66bb9097e..0000000000 --- a/mobile/openapi/lib/model/tag_update_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagUpdateDto { - /// Returns a new [TagUpdateDto] instance. - TagUpdateDto({ - this.color = const Optional.absent(), - }); - - /// Tag color (hex) - Optional color; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagUpdateDto && - other.color == color; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode); - - @override - String toString() => 'TagUpdateDto[color=$color]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - return json; - } - - /// Returns a new [TagUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "TagUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return TagUpdateDto( - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/tag_upsert_dto.dart b/mobile/openapi/lib/model/tag_upsert_dto.dart deleted file mode 100644 index 3581ef1e8f..0000000000 --- a/mobile/openapi/lib/model/tag_upsert_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagUpsertDto { - /// Returns a new [TagUpsertDto] instance. - TagUpsertDto({ - this.tags = const [], - }); - - /// Tag names to upsert - List tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagUpsertDto && - _deepEquality.equals(other.tags, tags); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (tags.hashCode); - - @override - String toString() => 'TagUpsertDto[tags=$tags]'; - - Map toJson() { - final json = {}; - json[r'tags'] = this.tags; - return json; - } - - /// Returns a new [TagUpsertDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagUpsertDto? fromJson(dynamic value) { - upgradeDto(value, "TagUpsertDto"); - if (value is Map) { - final json = value.cast(); - - return TagUpsertDto( - tags: json[r'tags'] is Iterable - ? (json[r'tags'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagUpsertDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagUpsertDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagUpsertDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagUpsertDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'tags', - }; -} - diff --git a/mobile/openapi/lib/model/tags_response.dart b/mobile/openapi/lib/model/tags_response.dart deleted file mode 100644 index 8a3ac17474..0000000000 --- a/mobile/openapi/lib/model/tags_response.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagsResponse { - /// Returns a new [TagsResponse] instance. - TagsResponse({ - required this.enabled, - required this.sidebarWeb, - }); - - /// Whether tags are enabled - bool enabled; - - /// Whether tags appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagsResponse && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'TagsResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [TagsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagsResponse? fromJson(dynamic value) { - upgradeDto(value, "TagsResponse"); - if (value is Map) { - final json = value.cast(); - - return TagsResponse( - enabled: mapValueOfType(json, r'enabled')!, - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/tags_update.dart b/mobile/openapi/lib/model/tags_update.dart deleted file mode 100644 index 9a9e78f1d3..0000000000 --- a/mobile/openapi/lib/model/tags_update.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagsUpdate { - /// Returns a new [TagsUpdate] instance. - TagsUpdate({ - this.enabled = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether tags are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Whether tags appear in web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagsUpdate && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'TagsUpdate[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [TagsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagsUpdate? fromJson(dynamic value) { - upgradeDto(value, "TagsUpdate"); - if (value is Map) { - final json = value.cast(); - - return TagsUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/template_dto.dart b/mobile/openapi/lib/model/template_dto.dart deleted file mode 100644 index b1eab848ed..0000000000 --- a/mobile/openapi/lib/model/template_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TemplateDto { - /// Returns a new [TemplateDto] instance. - TemplateDto({ - required this.template, - }); - - /// Template name - String template; - - @override - bool operator ==(Object other) => identical(this, other) || other is TemplateDto && - other.template == template; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (template.hashCode); - - @override - String toString() => 'TemplateDto[template=$template]'; - - Map toJson() { - final json = {}; - json[r'template'] = this.template; - return json; - } - - /// Returns a new [TemplateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TemplateDto? fromJson(dynamic value) { - upgradeDto(value, "TemplateDto"); - if (value is Map) { - final json = value.cast(); - - return TemplateDto( - template: mapValueOfType(json, r'template')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TemplateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TemplateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TemplateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TemplateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'template', - }; -} - diff --git a/mobile/openapi/lib/model/template_response_dto.dart b/mobile/openapi/lib/model/template_response_dto.dart deleted file mode 100644 index f19c1eae7d..0000000000 --- a/mobile/openapi/lib/model/template_response_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TemplateResponseDto { - /// Returns a new [TemplateResponseDto] instance. - TemplateResponseDto({ - required this.html, - required this.name, - }); - - /// Template HTML content - String html; - - /// Template name - String name; - - @override - bool operator ==(Object other) => identical(this, other) || other is TemplateResponseDto && - other.html == html && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (html.hashCode) + - (name.hashCode); - - @override - String toString() => 'TemplateResponseDto[html=$html, name=$name]'; - - Map toJson() { - final json = {}; - json[r'html'] = this.html; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [TemplateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TemplateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TemplateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TemplateResponseDto( - html: mapValueOfType(json, r'html')!, - name: mapValueOfType(json, r'name')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TemplateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TemplateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TemplateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TemplateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'html', - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/test_email_response_dto.dart b/mobile/openapi/lib/model/test_email_response_dto.dart deleted file mode 100644 index e14783f3c4..0000000000 --- a/mobile/openapi/lib/model/test_email_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TestEmailResponseDto { - /// Returns a new [TestEmailResponseDto] instance. - TestEmailResponseDto({ - required this.messageId, - }); - - /// Email message ID - String messageId; - - @override - bool operator ==(Object other) => identical(this, other) || other is TestEmailResponseDto && - other.messageId == messageId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (messageId.hashCode); - - @override - String toString() => 'TestEmailResponseDto[messageId=$messageId]'; - - Map toJson() { - final json = {}; - json[r'messageId'] = this.messageId; - return json; - } - - /// Returns a new [TestEmailResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TestEmailResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TestEmailResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TestEmailResponseDto( - messageId: mapValueOfType(json, r'messageId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TestEmailResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TestEmailResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TestEmailResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TestEmailResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'messageId', - }; -} - diff --git a/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart b/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart deleted file mode 100644 index 7662724070..0000000000 --- a/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart +++ /dev/null @@ -1,310 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TimeBucketAssetResponseDto { - /// Returns a new [TimeBucketAssetResponseDto] instance. - TimeBucketAssetResponseDto({ - this.city = const Optional.present(const []), - this.country = const Optional.present(const []), - this.createdAt = const [], - this.duration = const [], - this.fileCreatedAt = const [], - this.id = const [], - this.isFavorite = const [], - this.isImage = const [], - this.isTrashed = const [], - this.latitude = const Optional.present(const []), - this.livePhotoVideoId = const [], - this.localOffsetHours = const [], - this.longitude = const Optional.present(const []), - this.ownerId = const [], - this.projectionType = const [], - this.ratio = const [], - this.stack = const Optional.present(const []), - this.thumbhash = const [], - this.visibility = const [], - }); - - /// Array of city names extracted from EXIF GPS data - Optional?> city; - - /// Array of country names extracted from EXIF GPS data - Optional?> country; - - /// Array of UTC timestamps when each asset was originally uploaded to Immich - List createdAt; - - /// Array of video/gif durations in milliseconds (null for static images) - List duration; - - /// Array of file creation timestamps in UTC - List fileCreatedAt; - - /// Array of asset IDs in the time bucket - List id; - - /// Array indicating whether each asset is favorited - List isFavorite; - - /// Array indicating whether each asset is an image (false for videos) - List isImage; - - /// Array indicating whether each asset is in the trash - List isTrashed; - - /// Array of latitude coordinates extracted from EXIF GPS data - Optional?> latitude; - - /// Array of live photo video asset IDs (null for non-live photos) - List livePhotoVideoId; - - /// Array of UTC offset hours at the time each photo was taken. Positive values are east of UTC, negative values are west of UTC. Values may be fractional (e.g., 5.5 for +05:30, -9.75 for -09:45). Applying this offset to 'fileCreatedAt' will give you the time the photo was taken from the photographer's perspective. - List localOffsetHours; - - /// Array of longitude coordinates extracted from EXIF GPS data - Optional?> longitude; - - /// Array of owner IDs for each asset - List ownerId; - - /// Array of projection types for 360° content (e.g., \"EQUIRECTANGULAR\", \"CUBEFACE\", \"CYLINDRICAL\") - List projectionType; - - /// Array of aspect ratios (width/height) for each asset - List ratio; - - /// Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets) - Optional?>?> stack; - - /// Array of BlurHash strings for generating asset previews (base64 encoded) - List thumbhash; - - /// Array of visibility statuses for each asset (e.g., ARCHIVE, TIMELINE, HIDDEN, LOCKED) - List visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is TimeBucketAssetResponseDto && - _deepEquality.equals(other.city, city) && - _deepEquality.equals(other.country, country) && - _deepEquality.equals(other.createdAt, createdAt) && - _deepEquality.equals(other.duration, duration) && - _deepEquality.equals(other.fileCreatedAt, fileCreatedAt) && - _deepEquality.equals(other.id, id) && - _deepEquality.equals(other.isFavorite, isFavorite) && - _deepEquality.equals(other.isImage, isImage) && - _deepEquality.equals(other.isTrashed, isTrashed) && - _deepEquality.equals(other.latitude, latitude) && - _deepEquality.equals(other.livePhotoVideoId, livePhotoVideoId) && - _deepEquality.equals(other.localOffsetHours, localOffsetHours) && - _deepEquality.equals(other.longitude, longitude) && - _deepEquality.equals(other.ownerId, ownerId) && - _deepEquality.equals(other.projectionType, projectionType) && - _deepEquality.equals(other.ratio, ratio) && - _deepEquality.equals(other.stack, stack) && - _deepEquality.equals(other.thumbhash, thumbhash) && - _deepEquality.equals(other.visibility, visibility); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city.hashCode) + - (country.hashCode) + - (createdAt.hashCode) + - (duration.hashCode) + - (fileCreatedAt.hashCode) + - (id.hashCode) + - (isFavorite.hashCode) + - (isImage.hashCode) + - (isTrashed.hashCode) + - (latitude.hashCode) + - (livePhotoVideoId.hashCode) + - (localOffsetHours.hashCode) + - (longitude.hashCode) + - (ownerId.hashCode) + - (projectionType.hashCode) + - (ratio.hashCode) + - (stack.hashCode) + - (thumbhash.hashCode) + - (visibility.hashCode); - - @override - String toString() => 'TimeBucketAssetResponseDto[city=$city, country=$country, createdAt=$createdAt, duration=$duration, fileCreatedAt=$fileCreatedAt, id=$id, isFavorite=$isFavorite, isImage=$isImage, isTrashed=$isTrashed, latitude=$latitude, livePhotoVideoId=$livePhotoVideoId, localOffsetHours=$localOffsetHours, longitude=$longitude, ownerId=$ownerId, projectionType=$projectionType, ratio=$ratio, stack=$stack, thumbhash=$thumbhash, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - json[r'createdAt'] = this.createdAt; - json[r'duration'] = this.duration; - json[r'fileCreatedAt'] = this.fileCreatedAt; - json[r'id'] = this.id; - json[r'isFavorite'] = this.isFavorite; - json[r'isImage'] = this.isImage; - json[r'isTrashed'] = this.isTrashed; - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - json[r'localOffsetHours'] = this.localOffsetHours; - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - json[r'ownerId'] = this.ownerId; - json[r'projectionType'] = this.projectionType; - json[r'ratio'] = this.ratio; - if (this.stack.isPresent) { - final value = this.stack.value; - json[r'stack'] = value; - } - json[r'thumbhash'] = this.thumbhash; - json[r'visibility'] = this.visibility; - return json; - } - - /// Returns a new [TimeBucketAssetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TimeBucketAssetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TimeBucketAssetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TimeBucketAssetResponseDto( - city: json.containsKey(r'city') ? Optional.present(json[r'city'] is Iterable - ? (json[r'city'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(json[r'country'] is Iterable - ? (json[r'country'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - createdAt: json[r'createdAt'] is Iterable - ? (json[r'createdAt'] as Iterable).cast().toList(growable: false) - : const [], - duration: json[r'duration'] is Iterable - ? (json[r'duration'] as Iterable).cast().toList(growable: false) - : const [], - fileCreatedAt: json[r'fileCreatedAt'] is Iterable - ? (json[r'fileCreatedAt'] as Iterable).cast().toList(growable: false) - : const [], - id: json[r'id'] is Iterable - ? (json[r'id'] as Iterable).cast().toList(growable: false) - : const [], - isFavorite: json[r'isFavorite'] is Iterable - ? (json[r'isFavorite'] as Iterable).cast().toList(growable: false) - : const [], - isImage: json[r'isImage'] is Iterable - ? (json[r'isImage'] as Iterable).cast().toList(growable: false) - : const [], - isTrashed: json[r'isTrashed'] is Iterable - ? (json[r'isTrashed'] as Iterable).cast().toList(growable: false) - : const [], - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] is Iterable - ? (json[r'latitude'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - livePhotoVideoId: json[r'livePhotoVideoId'] is Iterable - ? (json[r'livePhotoVideoId'] as Iterable).cast().toList(growable: false) - : const [], - localOffsetHours: json[r'localOffsetHours'] is Iterable - ? (json[r'localOffsetHours'] as Iterable).cast().toList(growable: false) - : const [], - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] is Iterable - ? (json[r'longitude'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - ownerId: json[r'ownerId'] is Iterable - ? (json[r'ownerId'] as Iterable).cast().toList(growable: false) - : const [], - projectionType: json[r'projectionType'] is Iterable - ? (json[r'projectionType'] as Iterable).cast().toList(growable: false) - : const [], - ratio: json[r'ratio'] is Iterable - ? (json[r'ratio'] as Iterable).cast().toList(growable: false) - : const [], - stack: json.containsKey(r'stack') ? Optional.present(json[r'stack'] is List - ? (json[r'stack'] as List).map((e) => - e == null ? null : (e as List).map((value) => value as String).toList(growable: false) - ).toList() - : const []) : const Optional.absent(), - thumbhash: json[r'thumbhash'] is Iterable - ? (json[r'thumbhash'] as Iterable).cast().toList(growable: false) - : const [], - visibility: AssetVisibility.listFromJson(json[r'visibility']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TimeBucketAssetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TimeBucketAssetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TimeBucketAssetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TimeBucketAssetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'duration', - 'fileCreatedAt', - 'id', - 'isFavorite', - 'isImage', - 'isTrashed', - 'livePhotoVideoId', - 'localOffsetHours', - 'ownerId', - 'projectionType', - 'ratio', - 'thumbhash', - 'visibility', - }; -} - diff --git a/mobile/openapi/lib/model/time_buckets_response_dto.dart b/mobile/openapi/lib/model/time_buckets_response_dto.dart deleted file mode 100644 index 8b8da1d37a..0000000000 --- a/mobile/openapi/lib/model/time_buckets_response_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TimeBucketsResponseDto { - /// Returns a new [TimeBucketsResponseDto] instance. - TimeBucketsResponseDto({ - required this.count, - required this.timeBucket, - }); - - /// Number of assets in this time bucket - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int count; - - /// Time bucket identifier in YYYY-MM-DD format representing the start of the time period - String timeBucket; - - @override - bool operator ==(Object other) => identical(this, other) || other is TimeBucketsResponseDto && - other.count == count && - other.timeBucket == timeBucket; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (timeBucket.hashCode); - - @override - String toString() => 'TimeBucketsResponseDto[count=$count, timeBucket=$timeBucket]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'timeBucket'] = this.timeBucket; - return json; - } - - /// Returns a new [TimeBucketsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TimeBucketsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TimeBucketsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TimeBucketsResponseDto( - count: mapValueOfType(json, r'count')!, - timeBucket: mapValueOfType(json, r'timeBucket')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TimeBucketsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TimeBucketsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TimeBucketsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TimeBucketsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'timeBucket', - }; -} - diff --git a/mobile/openapi/lib/model/tone_mapping.dart b/mobile/openapi/lib/model/tone_mapping.dart deleted file mode 100644 index 73f7773334..0000000000 --- a/mobile/openapi/lib/model/tone_mapping.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Tone mapping -enum ToneMapping { - hable._(r'hable'), - mobius._(r'mobius'), - reinhard._(r'reinhard'), - disabled._(r'disabled'), - ; - - /// Instantiate a new enum with the provided value. - const ToneMapping._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ToneMapping] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ToneMapping? fromJson(dynamic value) => ToneMappingTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ToneMapping] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ToneMapping.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ToneMapping] to String, -/// and [decode] dynamic data back to [ToneMapping]. -class ToneMappingTypeTransformer { - factory ToneMappingTypeTransformer() => _instance ??= const ToneMappingTypeTransformer._(); - - const ToneMappingTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ToneMapping data) => data._value; - - /// Returns the instance of [ToneMapping] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ToneMapping? decode(dynamic data, {bool allowNull = true}) { - if (data is ToneMapping) { - return data; - } - if (data != null) { - switch (data) { - case r'hable': return ToneMapping.hable; - case r'mobius': return ToneMapping.mobius; - case r'reinhard': return ToneMapping.reinhard; - case r'disabled': return ToneMapping.disabled; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ToneMappingTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/transcode_hw_accel.dart b/mobile/openapi/lib/model/transcode_hw_accel.dart deleted file mode 100644 index f4b6393d43..0000000000 --- a/mobile/openapi/lib/model/transcode_hw_accel.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Transcode hardware acceleration -enum TranscodeHWAccel { - nvenc._(r'nvenc'), - qsv._(r'qsv'), - vaapi._(r'vaapi'), - rkmpp._(r'rkmpp'), - disabled._(r'disabled'), - ; - - /// Instantiate a new enum with the provided value. - const TranscodeHWAccel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [TranscodeHWAccel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static TranscodeHWAccel? fromJson(dynamic value) => TranscodeHWAccelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [TranscodeHWAccel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TranscodeHWAccel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [TranscodeHWAccel] to String, -/// and [decode] dynamic data back to [TranscodeHWAccel]. -class TranscodeHWAccelTypeTransformer { - factory TranscodeHWAccelTypeTransformer() => _instance ??= const TranscodeHWAccelTypeTransformer._(); - - const TranscodeHWAccelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(TranscodeHWAccel data) => data._value; - - /// Returns the instance of [TranscodeHWAccel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - TranscodeHWAccel? decode(dynamic data, {bool allowNull = true}) { - if (data is TranscodeHWAccel) { - return data; - } - if (data != null) { - switch (data) { - case r'nvenc': return TranscodeHWAccel.nvenc; - case r'qsv': return TranscodeHWAccel.qsv; - case r'vaapi': return TranscodeHWAccel.vaapi; - case r'rkmpp': return TranscodeHWAccel.rkmpp; - case r'disabled': return TranscodeHWAccel.disabled; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static TranscodeHWAccelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/transcode_policy.dart b/mobile/openapi/lib/model/transcode_policy.dart deleted file mode 100644 index 8784ab7bf8..0000000000 --- a/mobile/openapi/lib/model/transcode_policy.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Transcode policy -enum TranscodePolicy { - all._(r'all'), - optimal._(r'optimal'), - bitrate._(r'bitrate'), - required_._(r'required'), - disabled._(r'disabled'), - ; - - /// Instantiate a new enum with the provided value. - const TranscodePolicy._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [TranscodePolicy] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static TranscodePolicy? fromJson(dynamic value) => TranscodePolicyTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [TranscodePolicy] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TranscodePolicy.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [TranscodePolicy] to String, -/// and [decode] dynamic data back to [TranscodePolicy]. -class TranscodePolicyTypeTransformer { - factory TranscodePolicyTypeTransformer() => _instance ??= const TranscodePolicyTypeTransformer._(); - - const TranscodePolicyTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(TranscodePolicy data) => data._value; - - /// Returns the instance of [TranscodePolicy] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - TranscodePolicy? decode(dynamic data, {bool allowNull = true}) { - if (data is TranscodePolicy) { - return data; - } - if (data != null) { - switch (data) { - case r'all': return TranscodePolicy.all; - case r'optimal': return TranscodePolicy.optimal; - case r'bitrate': return TranscodePolicy.bitrate; - case r'required': return TranscodePolicy.required_; - case r'disabled': return TranscodePolicy.disabled; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static TranscodePolicyTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/trash_response_dto.dart b/mobile/openapi/lib/model/trash_response_dto.dart deleted file mode 100644 index 7b43d9ceb7..0000000000 --- a/mobile/openapi/lib/model/trash_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TrashResponseDto { - /// Returns a new [TrashResponseDto] instance. - TrashResponseDto({ - required this.count, - }); - - /// Number of items in trash - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int count; - - @override - bool operator ==(Object other) => identical(this, other) || other is TrashResponseDto && - other.count == count; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode); - - @override - String toString() => 'TrashResponseDto[count=$count]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - return json; - } - - /// Returns a new [TrashResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TrashResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TrashResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TrashResponseDto( - count: mapValueOfType(json, r'count')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TrashResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TrashResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TrashResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TrashResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - }; -} - diff --git a/mobile/openapi/lib/model/update_album_dto.dart b/mobile/openapi/lib/model/update_album_dto.dart deleted file mode 100644 index 8995a69656..0000000000 --- a/mobile/openapi/lib/model/update_album_dto.dart +++ /dev/null @@ -1,175 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UpdateAlbumDto { - /// Returns a new [UpdateAlbumDto] instance. - UpdateAlbumDto({ - this.albumName = const Optional.absent(), - this.albumThumbnailAssetId = const Optional.absent(), - this.description = const Optional.absent(), - this.isActivityEnabled = const Optional.absent(), - this.order = const Optional.absent(), - }); - - /// Album name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumName; - - /// Album thumbnail asset ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumThumbnailAssetId; - - /// Album description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Enable activity feed - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isActivityEnabled; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional order; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateAlbumDto && - other.albumName == albumName && - other.albumThumbnailAssetId == albumThumbnailAssetId && - other.description == description && - other.isActivityEnabled == isActivityEnabled && - other.order == order; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName == null ? 0 : albumName!.hashCode) + - (albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (isActivityEnabled == null ? 0 : isActivityEnabled!.hashCode) + - (order == null ? 0 : order!.hashCode); - - @override - String toString() => 'UpdateAlbumDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, description=$description, isActivityEnabled=$isActivityEnabled, order=$order]'; - - Map toJson() { - final json = {}; - if (this.albumName.isPresent) { - final value = this.albumName.value; - json[r'albumName'] = value; - } - if (this.albumThumbnailAssetId.isPresent) { - final value = this.albumThumbnailAssetId.value; - json[r'albumThumbnailAssetId'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.isActivityEnabled.isPresent) { - final value = this.isActivityEnabled.value; - json[r'isActivityEnabled'] = value; - } - if (this.order.isPresent) { - final value = this.order.value; - json[r'order'] = value; - } - return json; - } - - /// Returns a new [UpdateAlbumDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateAlbumDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateAlbumDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateAlbumDto( - albumName: json.containsKey(r'albumName') ? Optional.present(mapValueOfType(json, r'albumName')) : const Optional.absent(), - albumThumbnailAssetId: json.containsKey(r'albumThumbnailAssetId') ? Optional.present(mapValueOfType(json, r'albumThumbnailAssetId')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - isActivityEnabled: json.containsKey(r'isActivityEnabled') ? Optional.present(mapValueOfType(json, r'isActivityEnabled')) : const Optional.absent(), - order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateAlbumDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateAlbumDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateAlbumDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateAlbumDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/update_album_user_dto.dart b/mobile/openapi/lib/model/update_album_user_dto.dart deleted file mode 100644 index 43218cae6e..0000000000 --- a/mobile/openapi/lib/model/update_album_user_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UpdateAlbumUserDto { - /// Returns a new [UpdateAlbumUserDto] instance. - UpdateAlbumUserDto({ - required this.role, - }); - - AlbumUserRole role; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateAlbumUserDto && - other.role == role; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role.hashCode); - - @override - String toString() => 'UpdateAlbumUserDto[role=$role]'; - - Map toJson() { - final json = {}; - json[r'role'] = this.role; - return json; - } - - /// Returns a new [UpdateAlbumUserDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateAlbumUserDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateAlbumUserDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateAlbumUserDto( - role: AlbumUserRole.fromJson(json[r'role'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateAlbumUserDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateAlbumUserDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateAlbumUserDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateAlbumUserDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'role', - }; -} - diff --git a/mobile/openapi/lib/model/update_asset_dto.dart b/mobile/openapi/lib/model/update_asset_dto.dart deleted file mode 100644 index 1958e36963..0000000000 --- a/mobile/openapi/lib/model/update_asset_dto.dart +++ /dev/null @@ -1,223 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UpdateAssetDto { - /// Returns a new [UpdateAssetDto] instance. - UpdateAssetDto({ - this.dateTimeOriginal = const Optional.absent(), - this.description = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.latitude = const Optional.absent(), - this.livePhotoVideoId = const Optional.absent(), - this.longitude = const Optional.absent(), - this.rating = const Optional.absent(), - this.visibility = const Optional.absent(), - }); - - /// Original date and time - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional dateTimeOriginal; - - /// Asset description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Latitude coordinate - /// - /// Minimum value: -90 - /// Maximum value: 90 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional latitude; - - /// Live photo video ID - Optional livePhotoVideoId; - - /// Longitude coordinate - /// - /// Minimum value: -180 - /// Maximum value: 180 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional longitude; - - /// Rating in range [1-5] (starred), -1 (rejected), or null (unrated) - /// - /// Minimum value: -1 - /// Maximum value: 5 - Optional rating; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateAssetDto && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.isFavorite == isFavorite && - other.latitude == latitude && - other.livePhotoVideoId == livePhotoVideoId && - other.longitude == longitude && - other.rating == rating && - other.visibility == visibility; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode); - - @override - String toString() => 'UpdateAssetDto[dateTimeOriginal=$dateTimeOriginal, description=$description, isFavorite=$isFavorite, latitude=$latitude, livePhotoVideoId=$livePhotoVideoId, longitude=$longitude, rating=$rating, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.dateTimeOriginal.isPresent) { - final value = this.dateTimeOriginal.value; - json[r'dateTimeOriginal'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - if (this.livePhotoVideoId.isPresent) { - final value = this.livePhotoVideoId.value; - json[r'livePhotoVideoId'] = value; - } - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - return json; - } - - /// Returns a new [UpdateAssetDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateAssetDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateAssetDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateAssetDto( - dateTimeOriginal: json.containsKey(r'dateTimeOriginal') ? Optional.present(mapValueOfType(json, r'dateTimeOriginal')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] == null ? null : num.parse('${json[r'latitude']}')) : const Optional.absent(), - livePhotoVideoId: json.containsKey(r'livePhotoVideoId') ? Optional.present(mapValueOfType(json, r'livePhotoVideoId')) : const Optional.absent(), - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] == null ? null : num.parse('${json[r'longitude']}')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateAssetDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateAssetDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateAssetDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateAssetDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/update_library_dto.dart b/mobile/openapi/lib/model/update_library_dto.dart deleted file mode 100644 index 44aa042f35..0000000000 --- a/mobile/openapi/lib/model/update_library_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UpdateLibraryDto { - /// Returns a new [UpdateLibraryDto] instance. - UpdateLibraryDto({ - this.exclusionPatterns = const Optional.present(const []), - this.importPaths = const Optional.present(const []), - this.name = const Optional.absent(), - }); - - /// Exclusion patterns (max 128) - Optional?> exclusionPatterns; - - /// Import paths (max 128) - Optional?> importPaths; - - /// Library name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateLibraryDto && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - _deepEquality.equals(other.importPaths, importPaths) && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (exclusionPatterns.hashCode) + - (importPaths.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'UpdateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, name=$name]'; - - Map toJson() { - final json = {}; - if (this.exclusionPatterns.isPresent) { - final value = this.exclusionPatterns.value; - json[r'exclusionPatterns'] = value; - } - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [UpdateLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateLibraryDto( - exclusionPatterns: json.containsKey(r'exclusionPatterns') ? Optional.present(json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - importPaths: json.containsKey(r'importPaths') ? Optional.present(json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/usage_by_user_dto.dart b/mobile/openapi/lib/model/usage_by_user_dto.dart deleted file mode 100644 index fbf2cc02e4..0000000000 --- a/mobile/openapi/lib/model/usage_by_user_dto.dart +++ /dev/null @@ -1,185 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UsageByUserDto { - /// Returns a new [UsageByUserDto] instance. - UsageByUserDto({ - required this.photos, - required this.quotaSizeInBytes, - required this.usage, - required this.usagePhotos, - required this.usageVideos, - required this.userId, - required this.userName, - required this.videos, - }); - - /// Number of photos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int photos; - - /// User quota size in bytes (null if unlimited) - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? quotaSizeInBytes; - - /// Total storage usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usage; - - /// Storage usage for photos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usagePhotos; - - /// Storage usage for videos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usageVideos; - - /// User ID - String userId; - - /// User name - String userName; - - /// Number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is UsageByUserDto && - other.photos == photos && - other.quotaSizeInBytes == quotaSizeInBytes && - other.usage == usage && - other.usagePhotos == usagePhotos && - other.usageVideos == usageVideos && - other.userId == userId && - other.userName == userName && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (photos.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (usage.hashCode) + - (usagePhotos.hashCode) + - (usageVideos.hashCode) + - (userId.hashCode) + - (userName.hashCode) + - (videos.hashCode); - - @override - String toString() => 'UsageByUserDto[photos=$photos, quotaSizeInBytes=$quotaSizeInBytes, usage=$usage, usagePhotos=$usagePhotos, usageVideos=$usageVideos, userId=$userId, userName=$userName, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'photos'] = this.photos; - if (this.quotaSizeInBytes != null) { - json[r'quotaSizeInBytes'] = this.quotaSizeInBytes; - } else { - json[r'quotaSizeInBytes'] = null; - } - json[r'usage'] = this.usage; - json[r'usagePhotos'] = this.usagePhotos; - json[r'usageVideos'] = this.usageVideos; - json[r'userId'] = this.userId; - json[r'userName'] = this.userName; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [UsageByUserDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UsageByUserDto? fromJson(dynamic value) { - upgradeDto(value, "UsageByUserDto"); - if (value is Map) { - final json = value.cast(); - - return UsageByUserDto( - photos: mapValueOfType(json, r'photos')!, - quotaSizeInBytes: mapValueOfType(json, r'quotaSizeInBytes'), - usage: mapValueOfType(json, r'usage')!, - usagePhotos: mapValueOfType(json, r'usagePhotos')!, - usageVideos: mapValueOfType(json, r'usageVideos')!, - userId: mapValueOfType(json, r'userId')!, - userName: mapValueOfType(json, r'userName')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UsageByUserDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UsageByUserDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UsageByUserDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UsageByUserDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'photos', - 'quotaSizeInBytes', - 'usage', - 'usagePhotos', - 'usageVideos', - 'userId', - 'userName', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_create_dto.dart b/mobile/openapi/lib/model/user_admin_create_dto.dart deleted file mode 100644 index 8ed867c2cf..0000000000 --- a/mobile/openapi/lib/model/user_admin_create_dto.dart +++ /dev/null @@ -1,215 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserAdminCreateDto { - /// Returns a new [UserAdminCreateDto] instance. - UserAdminCreateDto({ - this.avatarColor = const Optional.absent(), - required this.email, - this.isAdmin = const Optional.absent(), - required this.name, - this.notify = const Optional.absent(), - required this.password, - this.pinCode = const Optional.absent(), - this.quotaSizeInBytes = const Optional.absent(), - this.shouldChangePassword = const Optional.absent(), - this.storageLabel = const Optional.absent(), - }); - - Optional avatarColor; - - /// User email - String email; - - /// Grant admin privileges - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isAdmin; - - /// User name - String name; - - /// Send notification email - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional notify; - - /// User password - String password; - - /// PIN code - Optional pinCode; - - /// Storage quota in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional quotaSizeInBytes; - - /// Require password change on next login - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional shouldChangePassword; - - /// Storage label - Optional storageLabel; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminCreateDto && - other.avatarColor == avatarColor && - other.email == email && - other.isAdmin == isAdmin && - other.name == name && - other.notify == notify && - other.password == password && - other.pinCode == pinCode && - other.quotaSizeInBytes == quotaSizeInBytes && - other.shouldChangePassword == shouldChangePassword && - other.storageLabel == storageLabel; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (email.hashCode) + - (isAdmin == null ? 0 : isAdmin!.hashCode) + - (name.hashCode) + - (notify == null ? 0 : notify!.hashCode) + - (password.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode); - - @override - String toString() => 'UserAdminCreateDto[avatarColor=$avatarColor, email=$email, isAdmin=$isAdmin, name=$name, notify=$notify, password=$password, pinCode=$pinCode, quotaSizeInBytes=$quotaSizeInBytes, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - json[r'email'] = this.email; - if (this.isAdmin.isPresent) { - final value = this.isAdmin.value; - json[r'isAdmin'] = value; - } - json[r'name'] = this.name; - if (this.notify.isPresent) { - final value = this.notify.value; - json[r'notify'] = value; - } - json[r'password'] = this.password; - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - if (this.quotaSizeInBytes.isPresent) { - final value = this.quotaSizeInBytes.value; - json[r'quotaSizeInBytes'] = value; - } - if (this.shouldChangePassword.isPresent) { - final value = this.shouldChangePassword.value; - json[r'shouldChangePassword'] = value; - } - if (this.storageLabel.isPresent) { - final value = this.storageLabel.value; - json[r'storageLabel'] = value; - } - return json; - } - - /// Returns a new [UserAdminCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminCreateDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminCreateDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminCreateDto( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - email: mapValueOfType(json, r'email')!, - isAdmin: json.containsKey(r'isAdmin') ? Optional.present(mapValueOfType(json, r'isAdmin')) : const Optional.absent(), - name: mapValueOfType(json, r'name')!, - notify: json.containsKey(r'notify') ? Optional.present(mapValueOfType(json, r'notify')) : const Optional.absent(), - password: mapValueOfType(json, r'password')!, - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - quotaSizeInBytes: json.containsKey(r'quotaSizeInBytes') ? Optional.present(json[r'quotaSizeInBytes'] == null ? null : int.parse('${json[r'quotaSizeInBytes']}')) : const Optional.absent(), - shouldChangePassword: json.containsKey(r'shouldChangePassword') ? Optional.present(mapValueOfType(json, r'shouldChangePassword')) : const Optional.absent(), - storageLabel: json.containsKey(r'storageLabel') ? Optional.present(mapValueOfType(json, r'storageLabel')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - 'name', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_delete_dto.dart b/mobile/openapi/lib/model/user_admin_delete_dto.dart deleted file mode 100644 index 8d7ab73076..0000000000 --- a/mobile/openapi/lib/model/user_admin_delete_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserAdminDeleteDto { - /// Returns a new [UserAdminDeleteDto] instance. - UserAdminDeleteDto({ - this.force = const Optional.absent(), - }); - - /// Force delete even if user has assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional force; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminDeleteDto && - other.force == force; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (force == null ? 0 : force!.hashCode); - - @override - String toString() => 'UserAdminDeleteDto[force=$force]'; - - Map toJson() { - final json = {}; - if (this.force.isPresent) { - final value = this.force.value; - json[r'force'] = value; - } - return json; - } - - /// Returns a new [UserAdminDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminDeleteDto( - force: json.containsKey(r'force') ? Optional.present(mapValueOfType(json, r'force')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_response_dto.dart b/mobile/openapi/lib/model/user_admin_response_dto.dart deleted file mode 100644 index c8499ab0dd..0000000000 --- a/mobile/openapi/lib/model/user_admin_response_dto.dart +++ /dev/null @@ -1,273 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserAdminResponseDto { - /// Returns a new [UserAdminResponseDto] instance. - UserAdminResponseDto({ - required this.avatarColor, - required this.createdAt, - required this.deletedAt, - required this.email, - required this.id, - required this.isAdmin, - required this.license, - required this.name, - required this.oauthId, - required this.profileChangedAt, - required this.profileImagePath, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - required this.shouldChangePassword, - required this.status, - required this.storageLabel, - required this.updatedAt, - }); - - UserAvatarColor avatarColor; - - /// Creation date - DateTime createdAt; - - /// Deletion date - DateTime? deletedAt; - - /// User email - String email; - - /// User ID - String id; - - /// Is admin user - bool isAdmin; - - UserLicense? license; - - /// User name - String name; - - /// OAuth ID - String oauthId; - - /// Profile change date - DateTime profileChangedAt; - - /// Profile image path - String profileImagePath; - - /// Storage quota in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? quotaSizeInBytes; - - /// Storage usage in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? quotaUsageInBytes; - - /// Require password change on next login - bool shouldChangePassword; - - UserStatus status; - - /// Storage label - String? storageLabel; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminResponseDto && - other.avatarColor == avatarColor && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.email == email && - other.id == id && - other.isAdmin == isAdmin && - other.license == license && - other.name == name && - other.oauthId == oauthId && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath && - other.quotaSizeInBytes == quotaSizeInBytes && - other.quotaUsageInBytes == quotaUsageInBytes && - other.shouldChangePassword == shouldChangePassword && - other.status == status && - other.storageLabel == storageLabel && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor.hashCode) + - (createdAt.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (id.hashCode) + - (isAdmin.hashCode) + - (license == null ? 0 : license!.hashCode) + - (name.hashCode) + - (oauthId.hashCode) + - (profileChangedAt.hashCode) + - (profileImagePath.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (quotaUsageInBytes == null ? 0 : quotaUsageInBytes!.hashCode) + - (shouldChangePassword.hashCode) + - (status.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'UserAdminResponseDto[avatarColor=$avatarColor, createdAt=$createdAt, deletedAt=$deletedAt, email=$email, id=$id, isAdmin=$isAdmin, license=$license, name=$name, oauthId=$oauthId, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath, quotaSizeInBytes=$quotaSizeInBytes, quotaUsageInBytes=$quotaUsageInBytes, shouldChangePassword=$shouldChangePassword, status=$status, storageLabel=$storageLabel, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'avatarColor'] = this.avatarColor; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - json[r'id'] = this.id; - json[r'isAdmin'] = this.isAdmin; - if (this.license != null) { - json[r'license'] = this.license; - } else { - json[r'license'] = null; - } - json[r'name'] = this.name; - json[r'oauthId'] = this.oauthId; - json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - if (this.quotaSizeInBytes != null) { - json[r'quotaSizeInBytes'] = this.quotaSizeInBytes; - } else { - json[r'quotaSizeInBytes'] = null; - } - if (this.quotaUsageInBytes != null) { - json[r'quotaUsageInBytes'] = this.quotaUsageInBytes; - } else { - json[r'quotaUsageInBytes'] = null; - } - json[r'shouldChangePassword'] = this.shouldChangePassword; - json[r'status'] = this.status; - if (this.storageLabel != null) { - json[r'storageLabel'] = this.storageLabel; - } else { - json[r'storageLabel'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [UserAdminResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminResponseDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminResponseDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminResponseDto( - avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - email: mapValueOfType(json, r'email')!, - id: mapValueOfType(json, r'id')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - license: UserLicense.fromJson(json[r'license']), - name: mapValueOfType(json, r'name')!, - oauthId: mapValueOfType(json, r'oauthId')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - quotaSizeInBytes: mapValueOfType(json, r'quotaSizeInBytes'), - quotaUsageInBytes: mapValueOfType(json, r'quotaUsageInBytes'), - shouldChangePassword: mapValueOfType(json, r'shouldChangePassword')!, - status: UserStatus.fromJson(json[r'status'])!, - storageLabel: mapValueOfType(json, r'storageLabel'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'avatarColor', - 'createdAt', - 'deletedAt', - 'email', - 'id', - 'isAdmin', - 'license', - 'name', - 'oauthId', - 'profileChangedAt', - 'profileImagePath', - 'quotaSizeInBytes', - 'quotaUsageInBytes', - 'shouldChangePassword', - 'status', - 'storageLabel', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_update_dto.dart b/mobile/openapi/lib/model/user_admin_update_dto.dart deleted file mode 100644 index f1b91d8e61..0000000000 --- a/mobile/openapi/lib/model/user_admin_update_dto.dart +++ /dev/null @@ -1,222 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserAdminUpdateDto { - /// Returns a new [UserAdminUpdateDto] instance. - UserAdminUpdateDto({ - this.avatarColor = const Optional.absent(), - this.email = const Optional.absent(), - this.isAdmin = const Optional.absent(), - this.name = const Optional.absent(), - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - this.quotaSizeInBytes = const Optional.absent(), - this.shouldChangePassword = const Optional.absent(), - this.storageLabel = const Optional.absent(), - }); - - Optional avatarColor; - - /// User email - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional email; - - /// Grant admin privileges - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isAdmin; - - /// User name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// User password - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - /// PIN code - Optional pinCode; - - /// Storage quota in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional quotaSizeInBytes; - - /// Require password change on next login - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional shouldChangePassword; - - /// Storage label - Optional storageLabel; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminUpdateDto && - other.avatarColor == avatarColor && - other.email == email && - other.isAdmin == isAdmin && - other.name == name && - other.password == password && - other.pinCode == pinCode && - other.quotaSizeInBytes == quotaSizeInBytes && - other.shouldChangePassword == shouldChangePassword && - other.storageLabel == storageLabel; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (isAdmin == null ? 0 : isAdmin!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode); - - @override - String toString() => 'UserAdminUpdateDto[avatarColor=$avatarColor, email=$email, isAdmin=$isAdmin, name=$name, password=$password, pinCode=$pinCode, quotaSizeInBytes=$quotaSizeInBytes, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.email.isPresent) { - final value = this.email.value; - json[r'email'] = value; - } - if (this.isAdmin.isPresent) { - final value = this.isAdmin.value; - json[r'isAdmin'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - if (this.quotaSizeInBytes.isPresent) { - final value = this.quotaSizeInBytes.value; - json[r'quotaSizeInBytes'] = value; - } - if (this.shouldChangePassword.isPresent) { - final value = this.shouldChangePassword.value; - json[r'shouldChangePassword'] = value; - } - if (this.storageLabel.isPresent) { - final value = this.storageLabel.value; - json[r'storageLabel'] = value; - } - return json; - } - - /// Returns a new [UserAdminUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminUpdateDto( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - email: json.containsKey(r'email') ? Optional.present(mapValueOfType(json, r'email')) : const Optional.absent(), - isAdmin: json.containsKey(r'isAdmin') ? Optional.present(mapValueOfType(json, r'isAdmin')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - quotaSizeInBytes: json.containsKey(r'quotaSizeInBytes') ? Optional.present(json[r'quotaSizeInBytes'] == null ? null : int.parse('${json[r'quotaSizeInBytes']}')) : const Optional.absent(), - shouldChangePassword: json.containsKey(r'shouldChangePassword') ? Optional.present(mapValueOfType(json, r'shouldChangePassword')) : const Optional.absent(), - storageLabel: json.containsKey(r'storageLabel') ? Optional.present(mapValueOfType(json, r'storageLabel')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/user_avatar_color.dart b/mobile/openapi/lib/model/user_avatar_color.dart deleted file mode 100644 index d79818673f..0000000000 --- a/mobile/openapi/lib/model/user_avatar_color.dart +++ /dev/null @@ -1,106 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// User avatar color -enum UserAvatarColor { - primary._(r'primary'), - pink._(r'pink'), - red._(r'red'), - yellow._(r'yellow'), - blue._(r'blue'), - green._(r'green'), - purple._(r'purple'), - orange._(r'orange'), - gray._(r'gray'), - amber._(r'amber'), - ; - - /// Instantiate a new enum with the provided value. - const UserAvatarColor._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [UserAvatarColor] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static UserAvatarColor? fromJson(dynamic value) => UserAvatarColorTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [UserAvatarColor] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAvatarColor.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [UserAvatarColor] to String, -/// and [decode] dynamic data back to [UserAvatarColor]. -class UserAvatarColorTypeTransformer { - factory UserAvatarColorTypeTransformer() => _instance ??= const UserAvatarColorTypeTransformer._(); - - const UserAvatarColorTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(UserAvatarColor data) => data._value; - - /// Returns the instance of [UserAvatarColor] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - UserAvatarColor? decode(dynamic data, {bool allowNull = true}) { - if (data is UserAvatarColor) { - return data; - } - if (data != null) { - switch (data) { - case r'primary': return UserAvatarColor.primary; - case r'pink': return UserAvatarColor.pink; - case r'red': return UserAvatarColor.red; - case r'yellow': return UserAvatarColor.yellow; - case r'blue': return UserAvatarColor.blue; - case r'green': return UserAvatarColor.green; - case r'purple': return UserAvatarColor.purple; - case r'orange': return UserAvatarColor.orange; - case r'gray': return UserAvatarColor.gray; - case r'amber': return UserAvatarColor.amber; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static UserAvatarColorTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/user_license.dart b/mobile/openapi/lib/model/user_license.dart deleted file mode 100644 index 87f5bd74da..0000000000 --- a/mobile/openapi/lib/model/user_license.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserLicense { - /// Returns a new [UserLicense] instance. - UserLicense({ - required this.activatedAt, - required this.activationKey, - required this.licenseKey, - }); - - /// Activation date - DateTime activatedAt; - - /// Activation key - String activationKey; - - /// License key (format: /^IM(SV|CL)(-[\\dA-Za-z]{4}){8}$/) - String licenseKey; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserLicense && - other.activatedAt == activatedAt && - other.activationKey == activationKey && - other.licenseKey == licenseKey; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (activatedAt.hashCode) + - (activationKey.hashCode) + - (licenseKey.hashCode); - - @override - String toString() => 'UserLicense[activatedAt=$activatedAt, activationKey=$activationKey, licenseKey=$licenseKey]'; - - Map toJson() { - final json = {}; - json[r'activatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.activatedAt.millisecondsSinceEpoch - : this.activatedAt.toUtc().toIso8601String(); - json[r'activationKey'] = this.activationKey; - json[r'licenseKey'] = this.licenseKey; - return json; - } - - /// Returns a new [UserLicense] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserLicense? fromJson(dynamic value) { - upgradeDto(value, "UserLicense"); - if (value is Map) { - final json = value.cast(); - - return UserLicense( - activatedAt: mapDateTime(json, r'activatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - activationKey: mapValueOfType(json, r'activationKey')!, - licenseKey: mapValueOfType(json, r'licenseKey')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserLicense.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserLicense.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserLicense-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserLicense.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'activatedAt', - 'activationKey', - 'licenseKey', - }; -} - diff --git a/mobile/openapi/lib/model/user_metadata_key.dart b/mobile/openapi/lib/model/user_metadata_key.dart deleted file mode 100644 index 0965fbf73f..0000000000 --- a/mobile/openapi/lib/model/user_metadata_key.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// User metadata key -enum UserMetadataKey { - preferences._(r'preferences'), - license._(r'license'), - onboarding._(r'onboarding'), - ; - - /// Instantiate a new enum with the provided value. - const UserMetadataKey._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [UserMetadataKey] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static UserMetadataKey? fromJson(dynamic value) => UserMetadataKeyTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [UserMetadataKey] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserMetadataKey.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [UserMetadataKey] to String, -/// and [decode] dynamic data back to [UserMetadataKey]. -class UserMetadataKeyTypeTransformer { - factory UserMetadataKeyTypeTransformer() => _instance ??= const UserMetadataKeyTypeTransformer._(); - - const UserMetadataKeyTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(UserMetadataKey data) => data._value; - - /// Returns the instance of [UserMetadataKey] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - UserMetadataKey? decode(dynamic data, {bool allowNull = true}) { - if (data is UserMetadataKey) { - return data; - } - if (data != null) { - switch (data) { - case r'preferences': return UserMetadataKey.preferences; - case r'license': return UserMetadataKey.license; - case r'onboarding': return UserMetadataKey.onboarding; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static UserMetadataKeyTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/user_preferences_response_dto.dart b/mobile/openapi/lib/model/user_preferences_response_dto.dart deleted file mode 100644 index 25de4fd985..0000000000 --- a/mobile/openapi/lib/model/user_preferences_response_dto.dart +++ /dev/null @@ -1,187 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserPreferencesResponseDto { - /// Returns a new [UserPreferencesResponseDto] instance. - UserPreferencesResponseDto({ - required this.albums, - required this.cast, - required this.download, - required this.emailNotifications, - required this.folders, - required this.memories, - required this.people, - required this.purchase, - required this.ratings, - required this.recentlyAdded, - required this.sharedLinks, - required this.tags, - }); - - AlbumsResponse albums; - - CastResponse cast; - - DownloadResponse download; - - EmailNotificationsResponse emailNotifications; - - FoldersResponse folders; - - MemoriesResponse memories; - - PeopleResponse people; - - PurchaseResponse purchase; - - RatingsResponse ratings; - - RecentlyAddedResponse recentlyAdded; - - SharedLinksResponse sharedLinks; - - TagsResponse tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserPreferencesResponseDto && - other.albums == albums && - other.cast == cast && - other.download == download && - other.emailNotifications == emailNotifications && - other.folders == folders && - other.memories == memories && - other.people == people && - other.purchase == purchase && - other.ratings == ratings && - other.recentlyAdded == recentlyAdded && - other.sharedLinks == sharedLinks && - other.tags == tags; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (cast.hashCode) + - (download.hashCode) + - (emailNotifications.hashCode) + - (folders.hashCode) + - (memories.hashCode) + - (people.hashCode) + - (purchase.hashCode) + - (ratings.hashCode) + - (recentlyAdded.hashCode) + - (sharedLinks.hashCode) + - (tags.hashCode); - - @override - String toString() => 'UserPreferencesResponseDto[albums=$albums, cast=$cast, download=$download, emailNotifications=$emailNotifications, folders=$folders, memories=$memories, people=$people, purchase=$purchase, ratings=$ratings, recentlyAdded=$recentlyAdded, sharedLinks=$sharedLinks, tags=$tags]'; - - Map toJson() { - final json = {}; - json[r'albums'] = this.albums; - json[r'cast'] = this.cast; - json[r'download'] = this.download; - json[r'emailNotifications'] = this.emailNotifications; - json[r'folders'] = this.folders; - json[r'memories'] = this.memories; - json[r'people'] = this.people; - json[r'purchase'] = this.purchase; - json[r'ratings'] = this.ratings; - json[r'recentlyAdded'] = this.recentlyAdded; - json[r'sharedLinks'] = this.sharedLinks; - json[r'tags'] = this.tags; - return json; - } - - /// Returns a new [UserPreferencesResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserPreferencesResponseDto? fromJson(dynamic value) { - upgradeDto(value, "UserPreferencesResponseDto"); - if (value is Map) { - final json = value.cast(); - - return UserPreferencesResponseDto( - albums: AlbumsResponse.fromJson(json[r'albums'])!, - cast: CastResponse.fromJson(json[r'cast'])!, - download: DownloadResponse.fromJson(json[r'download'])!, - emailNotifications: EmailNotificationsResponse.fromJson(json[r'emailNotifications'])!, - folders: FoldersResponse.fromJson(json[r'folders'])!, - memories: MemoriesResponse.fromJson(json[r'memories'])!, - people: PeopleResponse.fromJson(json[r'people'])!, - purchase: PurchaseResponse.fromJson(json[r'purchase'])!, - ratings: RatingsResponse.fromJson(json[r'ratings'])!, - recentlyAdded: RecentlyAddedResponse.fromJson(json[r'recentlyAdded'])!, - sharedLinks: SharedLinksResponse.fromJson(json[r'sharedLinks'])!, - tags: TagsResponse.fromJson(json[r'tags'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserPreferencesResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserPreferencesResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserPreferencesResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserPreferencesResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albums', - 'cast', - 'download', - 'emailNotifications', - 'folders', - 'memories', - 'people', - 'purchase', - 'ratings', - 'recentlyAdded', - 'sharedLinks', - 'tags', - }; -} - diff --git a/mobile/openapi/lib/model/user_preferences_update_dto.dart b/mobile/openapi/lib/model/user_preferences_update_dto.dart deleted file mode 100644 index b1dbd95ae5..0000000000 --- a/mobile/openapi/lib/model/user_preferences_update_dto.dart +++ /dev/null @@ -1,299 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserPreferencesUpdateDto { - /// Returns a new [UserPreferencesUpdateDto] instance. - UserPreferencesUpdateDto({ - this.albums = const Optional.absent(), - this.avatar = const Optional.absent(), - this.cast = const Optional.absent(), - this.download = const Optional.absent(), - this.emailNotifications = const Optional.absent(), - this.folders = const Optional.absent(), - this.memories = const Optional.absent(), - this.people = const Optional.absent(), - this.purchase = const Optional.absent(), - this.ratings = const Optional.absent(), - this.recentlyAdded = const Optional.absent(), - this.sharedLinks = const Optional.absent(), - this.tags = const Optional.absent(), - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albums; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional avatar; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional cast; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional download; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional emailNotifications; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional folders; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional memories; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional people; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional purchase; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ratings; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional recentlyAdded; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sharedLinks; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserPreferencesUpdateDto && - other.albums == albums && - other.avatar == avatar && - other.cast == cast && - other.download == download && - other.emailNotifications == emailNotifications && - other.folders == folders && - other.memories == memories && - other.people == people && - other.purchase == purchase && - other.ratings == ratings && - other.recentlyAdded == recentlyAdded && - other.sharedLinks == sharedLinks && - other.tags == tags; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums == null ? 0 : albums!.hashCode) + - (avatar == null ? 0 : avatar!.hashCode) + - (cast == null ? 0 : cast!.hashCode) + - (download == null ? 0 : download!.hashCode) + - (emailNotifications == null ? 0 : emailNotifications!.hashCode) + - (folders == null ? 0 : folders!.hashCode) + - (memories == null ? 0 : memories!.hashCode) + - (people == null ? 0 : people!.hashCode) + - (purchase == null ? 0 : purchase!.hashCode) + - (ratings == null ? 0 : ratings!.hashCode) + - (recentlyAdded == null ? 0 : recentlyAdded!.hashCode) + - (sharedLinks == null ? 0 : sharedLinks!.hashCode) + - (tags == null ? 0 : tags!.hashCode); - - @override - String toString() => 'UserPreferencesUpdateDto[albums=$albums, avatar=$avatar, cast=$cast, download=$download, emailNotifications=$emailNotifications, folders=$folders, memories=$memories, people=$people, purchase=$purchase, ratings=$ratings, recentlyAdded=$recentlyAdded, sharedLinks=$sharedLinks, tags=$tags]'; - - Map toJson() { - final json = {}; - if (this.albums.isPresent) { - final value = this.albums.value; - json[r'albums'] = value; - } - if (this.avatar.isPresent) { - final value = this.avatar.value; - json[r'avatar'] = value; - } - if (this.cast.isPresent) { - final value = this.cast.value; - json[r'cast'] = value; - } - if (this.download.isPresent) { - final value = this.download.value; - json[r'download'] = value; - } - if (this.emailNotifications.isPresent) { - final value = this.emailNotifications.value; - json[r'emailNotifications'] = value; - } - if (this.folders.isPresent) { - final value = this.folders.value; - json[r'folders'] = value; - } - if (this.memories.isPresent) { - final value = this.memories.value; - json[r'memories'] = value; - } - if (this.people.isPresent) { - final value = this.people.value; - json[r'people'] = value; - } - if (this.purchase.isPresent) { - final value = this.purchase.value; - json[r'purchase'] = value; - } - if (this.ratings.isPresent) { - final value = this.ratings.value; - json[r'ratings'] = value; - } - if (this.recentlyAdded.isPresent) { - final value = this.recentlyAdded.value; - json[r'recentlyAdded'] = value; - } - if (this.sharedLinks.isPresent) { - final value = this.sharedLinks.value; - json[r'sharedLinks'] = value; - } - if (this.tags.isPresent) { - final value = this.tags.value; - json[r'tags'] = value; - } - return json; - } - - /// Returns a new [UserPreferencesUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserPreferencesUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "UserPreferencesUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return UserPreferencesUpdateDto( - albums: json.containsKey(r'albums') ? Optional.present(AlbumsUpdate.fromJson(json[r'albums'])) : const Optional.absent(), - avatar: json.containsKey(r'avatar') ? Optional.present(AvatarUpdate.fromJson(json[r'avatar'])) : const Optional.absent(), - cast: json.containsKey(r'cast') ? Optional.present(CastUpdate.fromJson(json[r'cast'])) : const Optional.absent(), - download: json.containsKey(r'download') ? Optional.present(DownloadUpdate.fromJson(json[r'download'])) : const Optional.absent(), - emailNotifications: json.containsKey(r'emailNotifications') ? Optional.present(EmailNotificationsUpdate.fromJson(json[r'emailNotifications'])) : const Optional.absent(), - folders: json.containsKey(r'folders') ? Optional.present(FoldersUpdate.fromJson(json[r'folders'])) : const Optional.absent(), - memories: json.containsKey(r'memories') ? Optional.present(MemoriesUpdate.fromJson(json[r'memories'])) : const Optional.absent(), - people: json.containsKey(r'people') ? Optional.present(PeopleUpdate.fromJson(json[r'people'])) : const Optional.absent(), - purchase: json.containsKey(r'purchase') ? Optional.present(PurchaseUpdate.fromJson(json[r'purchase'])) : const Optional.absent(), - ratings: json.containsKey(r'ratings') ? Optional.present(RatingsUpdate.fromJson(json[r'ratings'])) : const Optional.absent(), - recentlyAdded: json.containsKey(r'recentlyAdded') ? Optional.present(RecentlyAddedUpdate.fromJson(json[r'recentlyAdded'])) : const Optional.absent(), - sharedLinks: json.containsKey(r'sharedLinks') ? Optional.present(SharedLinksUpdate.fromJson(json[r'sharedLinks'])) : const Optional.absent(), - tags: json.containsKey(r'tags') ? Optional.present(TagsUpdate.fromJson(json[r'tags'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserPreferencesUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserPreferencesUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserPreferencesUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserPreferencesUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/user_response_dto.dart b/mobile/openapi/lib/model/user_response_dto.dart deleted file mode 100644 index f671072c72..0000000000 --- a/mobile/openapi/lib/model/user_response_dto.dart +++ /dev/null @@ -1,144 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserResponseDto { - /// Returns a new [UserResponseDto] instance. - UserResponseDto({ - required this.avatarColor, - required this.email, - required this.id, - required this.name, - required this.profileChangedAt, - required this.profileImagePath, - }); - - UserAvatarColor avatarColor; - - /// User email - String email; - - /// User ID - String id; - - /// User name - String name; - - /// Profile change date - DateTime profileChangedAt; - - /// Profile image path - String profileImagePath; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserResponseDto && - other.avatarColor == avatarColor && - other.email == email && - other.id == id && - other.name == name && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor.hashCode) + - (email.hashCode) + - (id.hashCode) + - (name.hashCode) + - (profileChangedAt.hashCode) + - (profileImagePath.hashCode); - - @override - String toString() => 'UserResponseDto[avatarColor=$avatarColor, email=$email, id=$id, name=$name, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath]'; - - Map toJson() { - final json = {}; - json[r'avatarColor'] = this.avatarColor; - json[r'email'] = this.email; - json[r'id'] = this.id; - json[r'name'] = this.name; - json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - return json; - } - - /// Returns a new [UserResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserResponseDto? fromJson(dynamic value) { - upgradeDto(value, "UserResponseDto"); - if (value is Map) { - final json = value.cast(); - - return UserResponseDto( - avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!, - email: mapValueOfType(json, r'email')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'avatarColor', - 'email', - 'id', - 'name', - 'profileChangedAt', - 'profileImagePath', - }; -} - diff --git a/mobile/openapi/lib/model/user_status.dart b/mobile/openapi/lib/model/user_status.dart deleted file mode 100644 index 9def2adfe0..0000000000 --- a/mobile/openapi/lib/model/user_status.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// User status -enum UserStatus { - active._(r'active'), - removing._(r'removing'), - deleted._(r'deleted'), - ; - - /// Instantiate a new enum with the provided value. - const UserStatus._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [UserStatus] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static UserStatus? fromJson(dynamic value) => UserStatusTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [UserStatus] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserStatus.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [UserStatus] to String, -/// and [decode] dynamic data back to [UserStatus]. -class UserStatusTypeTransformer { - factory UserStatusTypeTransformer() => _instance ??= const UserStatusTypeTransformer._(); - - const UserStatusTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(UserStatus data) => data._value; - - /// Returns the instance of [UserStatus] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - UserStatus? decode(dynamic data, {bool allowNull = true}) { - if (data is UserStatus) { - return data; - } - if (data != null) { - switch (data) { - case r'active': return UserStatus.active; - case r'removing': return UserStatus.removing; - case r'deleted': return UserStatus.deleted; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static UserStatusTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/user_update_me_dto.dart b/mobile/openapi/lib/model/user_update_me_dto.dart deleted file mode 100644 index c4859747a6..0000000000 --- a/mobile/openapi/lib/model/user_update_me_dto.dart +++ /dev/null @@ -1,152 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserUpdateMeDto { - /// Returns a new [UserUpdateMeDto] instance. - UserUpdateMeDto({ - this.avatarColor = const Optional.absent(), - this.email = const Optional.absent(), - this.name = const Optional.absent(), - this.password = const Optional.absent(), - }); - - Optional avatarColor; - - /// User email - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional email; - - /// User name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// User password (deprecated, use change password endpoint) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserUpdateMeDto && - other.avatarColor == avatarColor && - other.email == email && - other.name == name && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (password == null ? 0 : password!.hashCode); - - @override - String toString() => 'UserUpdateMeDto[avatarColor=$avatarColor, email=$email, name=$name, password=$password]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.email.isPresent) { - final value = this.email.value; - json[r'email'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - return json; - } - - /// Returns a new [UserUpdateMeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserUpdateMeDto? fromJson(dynamic value) { - upgradeDto(value, "UserUpdateMeDto"); - if (value is Map) { - final json = value.cast(); - - return UserUpdateMeDto( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - email: json.containsKey(r'email') ? Optional.present(mapValueOfType(json, r'email')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserUpdateMeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserUpdateMeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserUpdateMeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserUpdateMeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/validate_access_token_response_dto.dart b/mobile/openapi/lib/model/validate_access_token_response_dto.dart deleted file mode 100644 index 16b9d0f925..0000000000 --- a/mobile/openapi/lib/model/validate_access_token_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ValidateAccessTokenResponseDto { - /// Returns a new [ValidateAccessTokenResponseDto] instance. - ValidateAccessTokenResponseDto({ - required this.authStatus, - }); - - /// Authentication status - bool authStatus; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateAccessTokenResponseDto && - other.authStatus == authStatus; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (authStatus.hashCode); - - @override - String toString() => 'ValidateAccessTokenResponseDto[authStatus=$authStatus]'; - - Map toJson() { - final json = {}; - json[r'authStatus'] = this.authStatus; - return json; - } - - /// Returns a new [ValidateAccessTokenResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateAccessTokenResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateAccessTokenResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateAccessTokenResponseDto( - authStatus: mapValueOfType(json, r'authStatus')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateAccessTokenResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateAccessTokenResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateAccessTokenResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateAccessTokenResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'authStatus', - }; -} - diff --git a/mobile/openapi/lib/model/validate_library_dto.dart b/mobile/openapi/lib/model/validate_library_dto.dart deleted file mode 100644 index 6d85712191..0000000000 --- a/mobile/openapi/lib/model/validate_library_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ValidateLibraryDto { - /// Returns a new [ValidateLibraryDto] instance. - ValidateLibraryDto({ - this.exclusionPatterns = const Optional.present(const []), - this.importPaths = const Optional.present(const []), - }); - - /// Exclusion patterns (max 128) - Optional?> exclusionPatterns; - - /// Import paths to validate (max 128) - Optional?> importPaths; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateLibraryDto && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - _deepEquality.equals(other.importPaths, importPaths); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (exclusionPatterns.hashCode) + - (importPaths.hashCode); - - @override - String toString() => 'ValidateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths]'; - - Map toJson() { - final json = {}; - if (this.exclusionPatterns.isPresent) { - final value = this.exclusionPatterns.value; - json[r'exclusionPatterns'] = value; - } - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - return json; - } - - /// Returns a new [ValidateLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateLibraryDto( - exclusionPatterns: json.containsKey(r'exclusionPatterns') ? Optional.present(json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - importPaths: json.containsKey(r'importPaths') ? Optional.present(json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/validate_library_import_path_response_dto.dart b/mobile/openapi/lib/model/validate_library_import_path_response_dto.dart deleted file mode 100644 index 3c8d7c58cd..0000000000 --- a/mobile/openapi/lib/model/validate_library_import_path_response_dto.dart +++ /dev/null @@ -1,126 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ValidateLibraryImportPathResponseDto { - /// Returns a new [ValidateLibraryImportPathResponseDto] instance. - ValidateLibraryImportPathResponseDto({ - required this.importPath, - required this.isValid, - this.message = const Optional.absent(), - }); - - /// Import path - String importPath; - - /// Is valid - bool isValid; - - /// Validation message - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional message; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateLibraryImportPathResponseDto && - other.importPath == importPath && - other.isValid == isValid && - other.message == message; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (importPath.hashCode) + - (isValid.hashCode) + - (message == null ? 0 : message!.hashCode); - - @override - String toString() => 'ValidateLibraryImportPathResponseDto[importPath=$importPath, isValid=$isValid, message=$message]'; - - Map toJson() { - final json = {}; - json[r'importPath'] = this.importPath; - json[r'isValid'] = this.isValid; - if (this.message.isPresent) { - final value = this.message.value; - json[r'message'] = value; - } - return json; - } - - /// Returns a new [ValidateLibraryImportPathResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateLibraryImportPathResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateLibraryImportPathResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateLibraryImportPathResponseDto( - importPath: mapValueOfType(json, r'importPath')!, - isValid: mapValueOfType(json, r'isValid')!, - message: json.containsKey(r'message') ? Optional.present(mapValueOfType(json, r'message')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateLibraryImportPathResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateLibraryImportPathResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateLibraryImportPathResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateLibraryImportPathResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'importPath', - 'isValid', - }; -} - diff --git a/mobile/openapi/lib/model/validate_library_response_dto.dart b/mobile/openapi/lib/model/validate_library_response_dto.dart deleted file mode 100644 index 5106b93ca8..0000000000 --- a/mobile/openapi/lib/model/validate_library_response_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ValidateLibraryResponseDto { - /// Returns a new [ValidateLibraryResponseDto] instance. - ValidateLibraryResponseDto({ - this.importPaths = const Optional.present(const []), - }); - - /// Validation results for import paths - Optional?> importPaths; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateLibraryResponseDto && - _deepEquality.equals(other.importPaths, importPaths); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (importPaths.hashCode); - - @override - String toString() => 'ValidateLibraryResponseDto[importPaths=$importPaths]'; - - Map toJson() { - final json = {}; - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - return json; - } - - /// Returns a new [ValidateLibraryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateLibraryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateLibraryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateLibraryResponseDto( - importPaths: json.containsKey(r'importPaths') ? Optional.present(ValidateLibraryImportPathResponseDto.listFromJson(json[r'importPaths'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateLibraryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateLibraryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateLibraryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateLibraryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/version_check_state_response_dto.dart b/mobile/openapi/lib/model/version_check_state_response_dto.dart deleted file mode 100644 index 4ad9458a1b..0000000000 --- a/mobile/openapi/lib/model/version_check_state_response_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class VersionCheckStateResponseDto { - /// Returns a new [VersionCheckStateResponseDto] instance. - VersionCheckStateResponseDto({ - required this.checkedAt, - required this.releaseVersion, - }); - - /// Last check timestamp - String? checkedAt; - - /// Release version - String? releaseVersion; - - @override - bool operator ==(Object other) => identical(this, other) || other is VersionCheckStateResponseDto && - other.checkedAt == checkedAt && - other.releaseVersion == releaseVersion; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checkedAt == null ? 0 : checkedAt!.hashCode) + - (releaseVersion == null ? 0 : releaseVersion!.hashCode); - - @override - String toString() => 'VersionCheckStateResponseDto[checkedAt=$checkedAt, releaseVersion=$releaseVersion]'; - - Map toJson() { - final json = {}; - if (this.checkedAt != null) { - json[r'checkedAt'] = this.checkedAt; - } else { - json[r'checkedAt'] = null; - } - if (this.releaseVersion != null) { - json[r'releaseVersion'] = this.releaseVersion; - } else { - json[r'releaseVersion'] = null; - } - return json; - } - - /// Returns a new [VersionCheckStateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static VersionCheckStateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "VersionCheckStateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return VersionCheckStateResponseDto( - checkedAt: mapValueOfType(json, r'checkedAt'), - releaseVersion: mapValueOfType(json, r'releaseVersion'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = VersionCheckStateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = VersionCheckStateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of VersionCheckStateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = VersionCheckStateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checkedAt', - 'releaseVersion', - }; -} - diff --git a/mobile/openapi/lib/model/video_codec.dart b/mobile/openapi/lib/model/video_codec.dart deleted file mode 100644 index c725a1db41..0000000000 --- a/mobile/openapi/lib/model/video_codec.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Target video codec -enum VideoCodec { - h264._(r'h264'), - hevc._(r'hevc'), - vp9._(r'vp9'), - av1._(r'av1'), - ; - - /// Instantiate a new enum with the provided value. - const VideoCodec._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [VideoCodec] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static VideoCodec? fromJson(dynamic value) => VideoCodecTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [VideoCodec] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = VideoCodec.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [VideoCodec] to String, -/// and [decode] dynamic data back to [VideoCodec]. -class VideoCodecTypeTransformer { - factory VideoCodecTypeTransformer() => _instance ??= const VideoCodecTypeTransformer._(); - - const VideoCodecTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(VideoCodec data) => data._value; - - /// Returns the instance of [VideoCodec] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - VideoCodec? decode(dynamic data, {bool allowNull = true}) { - if (data is VideoCodec) { - return data; - } - if (data != null) { - switch (data) { - case r'h264': return VideoCodec.h264; - case r'hevc': return VideoCodec.hevc; - case r'vp9': return VideoCodec.vp9; - case r'av1': return VideoCodec.av1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static VideoCodecTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/video_container.dart b/mobile/openapi/lib/model/video_container.dart deleted file mode 100644 index 9d1898a7e4..0000000000 --- a/mobile/openapi/lib/model/video_container.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Accepted video containers -enum VideoContainer { - mov._(r'mov'), - mp4._(r'mp4'), - ogg._(r'ogg'), - webm._(r'webm'), - ; - - /// Instantiate a new enum with the provided value. - const VideoContainer._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [VideoContainer] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static VideoContainer? fromJson(dynamic value) => VideoContainerTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [VideoContainer] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = VideoContainer.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [VideoContainer] to String, -/// and [decode] dynamic data back to [VideoContainer]. -class VideoContainerTypeTransformer { - factory VideoContainerTypeTransformer() => _instance ??= const VideoContainerTypeTransformer._(); - - const VideoContainerTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(VideoContainer data) => data._value; - - /// Returns the instance of [VideoContainer] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - VideoContainer? decode(dynamic data, {bool allowNull = true}) { - if (data is VideoContainer) { - return data; - } - if (data != null) { - switch (data) { - case r'mov': return VideoContainer.mov; - case r'mp4': return VideoContainer.mp4; - case r'ogg': return VideoContainer.ogg; - case r'webm': return VideoContainer.webm; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static VideoContainerTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/workflow_create_dto.dart b/mobile/openapi/lib/model/workflow_create_dto.dart deleted file mode 100644 index e84554e8c9..0000000000 --- a/mobile/openapi/lib/model/workflow_create_dto.dart +++ /dev/null @@ -1,148 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowCreateDto { - /// Returns a new [WorkflowCreateDto] instance. - WorkflowCreateDto({ - this.description = const Optional.absent(), - this.enabled = const Optional.absent(), - this.name = const Optional.absent(), - this.steps = const Optional.present(const []), - required this.trigger, - }); - - /// Workflow description - Optional description; - - /// Workflow enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Workflow name - Optional name; - - Optional?> steps; - - WorkflowTrigger trigger; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowCreateDto && - other.description == description && - other.enabled == enabled && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description == null ? 0 : description!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger.hashCode); - - @override - String toString() => 'WorkflowCreateDto[description=$description, enabled=$enabled, name=$name, steps=$steps, trigger=$trigger]'; - - Map toJson() { - final json = {}; - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.steps.isPresent) { - final value = this.steps.value; - json[r'steps'] = value; - } - json[r'trigger'] = this.trigger; - return json; - } - - /// Returns a new [WorkflowCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowCreateDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowCreateDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowCreateDto( - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - steps: json.containsKey(r'steps') ? Optional.present(WorkflowStepDto.listFromJson(json[r'steps'])) : const Optional.absent(), - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'trigger', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_response_dto.dart b/mobile/openapi/lib/model/workflow_response_dto.dart deleted file mode 100644 index b2b5586601..0000000000 --- a/mobile/openapi/lib/model/workflow_response_dto.dart +++ /dev/null @@ -1,170 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowResponseDto { - /// Returns a new [WorkflowResponseDto] instance. - WorkflowResponseDto({ - required this.createdAt, - required this.description, - required this.enabled, - required this.id, - required this.name, - this.steps = const [], - required this.trigger, - required this.updatedAt, - }); - - /// Creation date - String createdAt; - - /// Workflow description - String? description; - - /// Workflow enabled - bool enabled; - - /// Workflow ID - String id; - - /// Workflow name - String? name; - - /// Workflow steps - List steps; - - WorkflowTrigger trigger; - - /// Update date - String updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowResponseDto && - other.createdAt == createdAt && - other.description == description && - other.enabled == enabled && - other.id == id && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (description == null ? 0 : description!.hashCode) + - (enabled.hashCode) + - (id.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'WorkflowResponseDto[createdAt=$createdAt, description=$description, enabled=$enabled, id=$id, name=$name, steps=$steps, trigger=$trigger, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = this.createdAt; - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - json[r'enabled'] = this.enabled; - json[r'id'] = this.id; - if (this.name != null) { - json[r'name'] = this.name; - } else { - json[r'name'] = null; - } - json[r'steps'] = this.steps; - json[r'trigger'] = this.trigger; - json[r'updatedAt'] = this.updatedAt; - return json; - } - - /// Returns a new [WorkflowResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowResponseDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowResponseDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowResponseDto( - createdAt: mapValueOfType(json, r'createdAt')!, - description: mapValueOfType(json, r'description'), - enabled: mapValueOfType(json, r'enabled')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name'), - steps: WorkflowStepDto.listFromJson(json[r'steps']), - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'description', - 'enabled', - 'id', - 'name', - 'steps', - 'trigger', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_share_response_dto.dart b/mobile/openapi/lib/model/workflow_share_response_dto.dart deleted file mode 100644 index d7e90085c2..0000000000 --- a/mobile/openapi/lib/model/workflow_share_response_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowShareResponseDto { - /// Returns a new [WorkflowShareResponseDto] instance. - WorkflowShareResponseDto({ - required this.description, - required this.name, - this.steps = const [], - required this.trigger, - }); - - /// Workflow description - String? description; - - /// Workflow name - String? name; - - /// Workflow steps - List steps; - - WorkflowTrigger trigger; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowShareResponseDto && - other.description == description && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description == null ? 0 : description!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger.hashCode); - - @override - String toString() => 'WorkflowShareResponseDto[description=$description, name=$name, steps=$steps, trigger=$trigger]'; - - Map toJson() { - final json = {}; - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - if (this.name != null) { - json[r'name'] = this.name; - } else { - json[r'name'] = null; - } - json[r'steps'] = this.steps; - json[r'trigger'] = this.trigger; - return json; - } - - /// Returns a new [WorkflowShareResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowShareResponseDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowShareResponseDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowShareResponseDto( - description: mapValueOfType(json, r'description'), - name: mapValueOfType(json, r'name'), - steps: WorkflowShareStepDto.listFromJson(json[r'steps']), - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowShareResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowShareResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowShareResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowShareResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'description', - 'name', - 'steps', - 'trigger', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_share_step_dto.dart b/mobile/openapi/lib/model/workflow_share_step_dto.dart deleted file mode 100644 index eeb6ba4e51..0000000000 --- a/mobile/openapi/lib/model/workflow_share_step_dto.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowShareStepDto { - /// Returns a new [WorkflowShareStepDto] instance. - WorkflowShareStepDto({ - this.config = const {}, - this.enabled = const Optional.absent(), - required this.method, - }); - - /// Step configuration - Map? config; - - /// Step is enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Step plugin method - String method; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowShareStepDto && - _deepEquality.equals(other.config, config) && - other.enabled == enabled && - other.method == method; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (config == null ? 0 : config!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (method.hashCode); - - @override - String toString() => 'WorkflowShareStepDto[config=$config, enabled=$enabled, method=$method]'; - - Map toJson() { - final json = {}; - if (this.config != null) { - json[r'config'] = this.config; - } else { - json[r'config'] = null; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - json[r'method'] = this.method; - return json; - } - - /// Returns a new [WorkflowShareStepDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowShareStepDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowShareStepDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowShareStepDto( - config: mapCastOfType(json, r'config'), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - method: mapValueOfType(json, r'method')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowShareStepDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowShareStepDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowShareStepDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowShareStepDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'config', - 'method', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_step_dto.dart b/mobile/openapi/lib/model/workflow_step_dto.dart deleted file mode 100644 index c01e8e6b44..0000000000 --- a/mobile/openapi/lib/model/workflow_step_dto.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowStepDto { - /// Returns a new [WorkflowStepDto] instance. - WorkflowStepDto({ - this.config = const {}, - this.enabled = const Optional.absent(), - required this.method, - }); - - /// Step configuration - Map? config; - - /// Step is enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Step plugin method - String method; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowStepDto && - _deepEquality.equals(other.config, config) && - other.enabled == enabled && - other.method == method; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (config == null ? 0 : config!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (method.hashCode); - - @override - String toString() => 'WorkflowStepDto[config=$config, enabled=$enabled, method=$method]'; - - Map toJson() { - final json = {}; - if (this.config != null) { - json[r'config'] = this.config; - } else { - json[r'config'] = null; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - json[r'method'] = this.method; - return json; - } - - /// Returns a new [WorkflowStepDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowStepDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowStepDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowStepDto( - config: mapCastOfType(json, r'config'), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - method: mapValueOfType(json, r'method')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowStepDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowStepDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowStepDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowStepDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'config', - 'method', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_trigger.dart b/mobile/openapi/lib/model/workflow_trigger.dart deleted file mode 100644 index 2780b909b6..0000000000 --- a/mobile/openapi/lib/model/workflow_trigger.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Plugin trigger type -enum WorkflowTrigger { - assetCreate._(r'AssetCreate'), - assetMetadataExtraction._(r'AssetMetadataExtraction'), - ; - - /// Instantiate a new enum with the provided value. - const WorkflowTrigger._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [WorkflowTrigger] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static WorkflowTrigger? fromJson(dynamic value) => WorkflowTriggerTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [WorkflowTrigger] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowTrigger.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [WorkflowTrigger] to String, -/// and [decode] dynamic data back to [WorkflowTrigger]. -class WorkflowTriggerTypeTransformer { - factory WorkflowTriggerTypeTransformer() => _instance ??= const WorkflowTriggerTypeTransformer._(); - - const WorkflowTriggerTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(WorkflowTrigger data) => data._value; - - /// Returns the instance of [WorkflowTrigger] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - WorkflowTrigger? decode(dynamic data, {bool allowNull = true}) { - if (data is WorkflowTrigger) { - return data; - } - if (data != null) { - switch (data) { - case r'AssetCreate': return WorkflowTrigger.assetCreate; - case r'AssetMetadataExtraction': return WorkflowTrigger.assetMetadataExtraction; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static WorkflowTriggerTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/workflow_trigger_response_dto.dart b/mobile/openapi/lib/model/workflow_trigger_response_dto.dart deleted file mode 100644 index 6e24e1559a..0000000000 --- a/mobile/openapi/lib/model/workflow_trigger_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowTriggerResponseDto { - /// Returns a new [WorkflowTriggerResponseDto] instance. - WorkflowTriggerResponseDto({ - required this.trigger, - this.types = const [], - }); - - WorkflowTrigger trigger; - - /// Workflow types - List types; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowTriggerResponseDto && - other.trigger == trigger && - _deepEquality.equals(other.types, types); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (trigger.hashCode) + - (types.hashCode); - - @override - String toString() => 'WorkflowTriggerResponseDto[trigger=$trigger, types=$types]'; - - Map toJson() { - final json = {}; - json[r'trigger'] = this.trigger; - json[r'types'] = this.types; - return json; - } - - /// Returns a new [WorkflowTriggerResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowTriggerResponseDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowTriggerResponseDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowTriggerResponseDto( - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - types: WorkflowType.listFromJson(json[r'types']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowTriggerResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowTriggerResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowTriggerResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowTriggerResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'trigger', - 'types', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_type.dart b/mobile/openapi/lib/model/workflow_type.dart deleted file mode 100644 index 598b8feb1b..0000000000 --- a/mobile/openapi/lib/model/workflow_type.dart +++ /dev/null @@ -1,88 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Workflow type -enum WorkflowType { - assetV1._(r'AssetV1'), - ; - - /// Instantiate a new enum with the provided value. - const WorkflowType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [WorkflowType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static WorkflowType? fromJson(dynamic value) => WorkflowTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [WorkflowType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [WorkflowType] to String, -/// and [decode] dynamic data back to [WorkflowType]. -class WorkflowTypeTypeTransformer { - factory WorkflowTypeTypeTransformer() => _instance ??= const WorkflowTypeTypeTransformer._(); - - const WorkflowTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(WorkflowType data) => data._value; - - /// Returns the instance of [WorkflowType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - WorkflowType? decode(dynamic data, {bool allowNull = true}) { - if (data is WorkflowType) { - return data; - } - if (data != null) { - switch (data) { - case r'AssetV1': return WorkflowType.assetV1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static WorkflowTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/workflow_update_dto.dart b/mobile/openapi/lib/model/workflow_update_dto.dart deleted file mode 100644 index 32759b6395..0000000000 --- a/mobile/openapi/lib/model/workflow_update_dto.dart +++ /dev/null @@ -1,156 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowUpdateDto { - /// Returns a new [WorkflowUpdateDto] instance. - WorkflowUpdateDto({ - this.description = const Optional.absent(), - this.enabled = const Optional.absent(), - this.name = const Optional.absent(), - this.steps = const Optional.present(const []), - this.trigger = const Optional.absent(), - }); - - /// Workflow description - Optional description; - - /// Workflow enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Workflow name - Optional name; - - Optional?> steps; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trigger; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowUpdateDto && - other.description == description && - other.enabled == enabled && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description == null ? 0 : description!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger == null ? 0 : trigger!.hashCode); - - @override - String toString() => 'WorkflowUpdateDto[description=$description, enabled=$enabled, name=$name, steps=$steps, trigger=$trigger]'; - - Map toJson() { - final json = {}; - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.steps.isPresent) { - final value = this.steps.value; - json[r'steps'] = value; - } - if (this.trigger.isPresent) { - final value = this.trigger.value; - json[r'trigger'] = value; - } - return json; - } - - /// Returns a new [WorkflowUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowUpdateDto( - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - steps: json.containsKey(r'steps') ? Optional.present(WorkflowStepDto.listFromJson(json[r'steps'])) : const Optional.absent(), - trigger: json.containsKey(r'trigger') ? Optional.present(WorkflowTrigger.fromJson(json[r'trigger'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/optional.dart b/mobile/openapi/lib/optional.dart deleted file mode 100644 index f260ec4a84..0000000000 --- a/mobile/openapi/lib/optional.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Represents an optional value that can be either absent or present. -/// -/// This is used to distinguish between three states in PATCH operations: -/// - Absent: Field is not set (omitted from JSON) -/// - Present with null: Field is explicitly set to null -/// - Present with value: Field has a value -/// -/// Example usage: -/// ```dart -/// // Field absent - not sent in request -/// final patch1 = Model(); -/// -/// // Field explicitly null - sends {"field": null} -/// final patch2 = Model(field: const Optional.present(null)); -/// -/// // Field has value - sends {"field": "value"} -/// final patch3 = Model(field: const Optional.present('value')); -/// ``` -abstract class Optional { - const Optional(); - - /// Creates an Optional with an absent value (not set). - const factory Optional.absent() = Absent; - - /// Creates an Optional with a present value (can be null). - const factory Optional.present(T value) = Present; - - /// Returns true if this Optional has a value (even if that value is null). - bool get isPresent; - - /// Returns true if this Optional does not have a value. - bool get isEmpty => !isPresent; - - /// Returns the value if present, throws if absent. - T get value; - - /// Returns the value if present, otherwise returns [defaultValue]. - T orElse(T defaultValue); - - /// Returns the value if present, otherwise returns the result of calling [defaultValue]. - T orElseGet(T Function() defaultValue); - - /// Maps the value if present using [transform], otherwise returns an absent Optional. - Optional map(R Function(T value) transform); -} - -/// Represents an absent Optional value. -class Absent extends Optional { - const Absent(); - - @override - bool get isPresent => false; - - @override - T get value => throw StateError('No value present'); - - @override - T orElse(T defaultValue) => defaultValue; - - @override - T orElseGet(T Function() defaultValue) => defaultValue(); - - @override - Optional map(R Function(T value) transform) => const Absent(); - - @override - bool operator ==(Object other) => other is Absent; - - @override - int get hashCode => 0; - - @override - String toString() => 'Optional.absent()'; -} - -/// Represents a present Optional value. -class Present extends Optional { - const Present(this._value); - - final T _value; - - @override - bool get isPresent => true; - - @override - T get value => _value; - - @override - T orElse(T defaultValue) => _value; - - @override - T orElseGet(T Function() defaultValue) => _value; - - @override - Optional map(R Function(T value) transform) => Optional.present(transform(_value)); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is Present && _value == other._value); - - @override - int get hashCode => _value.hashCode; - - @override - String toString() => 'Optional.present($_value)'; -} diff --git a/mobile/openapi/pubspec.yaml b/mobile/openapi/pubspec.yaml deleted file mode 100644 index d541d530bb..0000000000 --- a/mobile/openapi/pubspec.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# -# AUTO-GENERATED FILE, DO NOT MODIFY! -# - -name: 'openapi' -version: '1.0.0' -description: 'OpenAPI API client' -homepage: 'homepage' -environment: - sdk: '>=2.17.0 <4.0.0' -dependencies: - collection: '>=1.17.0 <2.0.0' - http: '>=0.13.0 <2.0.0' - intl: any - meta: '>=1.1.8 <2.0.0' - immich_mobile: - path: ../ diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index caee4cde22..e0198f2683 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -1186,7 +1186,7 @@ packages: openapi: dependency: "direct main" description: - path: openapi + path: "generated/openapi" relative: true source: path version: "1.0.0" diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 811f8fd5bf..a55bcf515b 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -52,7 +52,7 @@ dependencies: network_info_plus: ^6.1.4 octo_image: ^2.1.0 openapi: - path: openapi + path: generated/openapi package_info_plus: ^8.3.1 path: ^1.9.1 path_provider: ^2.1.5 @@ -157,4 +157,4 @@ flutter_launcher_icons: analyzer: exclude: - - openapi/** + - generated/** diff --git a/open-api/bin/generate-dart-sdk.sh b/open-api/bin/generate-dart-sdk.sh index dd86970d18..200926afdf 100755 --- a/open-api/bin/generate-dart-sdk.sh +++ b/open-api/bin/generate-dart-sdk.sh @@ -11,15 +11,15 @@ openapi-generator-cli author template -g dart -o "$TEMPLATE_DIR" patch --no-backup-if-mismatch -u "$TEMPLATE_DIR/api.mustache" <./templates/mobile/api.mustache.patch patch --no-backup-if-mismatch -u "$TEMPLATE_DIR/serialization/native/native_class.mustache" <./templates/mobile/serialization/native/native_class.mustache.patch -rm -rf ../mobile/openapi +rm -rf ../mobile/generated/openapi -openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t "$TEMPLATE_DIR" --additional-properties=useOptional=true +openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/generated/openapi -t "$TEMPLATE_DIR" --additional-properties=useOptional=true # Post generate patches -patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api_client.dart <./patch/api_client.dart.patch -patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api.dart <./patch/api.dart.patch -patch --no-backup-if-mismatch -u ../mobile/openapi/pubspec.yaml <./patch/pubspec_immich_mobile.yaml.patch -patch --no-backup-if-mismatch -u ../mobile/openapi/lib/model/asset_edit_action_item_dto.dart <./patch/asset_edit_action_item_dto.dart.patch +patch --no-backup-if-mismatch -u ../mobile/generated/openapi/lib/api_client.dart <./patch/api_client.dart.patch +patch --no-backup-if-mismatch -u ../mobile/generated/openapi/lib/api.dart <./patch/api.dart.patch +patch --no-backup-if-mismatch -u ../mobile/generated/openapi/pubspec.yaml <./patch/pubspec_immich_mobile.yaml.patch +patch --no-backup-if-mismatch -u ../mobile/generated/openapi/lib/model/asset_edit_action_item_dto.dart <./patch/asset_edit_action_item_dto.dart.patch # Don't include analysis_options.yaml for the generated openapi files -# so that language servers can properly exclude the mobile/openapi directory -rm ../mobile/openapi/analysis_options.yaml +# so that language servers can properly exclude the mobile/generated/openapi directory +rm ../mobile/generated/openapi/analysis_options.yaml diff --git a/renovate.json b/renovate.json index 0fdf5a7f69..f6be970701 100644 --- a/renovate.json +++ b/renovate.json @@ -39,7 +39,6 @@ } ], "ignorePaths": [ - "mobile/openapi/pubspec.yaml", "mobile/ios", "mobile/android" ], From 4988c0a4c29f92b53b576fdae230a0388a987246 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Wed, 29 Jul 2026 22:39:37 +0200 Subject: [PATCH 11/69] chore: update merge queue configuration (#30381) Signed-off-by: null --- .mergify.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000000..226e26c4c0 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,2 @@ +merge_queue: + status_comments: outcomes From 0293414abd9f82c7a4847c9bacb313a1d978773b Mon Sep 17 00:00:00 2001 From: Alexander J <741037+jaegeral@users.noreply.github.com> Date: Thu, 30 Jul 2026 00:05:11 +0200 Subject: [PATCH 12/69] fix: minor typos (#30385) --- docs/docs/administration/oauth.md | 2 +- e2e/src/ui/specs/timeline/utils.ts | 2 +- server/test/medium/specs/repositories/person.repository.spec.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/administration/oauth.md b/docs/docs/administration/oauth.md index fea73684fd..246b1be7fe 100644 --- a/docs/docs/administration/oauth.md +++ b/docs/docs/administration/oauth.md @@ -280,7 +280,7 @@ Configuration of OAuth in Immich System Settings | ---------------------------- | ----------------------------------------------------- | | Issuer URL | `https:///realms/` | | Client ID | immich | -| Client Secret | can be optained from Clients -> immich -> Credentials | +| Client Secret | can be obtained from Clients -> immich -> Credentials | | Scope | openid email profile | | Signing Algorithm | RS256 | | Storage Label Claim | preferred_username | diff --git a/e2e/src/ui/specs/timeline/utils.ts b/e2e/src/ui/specs/timeline/utils.ts index f629ec92b3..dad60266b9 100644 --- a/e2e/src/ui/specs/timeline/utils.ts +++ b/e2e/src/ui/specs/timeline/utils.ts @@ -223,7 +223,7 @@ export const pageUtils = { await section.locator('.w-8').click(); }, async pauseTestDebug() { - console.log('NOTE: pausing test indefinately for debug'); + console.log('NOTE: pausing test indefinitely for debug'); await new Promise(() => void 0); }, }; diff --git a/server/test/medium/specs/repositories/person.repository.spec.ts b/server/test/medium/specs/repositories/person.repository.spec.ts index 30f0fd33c0..1ff9ade1d1 100644 --- a/server/test/medium/specs/repositories/person.repository.spec.ts +++ b/server/test/medium/specs/repositories/person.repository.spec.ts @@ -40,7 +40,7 @@ describe(PersonRepository.name, () => { boundingBoxY2: 90, }); - // theres a circular dependency between assetFace and person, so we need to update the person after creating the assetFace + // there's a circular dependency between assetFace and person, so we need to update the person after creating the assetFace await ctx.database.updateTable('person').set({ faceAssetId: assetFace.id }).where('id', '=', person.id).execute(); await ctx.newAssetFile({ From d864a908117387045763c6f1ad4ba3b7a50f1bf3 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Thu, 30 Jul 2026 01:56:46 -0700 Subject: [PATCH 13/69] chore(mobile): Apply stricter linting rules for formatting (#30370) * chore(mobile): Apply stricter linting rules for formatting * Formatting fixes --- mobile/analysis_options.yaml | 31 +++++---- mobile/lib/constants/aspect_ratios.dart | 4 +- .../domain/models/asset/base_asset.model.dart | 2 +- .../lib/domain/models/asset_edit.model.dart | 2 +- .../lib/domain/models/config/app_config.dart | 4 +- .../domain/services/remote_album.service.dart | 2 - .../domain/services/sync_stream.service.dart | 2 +- .../lib/domain/services/timeline.service.dart | 2 +- mobile/lib/extensions/asset_extensions.dart | 8 +-- .../lib/extensions/collection_extensions.dart | 3 +- .../lib/extensions/datetime_extensions.dart | 14 ++-- .../infrastructure/entities/exif.entity.dart | 4 +- .../infrastructure/entities/log.entity.dart | 2 +- .../infrastructure/loaders/image_request.dart | 2 +- .../loaders/remote_image_request.dart | 9 ++- .../repositories/backup.repository.dart | 3 +- .../repositories/local_album.repository.dart | 2 +- .../repositories/ocr.repository.dart | 2 +- .../repositories/search_api.repository.dart | 46 ++++++------- .../repositories/sync_api.repository.dart | 4 +- .../repositories/sync_stream.repository.dart | 8 +-- .../trashed_local_asset.repository.dart | 2 +- .../infrastructure/utils/exif.converter.dart | 4 +- mobile/lib/main.dart | 13 ++-- .../lib/pages/backup/drift_backup.page.dart | 2 +- .../drift_backup_album_selection.page.dart | 10 +-- .../drift_backup_asset_detail.page.dart | 2 +- .../backup/drift_upload_detail.page.dart | 2 +- mobile/lib/pages/common/app_log.page.dart | 4 +- .../lib/pages/common/app_log_detail.page.dart | 6 +- mobile/lib/pages/common/download_panel.dart | 2 +- .../pages/common/headers_settings.page.dart | 4 +- .../lib/pages/common/splash_screen.page.dart | 4 +- .../lib/pages/library/folder/folder.page.dart | 4 +- .../pages/library/locked/pin_auth.page.dart | 2 +- mobile/lib/pages/login/login.page.dart | 6 +- .../search/map/map_location_picker.page.dart | 4 +- .../pages/share_intent/share_intent.page.dart | 4 +- .../pages/dev/main_timeline.page.dart | 2 +- .../pages/download_info.page.dart | 4 +- .../pages/drift_activities.page.dart | 2 +- .../pages/drift_album_options.page.dart | 16 ++--- .../pages/drift_library.page.dart | 4 +- .../presentation/pages/drift_memory.page.dart | 16 ++--- .../pages/drift_partner_detail.page.dart | 2 +- .../pages/drift_people_collection.page.dart | 2 +- .../presentation/pages/drift_person.page.dart | 2 +- .../pages/drift_remote_album.page.dart | 6 +- .../pages/drift_slideshow.page.dart | 12 ++-- .../presentation/pages/drift_trash.page.dart | 4 +- .../pages/drift_user_selection.page.dart | 12 ++-- .../pages/edit/drift_edit.page.dart | 2 +- .../pages/edit/editor.provider.dart | 2 +- .../pages/search/drift_search.page.dart | 68 +++++++++---------- .../add_action_button.widget.dart | 22 +++--- .../delete_action_button.widget.dart | 2 +- .../delete_local_action_button.widget.dart | 4 +- ...delete_permanent_action_button.widget.dart | 2 +- .../delete_trash_action_button.widget.dart | 2 +- .../download_action_button.widget.dart | 4 +- .../edit_date_time_action_button.widget.dart | 2 +- .../edit_location_action_button.widget.dart | 2 +- .../favorite_action_button.widget.dart | 2 +- .../like_activity_action_button.widget.dart | 2 +- .../open_in_browser_action_button.widget.dart | 5 +- ...emove_from_album_action_button.widget.dart | 2 +- ...from_lock_folder_action_button.widget.dart | 2 +- .../restore_action_button.widget.dart | 2 +- .../restore_trash_action_button.widget.dart | 2 +- .../set_album_cover.widget.dart | 2 +- .../share_action_button.widget.dart | 6 +- .../share_link_action_button.widget.dart | 2 +- .../similar_photos_action_button.widget.dart | 2 +- .../stack_action_button.widget.dart | 2 +- .../trash_action_button.widget.dart | 2 +- .../unarchive_action_button.widget.dart | 4 +- .../unfavorite_action_button.widget.dart | 2 +- .../unstack_action_button.widget.dart | 2 +- .../upload_action_button.widget.dart | 2 +- .../widgets/album/album_selector.widget.dart | 6 +- .../appears_in_details.widget.dart | 3 +- .../location_details.widget.dart | 2 +- .../asset_details/rating_details.widget.dart | 2 +- .../technical_details.widget.dart | 14 ++-- .../asset_viewer/asset_stack.widget.dart | 7 +- .../asset_viewer/asset_viewer.page.dart | 4 +- .../asset_viewer/rating_bar.widget.dart | 10 +-- .../asset_viewer/video_viewer.widget.dart | 6 +- .../viewer_bottom_app_bar.widget.dart | 5 +- .../viewer_top_app_bar.widget.dart | 3 +- .../base_bottom_sheet.widget.dart | 2 +- .../bottom_sheet/map_bottom_sheet.widget.dart | 6 +- .../feature_message_dialog.widget.dart | 4 +- .../widgets/images/full_image.widget.dart | 2 +- .../widgets/images/image_provider.dart | 2 +- .../widgets/images/thumbnail_tile.widget.dart | 2 +- .../presentation/widgets/map/map_utils.dart | 4 +- .../widgets/memory/memory_card.widget.dart | 2 +- .../person_edit_birthday_modal.widget.dart | 4 +- .../people/person_edit_name_modal.widget.dart | 4 +- .../people/person_option_sheet.widget.dart | 2 +- .../widgets/timeline/header.widget.dart | 2 +- .../widgets/timeline/scrubber.widget.dart | 2 +- .../widgets/timeline/timeline.widget.dart | 2 +- .../providers/album/album_title.provider.dart | 4 +- .../providers/app_life_cycle.provider.dart | 2 +- .../asset_viewer/download.provider.dart | 4 +- .../share_intent_upload.provider.dart | 4 +- mobile/lib/providers/auth.provider.dart | 2 +- .../backup/drift_backup.provider.dart | 7 +- mobile/lib/providers/cast.provider.dart | 1 - .../gallery_permission.provider.dart | 2 +- .../providers/haptic_feedback.provider.dart | 10 +-- .../infrastructure/action.provider.dart | 4 +- .../infrastructure/timeline.provider.dart | 2 +- mobile/lib/providers/local_auth.provider.dart | 3 - .../providers/map/map_marker.provider.dart | 4 +- mobile/lib/providers/oauth.provider.dart | 2 +- .../lib/providers/server_info.provider.dart | 12 ++-- .../lib/providers/sync_status.provider.dart | 2 +- .../timeline/multiselect.provider.dart | 6 +- .../upload_profile_image.provider.dart | 4 +- mobile/lib/providers/user.provider.dart | 2 +- mobile/lib/providers/websocket.provider.dart | 6 +- .../repositories/asset_media.repository.dart | 6 +- .../lib/repositories/auth_api.repository.dart | 2 +- .../drift_album_api_repository.dart | 6 +- mobile/lib/repositories/gcast.repository.dart | 2 +- .../lib/repositories/upload.repository.dart | 6 +- mobile/lib/routing/duplicate_guard.dart | 2 +- mobile/lib/routing/locked_guard.dart | 5 +- mobile/lib/routing/router.dart | 2 +- mobile/lib/services/api.service.dart | 6 +- mobile/lib/services/auth.service.dart | 2 +- .../services/background_upload.service.dart | 8 +-- mobile/lib/services/download.service.dart | 2 +- mobile/lib/services/folder.service.dart | 12 ++-- .../services/foreground_upload.service.dart | 4 +- mobile/lib/services/gcast.service.dart | 8 +-- mobile/lib/services/search.service.dart | 2 +- mobile/lib/services/server_info.service.dart | 8 +-- mobile/lib/theme/dynamic_theme.dart | 3 +- mobile/lib/utils/bytes_units.dart | 2 +- mobile/lib/utils/diff.dart | 6 +- mobile/lib/utils/editor.utils.dart | 8 +-- mobile/lib/utils/error_handler.dart | 2 +- .../lib/utils/hooks/crop_controller_hook.dart | 5 +- mobile/lib/utils/image_converter.dart | 2 +- mobile/lib/utils/image_url_builder.dart | 2 +- mobile/lib/utils/map_utils.dart | 4 +- mobile/lib/utils/openapi_patching.dart | 4 +- mobile/lib/utils/people.utils.dart | 4 +- mobile/lib/utils/timezone.dart | 2 +- .../album/remote_album_shared_user_icons.dart | 4 +- .../asset_grid/thumbnail_placeholder.dart | 2 +- .../asset_viewer/detail_panel/exif_map.dart | 8 +-- .../widgets/asset_viewer/video_controls.dart | 2 +- .../backup/drift_album_info_list_tile.dart | 4 +- .../common/app_bar_dialog/app_bar_dialog.dart | 20 +++--- .../app_bar_dialog/app_bar_profile_info.dart | 8 +-- .../app_bar_dialog/app_bar_server_info.dart | 6 +- .../server_update_notification.dart | 8 ++- .../lib/widgets/common/date_time_picker.dart | 4 +- .../widgets/common/immich_sliver_app_bar.dart | 2 +- mobile/lib/widgets/common/immich_toast.dart | 2 +- .../widgets/common/person_sliver_app_bar.dart | 8 +-- .../common/remote_album_sliver_app_bar.dart | 4 +- .../common/selection_sliver_app_bar.dart | 2 +- mobile/lib/widgets/common/tag_picker.dart | 4 +- .../widgets/forms/change_password_form.dart | 2 +- .../lib/widgets/forms/login/login_form.dart | 20 +++--- mobile/lib/widgets/forms/pin_input.dart | 6 +- .../widgets/forms/pin_registration_form.dart | 2 +- .../widgets/forms/pin_verification_form.dart | 2 +- mobile/lib/widgets/map/asset_marker_icon.dart | 6 +- .../lib/widgets/map/map_theme_override.dart | 2 +- mobile/lib/widgets/map/map_thumbnail.dart | 2 +- .../photo_view/src/core/photo_view_core.dart | 10 +-- .../photo_view/src/photo_view_wrappers.dart | 6 +- .../filter_bottom_sheet_scaffold.dart | 2 +- .../search/search_filter/people_picker.dart | 4 +- .../search_filter/star_rating_picker.dart | 2 +- .../widgets/search/thumbnail_with_info.dart | 2 +- .../widgets/settings/advanced_settings.dart | 8 +-- .../asset_viewer_settings.dart | 2 +- .../settings/free_up_space_settings.dart | 2 +- .../external_network_preference.dart | 8 +-- .../local_network_preference.dart | 10 +-- .../settings/notification_setting.dart | 4 +- .../preference_settings/haptic_setting.dart | 4 +- .../primary_color_setting.dart | 8 +-- .../settings/settings_switch_list_tile.dart | 2 +- .../ui/lib/src/components/password_input.dart | 2 +- .../services/sync_stream_service_test.dart | 2 +- .../sync_api_repository_test.dart | 2 +- .../test/infrastructure/repository.mock.dart | 2 +- .../local_asset_repository_test.dart | 2 +- .../timeline_repository_test.dart | 2 +- .../test/modules/utils/async_mutex_test.dart | 4 +- .../modules/utils/datetime_helpers_test.dart | 12 ++-- mobile/test/modules/utils/debouncer_test.dart | 10 +-- .../modules/utils/openapi_patching_test.dart | 6 +- mobile/test/services/auth.service_test.dart | 2 +- .../background_upload.service_test.dart | 2 +- .../foreground_upload.service_test.dart | 2 +- .../unit/presentation/partner_page_test.dart | 4 +- mobile/test/unit/utils/editor_test.dart | 6 +- .../action_button_utils_test.dart | 2 +- 208 files changed, 515 insertions(+), 533 deletions(-) diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml index f5ead8de2e..1a7b463913 100644 --- a/mobile/analysis_options.yaml +++ b/mobile/analysis_options.yaml @@ -26,8 +26,8 @@ linter: # producing the lint. rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + # Formatting + avoid_print: true unawaited_futures: true use_build_context_synchronously: false require_trailing_commas: true @@ -35,6 +35,21 @@ linter: prefer_const_constructors: true always_use_package_imports: true always_put_control_body_on_new_line: true + unnecessary_null_checks: true + unnecessary_parenthesis: true + prefer_final_locals: true + prefer_const_declarations: true + prefer_const_literals_to_create_immutables: true + use_super_parameters: true + directives_ordering: true + no_leading_underscores_for_local_identifiers: true + always_declare_return_types: true + avoid_void_async: true + noop_primitive_operations: true + use_named_constants: true + combinators_ordering: true + avoid_multiple_declarations_per_line: true + unnecessary_breaks: true # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options @@ -46,20 +61,12 @@ analyzer: - lib/**/*.g.dart - lib/**/*.drift.dart - # TODO: Re-enable after upgrading custom_lint - # plugins: - # - custom_lint + # NOTE: We explicitly do not use riverpod_lint as there are analyzer version conflicts between + # our Flutter version and the required old riverpod_lint 2.x errors: unawaited_futures: warning always_put_control_body_on_new_line: warning -custom_lint: - rules: - - avoid_build_context_in_providers: false - - avoid_public_notifier_properties: false - - avoid_manual_providers_as_generated_provider_dependency: false - - unsupported_provider_value: false - dart_code_metrics: rules: - banned-usage: diff --git a/mobile/lib/constants/aspect_ratios.dart b/mobile/lib/constants/aspect_ratios.dart index 7a1f46d198..9ad7b8c739 100644 --- a/mobile/lib/constants/aspect_ratios.dart +++ b/mobile/lib/constants/aspect_ratios.dart @@ -42,8 +42,8 @@ class CropAspectRatio { } } -const aspectRatioFree = CropAspectRatio(customLabel: "Free", icon: Icons.crop_free); -const aspectRatioOriginal = CropAspectRatio(customLabel: "Original", icon: Icons.crop_original); +const aspectRatioFree = CropAspectRatio.free; +const aspectRatioOriginal = CropAspectRatio.original; final aspectRatioPresets = [ CropAspectRatio.free, diff --git a/mobile/lib/domain/models/asset/base_asset.model.dart b/mobile/lib/domain/models/asset/base_asset.model.dart index ea6f0ab287..d7d74daa25 100644 --- a/mobile/lib/domain/models/asset/base_asset.model.dart +++ b/mobile/lib/domain/models/asset/base_asset.model.dart @@ -53,7 +53,7 @@ sealed class BaseAsset { if (durationMs != null) { return Duration(milliseconds: durationMs); } - return const Duration(); + return Duration.zero; } bool get hasRemote => storage == AssetState.remote || storage == AssetState.merged; diff --git a/mobile/lib/domain/models/asset_edit.model.dart b/mobile/lib/domain/models/asset_edit.model.dart index 9809b9c606..c7a09dbae3 100644 --- a/mobile/lib/domain/models/asset_edit.model.dart +++ b/mobile/lib/domain/models/asset_edit.model.dart @@ -1,4 +1,4 @@ -import "package:openapi/api.dart" show CropParameters, RotateParameters, MirrorParameters; +import "package:openapi/api.dart" show CropParameters, MirrorParameters, RotateParameters; enum AssetEditAction { rotate, crop, mirror, other } diff --git a/mobile/lib/domain/models/config/app_config.dart b/mobile/lib/domain/models/config/app_config.dart index e4e11baf9d..df147f3e3a 100644 --- a/mobile/lib/domain/models/config/app_config.dart +++ b/mobile/lib/domain/models/config/app_config.dart @@ -190,9 +190,9 @@ class AppConfig { .viewerTapToNavigate => copyWith(viewer: viewer.copyWith(tapToNavigate: value as bool)), .networkAutoEndpointSwitching => copyWith(network: network.copyWith(autoEndpointSwitching: value as bool)), .networkPreferredWifiName => copyWith( - network: network.copyWith(preferredWifiName: .fromNullable((value as String?))), + network: network.copyWith(preferredWifiName: .fromNullable(value as String?)), ), - .networkLocalEndpoint => copyWith(network: network.copyWith(localEndpoint: .fromNullable((value as String?)))), + .networkLocalEndpoint => copyWith(network: network.copyWith(localEndpoint: .fromNullable(value as String?))), .networkExternalEndpointList => copyWith(network: network.copyWith(externalEndpointList: value as List)), .networkCustomHeaders => copyWith(network: network.copyWith(customHeaders: value as Map)), .albumSortMode => copyWith(album: album.copyWith(sortMode: value as AlbumSortMode)), diff --git a/mobile/lib/domain/services/remote_album.service.dart b/mobile/lib/domain/services/remote_album.service.dart index c0bbaa8127..e59d75b01a 100644 --- a/mobile/lib/domain/services/remote_album.service.dart +++ b/mobile/lib/domain/services/remote_album.service.dart @@ -105,10 +105,8 @@ class RemoteAlbumService { switch (filterMode) { case QuickFilterMode.myAlbums: filtered = filtered.where((album) => album.ownerId == userId).toList(); - break; case QuickFilterMode.sharedWithMe: filtered = filtered.where((album) => album.ownerId != userId).toList(); - break; case QuickFilterMode.all: break; } diff --git a/mobile/lib/domain/services/sync_stream.service.dart b/mobile/lib/domain/services/sync_stream.service.dart index 9ebce300ba..9b4d4bb275 100644 --- a/mobile/lib/domain/services/sync_stream.service.dart +++ b/mobile/lib/domain/services/sync_stream.service.dart @@ -155,7 +155,7 @@ class SyncStreamService { } Future _handleEvents(List events, Function() abort, Function() reset) async { - List items = []; + final List items = []; for (final event in events) { if (isCancelled) { _logger.warning("Sync stream cancelled"); diff --git a/mobile/lib/domain/services/timeline.service.dart b/mobile/lib/domain/services/timeline.service.dart index 4cc58b0fe7..9b539ec218 100644 --- a/mobile/lib/domain/services/timeline.service.dart +++ b/mobile/lib/domain/services/timeline.service.dart @@ -178,7 +178,7 @@ class TimelineService { if (!hasRange(index, count)) { throw RangeError('TimelineService::getAssets Index out of range'); } - int start = index - _bufferOffset; + final int start = index - _bufferOffset; return _buffer.slice(start, start + count); } diff --git a/mobile/lib/extensions/asset_extensions.dart b/mobile/lib/extensions/asset_extensions.dart index 52d31cb0b3..ec1aa80ceb 100644 --- a/mobile/lib/extensions/asset_extensions.dart +++ b/mobile/lib/extensions/asset_extensions.dart @@ -15,8 +15,8 @@ extension DTOToAsset on api.AssetResponseDto { ownerId: ownerId, visibility: visibility.toAssetVisibility(), durationMs: duration, - height: height?.toInt(), - width: width?.toInt(), + height: height, + width: width, isFavorite: isFavorite, livePhotoVideoId: livePhotoVideoId.orElse(null), thumbHash: thumbhash, @@ -38,8 +38,8 @@ extension DTOToAsset on api.AssetResponseDto { ownerId: ownerId, visibility: visibility.toAssetVisibility(), durationMs: duration, - height: height?.toInt(), - width: width?.toInt(), + height: height, + width: width, isFavorite: isFavorite, livePhotoVideoId: livePhotoVideoId.orElse(null), thumbHash: thumbhash, diff --git a/mobile/lib/extensions/collection_extensions.dart b/mobile/lib/extensions/collection_extensions.dart index b861eb0570..53e8e73fd1 100644 --- a/mobile/lib/extensions/collection_extensions.dart +++ b/mobile/lib/extensions/collection_extensions.dart @@ -5,7 +5,8 @@ import 'package:collection/collection.dart'; extension ListExtension on List { List uniqueConsecutive({int Function(E a, E b)? compare, void Function(E a, E b)? onDuplicate}) { compare ??= (E a, E b) => a == b ? 0 : 1; - int i = 1, j = 1; + int i = 1; + int j = 1; for (; i < length; i++) { if (compare(this[i - 1], this[i]) != 0) { if (i != j) { diff --git a/mobile/lib/extensions/datetime_extensions.dart b/mobile/lib/extensions/datetime_extensions.dart index 0bc95565a6..6a51d15df0 100644 --- a/mobile/lib/extensions/datetime_extensions.dart +++ b/mobile/lib/extensions/datetime_extensions.dart @@ -4,7 +4,7 @@ import 'package:easy_localization/easy_localization.dart'; extension TimeAgoExtension on DateTime { /// Displays the time difference of this [DateTime] object to the current time as a [String] String timeAgo({bool numericDates = true}) { - DateTime date = toLocal(); + final DateTime date = toLocal(); final now = DateTime.now().toLocal(); final difference = now.difference(date); @@ -13,27 +13,27 @@ extension TimeAgoExtension on DateTime { } else if (difference.inSeconds < 60) { return '${difference.inSeconds} seconds ago'; } else if (difference.inMinutes <= 1) { - return (numericDates) ? '1 minute ago' : 'A minute ago'; + return numericDates ? '1 minute ago' : 'A minute ago'; } else if (difference.inMinutes < 60) { return '${difference.inMinutes} minutes ago'; } else if (difference.inHours <= 1) { - return (numericDates) ? '1 hour ago' : 'An hour ago'; + return numericDates ? '1 hour ago' : 'An hour ago'; } else if (difference.inHours < 60) { return '${difference.inHours} hours ago'; } else if (difference.inDays <= 1) { - return (numericDates) ? '1 day ago' : 'Yesterday'; + return numericDates ? '1 day ago' : 'Yesterday'; } else if (difference.inDays < 6) { return '${difference.inDays} days ago'; } else if ((difference.inDays / 7).ceil() <= 1) { - return (numericDates) ? '1 week ago' : 'Last week'; + return numericDates ? '1 week ago' : 'Last week'; } else if ((difference.inDays / 7).ceil() < 4) { return '${(difference.inDays / 7).ceil()} weeks ago'; } else if ((difference.inDays / 30).ceil() <= 1) { - return (numericDates) ? '1 month ago' : 'Last month'; + return numericDates ? '1 month ago' : 'Last month'; } else if ((difference.inDays / 30).ceil() < 30) { return '${(difference.inDays / 30).ceil()} months ago'; } else if ((difference.inDays / 365).ceil() <= 1) { - return (numericDates) ? '1 year ago' : 'Last year'; + return numericDates ? '1 year ago' : 'Last year'; } return '${(difference.inDays / 365).floor()} years ago'; } diff --git a/mobile/lib/infrastructure/entities/exif.entity.dart b/mobile/lib/infrastructure/entities/exif.entity.dart index 120fbd0c68..3328b38f31 100644 --- a/mobile/lib/infrastructure/entities/exif.entity.dart +++ b/mobile/lib/infrastructure/entities/exif.entity.dart @@ -79,8 +79,8 @@ extension RemoteExifEntityDataDomainEx on RemoteExifEntityData { orientation: orientation, latitude: latitude, longitude: longitude, - f: fNumber?.toDouble(), - mm: focalLength?.toDouble(), + f: fNumber, + mm: focalLength, lens: lens, isFlipped: ExifDtoConverter.isOrientationFlipped(orientation), exposureSeconds: ExifDtoConverter.exposureTimeToSeconds(exposureTime), diff --git a/mobile/lib/infrastructure/entities/log.entity.dart b/mobile/lib/infrastructure/entities/log.entity.dart index e578459827..264bd3331f 100644 --- a/mobile/lib/infrastructure/entities/log.entity.dart +++ b/mobile/lib/infrastructure/entities/log.entity.dart @@ -1,6 +1,6 @@ import 'package:drift/drift.dart'; -import 'package:immich_mobile/infrastructure/entities/log.entity.drift.dart'; import 'package:immich_mobile/domain/models/log.model.dart' as domain; +import 'package:immich_mobile/infrastructure/entities/log.entity.drift.dart'; class LogMessageEntity extends Table { const LogMessageEntity(); diff --git a/mobile/lib/infrastructure/loaders/image_request.dart b/mobile/lib/infrastructure/loaders/image_request.dart index d0f3679084..8b7cdc7621 100644 --- a/mobile/lib/infrastructure/loaders/image_request.dart +++ b/mobile/lib/infrastructure/loaders/image_request.dart @@ -18,7 +18,7 @@ abstract class ImageRequest { final int requestId = _nextRequestId++; bool _isCancelled = false; - get isCancelled => _isCancelled; + bool get isCancelled => _isCancelled; ImageRequest(); diff --git a/mobile/lib/infrastructure/loaders/remote_image_request.dart b/mobile/lib/infrastructure/loaders/remote_image_request.dart index 40705c16d2..d6a25753fb 100644 --- a/mobile/lib/infrastructure/loaders/remote_image_request.dart +++ b/mobile/lib/infrastructure/loaders/remote_image_request.dart @@ -14,8 +14,13 @@ class RemoteImageRequest extends ImageRequest { final info = await remoteImageApi.requestImage(uri, requestId: requestId, preferEncoded: false); // Android falls back to encoded data if native decoding fails, so check for both shapes of the response. final frame = switch (info) { - {'pointer': int pointer, 'length': int length} => await _fromEncodedPlatformImage(pointer, length), - {'pointer': int pointer, 'width': int width, 'height': int height, 'rowBytes': int rowBytes} => + {'pointer': final int pointer, 'length': final int length} => await _fromEncodedPlatformImage(pointer, length), + { + 'pointer': final int pointer, + 'width': final int width, + 'height': final int height, + 'rowBytes': final int rowBytes, + } => await _fromDecodedPlatformImage(pointer, width, height, rowBytes), _ => null, }; diff --git a/mobile/lib/infrastructure/repositories/backup.repository.dart b/mobile/lib/infrastructure/repositories/backup.repository.dart index 0241711d4b..eb3cba95d0 100644 --- a/mobile/lib/infrastructure/repositories/backup.repository.dart +++ b/mobile/lib/infrastructure/repositories/backup.repository.dart @@ -4,6 +4,7 @@ import 'package:drift/drift.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/album/local_album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; @@ -16,7 +17,7 @@ class DriftBackupRepository extends DriftDatabaseRepository { final Drift _db; const DriftBackupRepository(this._db) : super(_db); - _getExcludedSubquery() { + JoinedSelectStatement<$LocalAlbumAssetEntityTable, LocalAlbumAssetEntityData> _getExcludedSubquery() { return _db.localAlbumAssetEntity.selectOnly() ..addColumns([_db.localAlbumAssetEntity.assetId]) ..join([ diff --git a/mobile/lib/infrastructure/repositories/local_album.repository.dart b/mobile/lib/infrastructure/repositories/local_album.repository.dart index a443ffb975..a9911fe044 100644 --- a/mobile/lib/infrastructure/repositories/local_album.repository.dart +++ b/mobile/lib/infrastructure/repositories/local_album.repository.dart @@ -356,7 +356,7 @@ class DriftLocalAlbumRepository extends DriftDatabaseRepository { return _deleteAssets(assetIds); } - List assetsToDelete = []; + final List assetsToDelete = []; List assetsToUnLink = []; final uniqueAssets = await _getUniqueAssetsInAlbum(albumId); diff --git a/mobile/lib/infrastructure/repositories/ocr.repository.dart b/mobile/lib/infrastructure/repositories/ocr.repository.dart index 99f4fa4675..c3465df357 100644 --- a/mobile/lib/infrastructure/repositories/ocr.repository.dart +++ b/mobile/lib/infrastructure/repositories/ocr.repository.dart @@ -1,7 +1,7 @@ +import 'package:drift/drift.dart'; import 'package:immich_mobile/domain/models/ocr.model.dart'; import 'package:immich_mobile/infrastructure/entities/asset_ocr.entity.drift.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; -import 'package:drift/drift.dart'; class OcrRepository extends DriftDatabaseRepository { final Drift _db; diff --git a/mobile/lib/infrastructure/repositories/search_api.repository.dart b/mobile/lib/infrastructure/repositories/search_api.repository.dart index 395d4045cf..dec6e1d167 100644 --- a/mobile/lib/infrastructure/repositories/search_api.repository.dart +++ b/mobile/lib/infrastructure/repositories/search_api.repository.dart @@ -21,28 +21,28 @@ class SearchApiRepository extends ApiRepository { (filter.assetId != null && filter.assetId!.isNotEmpty)) { return _api.searchSmart( SmartSearchDto( - query: filter.context == null ? const Optional.absent() : Optional.present(filter.context!), - queryAssetId: filter.assetId == null ? const Optional.absent() : Optional.present(filter.assetId!), - language: filter.language == null ? const Optional.absent() : Optional.present(filter.language!), + query: filter.context == null ? const Optional.absent() : Optional.present(filter.context), + queryAssetId: filter.assetId == null ? const Optional.absent() : Optional.present(filter.assetId), + language: filter.language == null ? const Optional.absent() : Optional.present(filter.language), country: filter.location.country == null ? const Optional.absent() - : Optional.present(filter.location.country!), - state: filter.location.state == null ? const Optional.absent() : Optional.present(filter.location.state!), - city: filter.location.city == null ? const Optional.absent() : Optional.present(filter.location.city!), - make: filter.camera.make == null ? const Optional.absent() : Optional.present(filter.camera.make!), - model: filter.camera.model == null ? const Optional.absent() : Optional.present(filter.camera.model!), + : Optional.present(filter.location.country), + state: filter.location.state == null ? const Optional.absent() : Optional.present(filter.location.state), + city: filter.location.city == null ? const Optional.absent() : Optional.present(filter.location.city), + make: filter.camera.make == null ? const Optional.absent() : Optional.present(filter.camera.make), + model: filter.camera.model == null ? const Optional.absent() : Optional.present(filter.camera.model), takenAfter: filter.date.takenAfter == null ? const Optional.absent() - : Optional.present(filter.date.takenAfter!), + : Optional.present(filter.date.takenAfter), takenBefore: filter.date.takenBefore == null ? const Optional.absent() - : Optional.present(filter.date.takenBefore!), + : Optional.present(filter.date.takenBefore), visibility: Optional.present(filter.display.isArchive ? AssetVisibility.archive : AssetVisibility.timeline), rating: filter.rating.rating.toOptional(), isFavorite: filter.display.isFavorite ? const Optional.present(true) : const Optional.absent(), isNotInAlbum: filter.display.isNotInAlbum ? const Optional.present(true) : const Optional.absent(), personIds: Optional.present(filter.people.map((e) => e.id).toList()), - tagIds: filter.tagIds == null ? const Optional.absent() : Optional.present(filter.tagIds!), + tagIds: filter.tagIds == null ? const Optional.absent() : Optional.present(filter.tagIds), type: type == null ? const Optional.absent() : Optional.present(type), page: Optional.present(page), size: const Optional.present(100), @@ -53,29 +53,27 @@ class SearchApiRepository extends ApiRepository { return _api.searchAssets( MetadataSearchDto( originalFileName: filter.filename != null && filter.filename!.isNotEmpty - ? Optional.present(filter.filename!) + ? Optional.present(filter.filename) : const Optional.absent(), - country: filter.location.country == null ? const Optional.absent() : Optional.present(filter.location.country!), + country: filter.location.country == null ? const Optional.absent() : Optional.present(filter.location.country), description: filter.description != null && filter.description!.isNotEmpty - ? Optional.present(filter.description!) + ? Optional.present(filter.description) : const Optional.absent(), - ocr: filter.ocr != null && filter.ocr!.isNotEmpty ? Optional.present(filter.ocr!) : const Optional.absent(), - state: filter.location.state == null ? const Optional.absent() : Optional.present(filter.location.state!), - city: filter.location.city == null ? const Optional.absent() : Optional.present(filter.location.city!), - make: filter.camera.make == null ? const Optional.absent() : Optional.present(filter.camera.make!), - model: filter.camera.model == null ? const Optional.absent() : Optional.present(filter.camera.model!), - takenAfter: filter.date.takenAfter == null - ? const Optional.absent() - : Optional.present(filter.date.takenAfter!), + ocr: filter.ocr != null && filter.ocr!.isNotEmpty ? Optional.present(filter.ocr) : const Optional.absent(), + state: filter.location.state == null ? const Optional.absent() : Optional.present(filter.location.state), + city: filter.location.city == null ? const Optional.absent() : Optional.present(filter.location.city), + make: filter.camera.make == null ? const Optional.absent() : Optional.present(filter.camera.make), + model: filter.camera.model == null ? const Optional.absent() : Optional.present(filter.camera.model), + takenAfter: filter.date.takenAfter == null ? const Optional.absent() : Optional.present(filter.date.takenAfter), takenBefore: filter.date.takenBefore == null ? const Optional.absent() - : Optional.present(filter.date.takenBefore!), + : Optional.present(filter.date.takenBefore), visibility: Optional.present(filter.display.isArchive ? AssetVisibility.archive : AssetVisibility.timeline), rating: filter.rating.rating.toOptional(), isFavorite: filter.display.isFavorite ? const Optional.present(true) : const Optional.absent(), isNotInAlbum: filter.display.isNotInAlbum ? const Optional.present(true) : const Optional.absent(), personIds: Optional.present(filter.people.map((e) => e.id).toList()), - tagIds: filter.tagIds == null ? const Optional.absent() : Optional.present(filter.tagIds!), + tagIds: filter.tagIds == null ? const Optional.absent() : Optional.present(filter.tagIds), type: type == null ? const Optional.absent() : Optional.present(type), page: Optional.present(page), size: const Optional.present(1000), diff --git a/mobile/lib/infrastructure/repositories/sync_api.repository.dart b/mobile/lib/infrastructure/repositories/sync_api.repository.dart index e9d57f7506..303859da2f 100644 --- a/mobile/lib/infrastructure/repositories/sync_api.repository.dart +++ b/mobile/lib/infrastructure/repositories/sync_api.repository.dart @@ -80,7 +80,7 @@ class SyncApiRepository { ); String previousChunk = ''; - List lines = []; + final List lines = []; bool shouldAbort = false; @@ -105,7 +105,7 @@ class SyncApiRepository { } previousChunk += chunk; - final parts = previousChunk.toString().split('\n'); + final parts = previousChunk.split('\n'); previousChunk = parts.removeLast(); lines.addAll(parts); diff --git a/mobile/lib/infrastructure/repositories/sync_stream.repository.dart b/mobile/lib/infrastructure/repositories/sync_stream.repository.dart index bdfb1942ab..844226d49f 100644 --- a/mobile/lib/infrastructure/repositories/sync_stream.repository.dart +++ b/mobile/lib/infrastructure/repositories/sync_stream.repository.dart @@ -31,8 +31,8 @@ import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.drift import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/infrastructure/utils/exif.converter.dart'; import 'package:logging/logging.dart'; -import 'package:openapi/api.dart' as api show AssetVisibility, AlbumUserRole, UserMetadataKey, AssetEditAction; -import 'package:openapi/api.dart' hide UserMetadataKey, AssetEditAction, AssetVisibility, AlbumUserRole; +import 'package:openapi/api.dart' as api show AlbumUserRole, AssetEditAction, AssetVisibility, UserMetadataKey; +import 'package:openapi/api.dart' hide AlbumUserRole, AssetEditAction, AssetVisibility, UserMetadataKey; class SyncStreamRepository extends DriftDatabaseRepository { final Logger _logger = Logger('DriftSyncStreamRepository'); @@ -287,8 +287,8 @@ class SyncStreamRepository extends DriftDatabaseRepository { fNumber: Value(exif.fNumber), fileSize: Value(exif.fileSizeInByte), focalLength: Value(exif.focalLength), - latitude: Value(exif.latitude?.toDouble()), - longitude: Value(exif.longitude?.toDouble()), + latitude: Value(exif.latitude), + longitude: Value(exif.longitude), iso: Value(exif.iso), make: Value(exif.make), model: Value(exif.model), diff --git a/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart index 08712588d9..e31b47a9fc 100644 --- a/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart @@ -66,7 +66,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository { return; } final assetIds = trashedAssets.map((e) => e.asset.id).toSet(); - Map localChecksumById = await _getCachedChecksums(assetIds); + final Map localChecksumById = await _getCachedChecksums(assetIds); return _db.transaction(() async { await _db.batch((batch) { diff --git a/mobile/lib/infrastructure/utils/exif.converter.dart b/mobile/lib/infrastructure/utils/exif.converter.dart index 9f9b6f9324..d47c9cc97a 100644 --- a/mobile/lib/infrastructure/utils/exif.converter.dart +++ b/mobile/lib/infrastructure/utils/exif.converter.dart @@ -21,7 +21,7 @@ abstract final class ExifDtoConverter { lens: dto.lensModel.orElse(null), f: dto.fNumber.orElse(null)?.toDouble(), mm: dto.focalLength.orElse(null)?.toDouble(), - iso: dto.iso.orElse(null)?.toInt(), + iso: dto.iso.orElse(null), exposureSeconds: exposureTimeToSeconds(dto.exposureTime.orElse(null)), ); } @@ -40,7 +40,7 @@ abstract final class ExifDtoConverter { if (second == null) { return null; } - double? value = double.tryParse(second); + final double? value = double.tryParse(second); if (value != null) { return value; } diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index f576a7c63c..09bcdc752f 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -24,13 +24,13 @@ import 'package:immich_mobile/pages/common/splash_screen.page.dart'; import 'package:immich_mobile/platform/background_worker_lock_api.g.dart'; import 'package:immich_mobile/providers/app_life_cycle.provider.dart'; import 'package:immich_mobile/providers/asset_viewer/share_intent_upload.provider.dart'; -import 'package:immich_mobile/providers/view_intent/view_intent_handler.provider.dart'; import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/locale_provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; import 'package:immich_mobile/providers/theme.provider.dart'; +import 'package:immich_mobile/providers/view_intent/view_intent_handler.provider.dart'; import 'package:immich_mobile/routing/app_navigation_observer.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/services/deep_link.service.dart'; @@ -84,7 +84,7 @@ Future initApp() async { FlutterError.presentError(details); log.severe( 'FlutterError - Catch all', - "${details.toString()}\nException: ${details.exception}\nLibrary: ${details.library}\nContext: ${details.context}", + "$details\nException: ${details.exception}\nLibrary: ${details.library}\nContext: ${details.context}", details.stack, ); }; @@ -130,23 +130,18 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve dPrint(() => "[APP STATE] resumed"); ref.read(appStateProvider.notifier).handleAppResume(); unawaited(ref.read(viewIntentHandlerProvider).onAppResumed()); - break; case AppLifecycleState.inactive: dPrint(() => "[APP STATE] inactive"); ref.read(appStateProvider.notifier).handleAppInactivity(); - break; case AppLifecycleState.paused: dPrint(() => "[APP STATE] paused"); ref.read(appStateProvider.notifier).handleAppPause(); - break; case AppLifecycleState.detached: dPrint(() => "[APP STATE] detached"); ref.read(appStateProvider.notifier).handleAppDetached(); - break; case AppLifecycleState.hidden: dPrint(() => "[APP STATE] hidden"); ref.read(appStateProvider.notifier).handleAppHidden(); - break; } } @@ -219,7 +214,7 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve } @override - initState() { + void initState() { super.initState(); initApp().then((_) => dPrint(() => "App Init Completed")); WidgetsBinding.instance.addPostFrameCallback((_) { diff --git a/mobile/lib/pages/backup/drift_backup.page.dart b/mobile/lib/pages/backup/drift_backup.page.dart index 9e78fb4795..793437579a 100644 --- a/mobile/lib/pages/backup/drift_backup.page.dart +++ b/mobile/lib/pages/backup/drift_backup.page.dart @@ -67,7 +67,7 @@ class _DriftBackupPageState extends ConsumerState { } @override - dispose() { + void dispose() { super.dispose(); WakelockPlus.disable(); } diff --git a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart index b0616589f1..9f60a4e193 100644 --- a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart +++ b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart @@ -12,8 +12,8 @@ import 'package:immich_mobile/infrastructure/repositories/settings.repository.da import 'package:immich_mobile/providers/background_sync.provider.dart'; import 'package:immich_mobile/providers/backup/backup_album.provider.dart'; import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/widgets/backup/drift_album_info_list_tile.dart'; import 'package:immich_mobile/widgets/common/search_field.dart'; @@ -321,9 +321,9 @@ class _AlbumSelectionList extends StatelessWidget { return SliverPadding( padding: const EdgeInsets.symmetric(vertical: 12.0), sliver: SliverList( - delegate: SliverChildBuilderDelegate(((context, index) { + delegate: SliverChildBuilderDelegate((context, index) { return DriftAlbumInfoListTile(album: filteredAlbums[index]); - }), childCount: filteredAlbums.length), + }, childCount: filteredAlbums.length), ), ); } @@ -345,9 +345,9 @@ class _AlbumSelectionGrid extends StatelessWidget { crossAxisSpacing: 12, ), itemCount: filteredAlbums.length, - itemBuilder: ((context, index) { + itemBuilder: (context, index) { return DriftAlbumInfoListTile(album: filteredAlbums[index]); - }), + }, ), ); } diff --git a/mobile/lib/pages/backup/drift_backup_asset_detail.page.dart b/mobile/lib/pages/backup/drift_backup_asset_detail.page.dart index 36d51c5624..b35abd198e 100644 --- a/mobile/lib/pages/backup/drift_backup_asset_detail.page.dart +++ b/mobile/lib/pages/backup/drift_backup_asset_detail.page.dart @@ -20,7 +20,7 @@ class DriftBackupAssetDetailPage extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - AsyncValue> result = ref.watch(driftBackupCandidateProvider); + final AsyncValue> result = ref.watch(driftBackupCandidateProvider); return Scaffold( appBar: AppBar(title: Text('backup_controller_page_remainder'.t(context: context))), body: result.when( diff --git a/mobile/lib/pages/backup/drift_upload_detail.page.dart b/mobile/lib/pages/backup/drift_upload_detail.page.dart index 978fcf7c57..3c2570a434 100644 --- a/mobile/lib/pages/backup/drift_upload_detail.page.dart +++ b/mobile/lib/pages/backup/drift_upload_detail.page.dart @@ -520,7 +520,7 @@ class _CurrentUploadThumbnail extends ConsumerWidget { ), clipBehavior: Clip.antiAlias, child: snapshot.data != null - ? Thumbnail.fromAsset(asset: snapshot.data!, size: const Size(48, 48), fit: BoxFit.cover) + ? Thumbnail.fromAsset(asset: snapshot.data, size: const Size(48, 48), fit: BoxFit.cover) : Icon(Icons.image, size: 24, color: context.colorScheme.primary), ), ); diff --git a/mobile/lib/pages/common/app_log.page.dart b/mobile/lib/pages/common/app_log.page.dart index 336bf0b605..5458d90808 100644 --- a/mobile/lib/pages/common/app_log.page.dart +++ b/mobile/lib/pages/common/app_log.page.dart @@ -90,7 +90,7 @@ class AppLogPage extends HookConsumerWidget { }, itemCount: logMessages.data?.length ?? 0, itemBuilder: (context, index) { - var logMessage = logMessages.data![index]; + final logMessage = logMessages.data![index]; return ListTile( onTap: () => context.pushRoute(AppLogDetailRoute(logMessage: logMessage)), trailing: const Icon(Icons.arrow_forward_ios_rounded), @@ -116,7 +116,7 @@ class AppLogPage extends HookConsumerWidget { /// Truncate the log message to a certain number of lines /// @param int maxLines - Max number of lines to truncate String truncateLogMessage(String message, int maxLines) { - List messageLines = message.split("\n"); + final List messageLines = message.split("\n"); if (messageLines.length < maxLines) { return message; } diff --git a/mobile/lib/pages/common/app_log_detail.page.dart b/mobile/lib/pages/common/app_log_detail.page.dart index 890e46888f..274231a729 100644 --- a/mobile/lib/pages/common/app_log_detail.page.dart +++ b/mobile/lib/pages/common/app_log_detail.page.dart @@ -14,7 +14,7 @@ class AppLogDetailPage extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - buildTextWithCopyButton(String header, String text) { + Padding buildTextWithCopyButton(String header, String text) { return Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -66,7 +66,7 @@ class AppLogDetailPage extends HookConsumerWidget { ); } - buildLogContext(String logger) { + Padding buildLogContext(String logger) { return Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -87,7 +87,7 @@ class AppLogDetailPage extends HookConsumerWidget { child: Padding( padding: const EdgeInsets.all(8.0), child: SelectableText( - logger.toString(), + logger, style: const TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold, fontFamily: "GoogleSansCode"), ), ), diff --git a/mobile/lib/pages/common/download_panel.dart b/mobile/lib/pages/common/download_panel.dart index 0775f5b4e4..f39aa07166 100644 --- a/mobile/lib/pages/common/download_panel.dart +++ b/mobile/lib/pages/common/download_panel.dart @@ -14,7 +14,7 @@ class DownloadPanel extends ConsumerWidget { final tasks = ref.watch(downloadStateProvider.select((state) => state.taskProgress)).entries.toList(); - onCancelDownload(String id) { + void onCancelDownload(String id) { ref.watch(downloadStateProvider.notifier).cancelDownload(id); } diff --git a/mobile/lib/pages/common/headers_settings.page.dart b/mobile/lib/pages/common/headers_settings.page.dart index 9a6b602b04..f0b3f4b67f 100644 --- a/mobile/lib/pages/common/headers_settings.page.dart +++ b/mobile/lib/pages/common/headers_settings.page.dart @@ -41,7 +41,7 @@ class HeaderSettingsPage extends HookConsumerWidget { } setInitialHeaders.value = true; - var list = [ + final list = [ ...headers.value.map((headerValue) { return HeaderKeyValueSettings( header: headerValue, @@ -81,7 +81,7 @@ class HeaderSettingsPage extends HookConsumerWidget { ); } - saveHeaders(WidgetRef ref, List headers) async { + Future saveHeaders(WidgetRef ref, List headers) async { final headersMap = {}; for (final header in headers) { final key = header.key.trim(); diff --git a/mobile/lib/pages/common/splash_screen.page.dart b/mobile/lib/pages/common/splash_screen.page.dart index 0d423875cb..711783bc94 100644 --- a/mobile/lib/pages/common/splash_screen.page.dart +++ b/mobile/lib/pages/common/splash_screen.page.dart @@ -25,7 +25,7 @@ import 'package:immich_mobile/theme/theme_data.dart'; import 'package:immich_mobile/widgets/common/immich_logo.dart'; import 'package:immich_mobile/widgets/common/immich_title_text.dart'; import 'package:logging/logging.dart'; -import 'package:url_launcher/url_launcher.dart' show launchUrl, LaunchMode; +import 'package:url_launcher/url_launcher.dart' show LaunchMode, launchUrl; class BootstrapErrorWidget extends StatelessWidget { final String error; @@ -297,7 +297,7 @@ class SplashScreenPageState extends ConsumerState { log.info("Resuming session at $endpoint"); } - void resumeSession() async { + Future resumeSession() async { final serverUrl = Store.tryGet(StoreKey.serverUrl); final endpoint = Store.tryGet(StoreKey.serverEndpoint); final accessToken = Store.tryGet(StoreKey.accessToken); diff --git a/mobile/lib/pages/library/folder/folder.page.dart b/mobile/lib/pages/library/folder/folder.page.dart index 5efb5ccc62..6934d7b6c5 100644 --- a/mobile/lib/pages/library/folder/folder.page.dart +++ b/mobile/lib/pages/library/folder/folder.page.dart @@ -89,7 +89,7 @@ class FolderPage extends HookConsumerWidget { if (folder == null) { return FolderContent(folder: rootFolder, root: rootFolder, sortOrder: sortOrder.value); } else { - return FolderContent(folder: currentFolder.value!, root: rootFolder, sortOrder: sortOrder.value); + return FolderContent(folder: currentFolder.value, root: rootFolder, sortOrder: sortOrder.value); } }, loading: () => const Center(child: CircularProgressIndicator()), @@ -126,7 +126,7 @@ class FolderContent extends HookConsumerWidget { return Center(child: const Text("folder_not_found").tr()); } - getSubtitle(int subFolderCount) { + String getSubtitle(int subFolderCount) { if (subFolderCount > 0) { return "$subFolderCount ${tr("folders")}".toLowerCase(); } diff --git a/mobile/lib/pages/library/locked/pin_auth.page.dart b/mobile/lib/pages/library/locked/pin_auth.page.dart index 3af320dc5f..7beda1d47b 100644 --- a/mobile/lib/pages/library/locked/pin_auth.page.dart +++ b/mobile/lib/pages/library/locked/pin_auth.page.dart @@ -38,7 +38,7 @@ class PinAuthPage extends HookConsumerWidget { } } - enableBiometricAuth() { + void enableBiometricAuth() { showDialog( context: context, builder: (buildContext) { diff --git a/mobile/lib/pages/login/login.page.dart b/mobile/lib/pages/login/login.page.dart index 5f40b32baa..79091d2679 100644 --- a/mobile/lib/pages/login/login.page.dart +++ b/mobile/lib/pages/login/login.page.dart @@ -4,8 +4,8 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; -import 'package:immich_mobile/widgets/forms/login/login_form.dart'; import 'package:immich_mobile/routing/router.dart'; +import 'package:immich_mobile/widgets/forms/login/login_form.dart'; import 'package:package_info_plus/package_info_plus.dart'; @RoutePage() @@ -16,8 +16,8 @@ class LoginPage extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final appVersion = useState('0.0.0'); - getAppInfo() async { - PackageInfo packageInfo = await PackageInfo.fromPlatform(); + Future getAppInfo() async { + final PackageInfo packageInfo = await PackageInfo.fromPlatform(); appVersion.value = packageInfo.version; } diff --git a/mobile/lib/pages/search/map/map_location_picker.page.dart b/mobile/lib/pages/search/map/map_location_picker.page.dart index 3dace15ced..96f41a4d38 100644 --- a/mobile/lib/pages/search/map/map_location_picker.page.dart +++ b/mobile/lib/pages/search/map/map_location_picker.page.dart @@ -41,13 +41,13 @@ class MapLocationPickerPage extends HookConsumerWidget { } Future getCurrentLocation() async { - var (currentLocation, _) = await MapUtils.checkPermAndGetLocation(context: context); + final (currentLocation, _) = await MapUtils.checkPermAndGetLocation(context: context); if (currentLocation == null) { return; } - var currentLatLng = LatLng(currentLocation.latitude, currentLocation.longitude); + final currentLatLng = LatLng(currentLocation.latitude, currentLocation.longitude); selectedLatLng.value = currentLatLng; await controller.value?.animateCamera(CameraUpdate.newLatLngZoom(currentLatLng, 12)); } diff --git a/mobile/lib/pages/share_intent/share_intent.page.dart b/mobile/lib/pages/share_intent/share_intent.page.dart index 2744b187de..ec88c4a9e4 100644 --- a/mobile/lib/pages/share_intent/share_intent.page.dart +++ b/mobile/lib/pages/share_intent/share_intent.page.dart @@ -35,7 +35,7 @@ class ShareIntentPage extends ConsumerWidget { ref.read(shareIntentUploadProvider.notifier).addAttachments(attachments); } - void upload() async { + Future upload() async { final files = candidates.map((candidate) => candidate.file).toList(); await ref.read(shareIntentUploadProvider.notifier).uploadAll(files); } @@ -102,7 +102,7 @@ class ShareIntentPage extends ConsumerWidget { Icons.image, color: Colors.white, size: 20, - shadows: [Shadow(offset: Offset(0, 0), blurRadius: 8.0, color: Colors.black45)], + shadows: [Shadow(offset: Offset.zero, blurRadius: 8.0, color: Colors.black45)], ), ), ], diff --git a/mobile/lib/presentation/pages/dev/main_timeline.page.dart b/mobile/lib/presentation/pages/dev/main_timeline.page.dart index b78bbc2979..f2215d169c 100644 --- a/mobile/lib/presentation/pages/dev/main_timeline.page.dart +++ b/mobile/lib/presentation/pages/dev/main_timeline.page.dart @@ -1,9 +1,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/presentation/widgets/feature_message/feature_message_dialog.widget.dart'; import 'package:immich_mobile/presentation/widgets/memory/memory_lane.widget.dart'; import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; -import 'package:immich_mobile/presentation/widgets/feature_message/feature_message_dialog.widget.dart'; import 'package:immich_mobile/providers/feature_message.provider.dart'; import 'package:immich_mobile/providers/infrastructure/memory.provider.dart'; diff --git a/mobile/lib/presentation/pages/download_info.page.dart b/mobile/lib/presentation/pages/download_info.page.dart index e805458e76..af44714b83 100644 --- a/mobile/lib/presentation/pages/download_info.page.dart +++ b/mobile/lib/presentation/pages/download_info.page.dart @@ -14,14 +14,14 @@ class DownloadInfoPage extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final tasks = ref.watch(downloadStateProvider.select((state) => state.taskProgress)).entries.toList(); - onCancelDownload(String id) { + void onCancelDownload(String id) { ref.watch(downloadStateProvider.notifier).cancelDownload(id); } return Scaffold( appBar: AppBar( title: Text("download".t(context: context)), - actions: [], + actions: const [], ), body: ListView.builder( physics: const ClampingScrollPhysics(), diff --git a/mobile/lib/presentation/pages/drift_activities.page.dart b/mobile/lib/presentation/pages/drift_activities.page.dart index b998e10dc2..a52f1d7358 100644 --- a/mobile/lib/presentation/pages/drift_activities.page.dart +++ b/mobile/lib/presentation/pages/drift_activities.page.dart @@ -45,7 +45,7 @@ class DriftActivitiesPage extends HookConsumerWidget { if (assetName != null) Text(assetName!, style: context.textTheme.bodySmall), ], ), - actions: [const LikeActivityActionButton(iconOnly: true)], + actions: const [LikeActivityActionButton(iconOnly: true)], actionsPadding: const EdgeInsets.only(right: 8), ), body: activities.widgetWhen( diff --git a/mobile/lib/presentation/pages/drift_album_options.page.dart b/mobile/lib/presentation/pages/drift_album_options.page.dart index 1a516426b5..84060aa38c 100644 --- a/mobile/lib/presentation/pages/drift_album_options.page.dart +++ b/mobile/lib/presentation/pages/drift_album_options.page.dart @@ -43,7 +43,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { ); } - void leaveAlbum() async { + Future leaveAlbum() async { try { await ref.read(remoteAlbumProvider.notifier).leaveAlbum(album.id, userId: userId); unawaited(context.navigateTo(const DriftAlbumsRoute())); @@ -52,7 +52,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { } } - void removeUserFromAlbum(UserDto user) async { + Future removeUserFromAlbum(UserDto user) async { try { await ref.read(remoteAlbumProvider.notifier).removeUser(album.id, user.id); ref.invalidate(remoteAlbumSharedUsersProvider(album.id)); @@ -83,11 +83,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { ref.invalidate(remoteAlbumSharedUsersProvider(album.id)); } catch (e) { - ImmichToast.show( - context: context, - msg: "Failed to add users to album: ${e.toString()}", - toastType: ToastType.error, - ); + ImmichToast.show(context: context, msg: "Failed to add users to album: $e", toastType: ToastType.error); } } @@ -129,7 +125,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { ); } - buildOwnerInfo() { + Widget buildOwnerInfo() { if (isOwner) { final owner = ref.watch(currentUserProvider); return ListTile( @@ -160,7 +156,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { } } - buildSharedUsersList() { + Widget buildSharedUsersList() { return sharedUsersAsync.maybeWhen( data: (sharedUsers) => ListView.builder( primary: false, @@ -181,7 +177,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { ); } - buildSectionTitle(String text) { + Padding buildSectionTitle(String text) { return Padding( padding: const EdgeInsets.all(16.0), child: Text(text, style: context.textTheme.bodySmall), diff --git a/mobile/lib/presentation/pages/drift_library.page.dart b/mobile/lib/presentation/pages/drift_library.page.dart index e93a58be7d..190ad3af6a 100644 --- a/mobile/lib/presentation/pages/drift_library.page.dart +++ b/mobile/lib/presentation/pages/drift_library.page.dart @@ -370,7 +370,7 @@ class _QuickAccessButtonList extends ConsumerWidget { ), child: ListView( shrinkWrap: true, - padding: const EdgeInsets.all(0), + padding: EdgeInsets.zero, physics: const NeverScrollableScrollPhysics(), children: [ ListTile( @@ -422,7 +422,7 @@ class _PartnerList extends StatelessWidget { @override Widget build(BuildContext context) { return ListView.builder( - padding: const EdgeInsets.all(0), + padding: EdgeInsets.zero, physics: const NeverScrollableScrollPhysics(), itemCount: partners.length, shrinkWrap: true, diff --git a/mobile/lib/presentation/pages/drift_memory.page.dart b/mobile/lib/presentation/pages/drift_memory.page.dart index f601bf8419..4ae97f30e1 100644 --- a/mobile/lib/presentation/pages/drift_memory.page.dart +++ b/mobile/lib/presentation/pages/drift_memory.page.dart @@ -7,10 +7,10 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/memory.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; import 'package:immich_mobile/presentation/widgets/memory/memory_bottom_info.widget.dart'; import 'package:immich_mobile/presentation/widgets/memory/memory_card.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/haptic_feedback.provider.dart'; import 'package:immich_mobile/utils/system_ui.utils.dart'; import 'package:immich_mobile/widgets/memories/memory_epilogue.dart'; @@ -54,7 +54,7 @@ class DriftMemoryPage extends HookConsumerWidget { }; }); - toNextMemory() { + void toNextMemory() { memoryPageController.nextPage(duration: const Duration(milliseconds: 500), curve: Curves.easeIn); } @@ -83,10 +83,10 @@ class DriftMemoryPage extends HookConsumerWidget { } } - toNextAsset(int currentAssetIndex) { + void toNextAsset(int currentAssetIndex) { if (currentAssetIndex + 1 < currentMemory.value.assets.length) { // Go to the next asset - PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; + final PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; controller.nextPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500)); } else { @@ -95,10 +95,10 @@ class DriftMemoryPage extends HookConsumerWidget { } } - toPreviousAsset(int currentAssetIndex) { + void toPreviousAsset(int currentAssetIndex) { if (currentAssetIndex > 0) { // Go to the previous asset - PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; + final PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; controller.previousPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500)); } else { @@ -107,12 +107,12 @@ class DriftMemoryPage extends HookConsumerWidget { } } - updateProgressText() { + void updateProgressText() { assetProgress.value = "${currentAssetPage.value + 1}|${currentMemory.value.assets.length}"; } /// Downloads and caches the image for the asset at this [currentMemory]'s index - precacheAsset(int index) async { + Future precacheAsset(int index) async { // Guard index out of range if (index < 0) { return; diff --git a/mobile/lib/presentation/pages/drift_partner_detail.page.dart b/mobile/lib/presentation/pages/drift_partner_detail.page.dart index 7df96cf78e..fd5b64c108 100644 --- a/mobile/lib/presentation/pages/drift_partner_detail.page.dart +++ b/mobile/lib/presentation/pages/drift_partner_detail.page.dart @@ -56,7 +56,7 @@ class _InfoBoxState extends ConsumerState<_InfoBox> { _inTimeline = widget.partner.inTimeline; } - _toggleInTimeline() async { + Future _toggleInTimeline() async { final user = ref.read(currentUserProvider); if (user == null) { return; diff --git a/mobile/lib/presentation/pages/drift_people_collection.page.dart b/mobile/lib/presentation/pages/drift_people_collection.page.dart index 0afe723dc6..f39b5e15c7 100644 --- a/mobile/lib/presentation/pages/drift_people_collection.page.dart +++ b/mobile/lib/presentation/pages/drift_people_collection.page.dart @@ -4,8 +4,8 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/string_extensions.dart'; -import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; +import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/utils/image_url_builder.dart'; import 'package:immich_mobile/utils/people.utils.dart'; diff --git a/mobile/lib/presentation/pages/drift_person.page.dart b/mobile/lib/presentation/pages/drift_person.page.dart index 3430dd1abd..d4c280d010 100644 --- a/mobile/lib/presentation/pages/drift_person.page.dart +++ b/mobile/lib/presentation/pages/drift_person.page.dart @@ -24,7 +24,7 @@ class _DriftPersonPageState extends ConsumerState { late DriftPerson _person; @override - initState() { + void initState() { super.initState(); _person = widget.person; } diff --git a/mobile/lib/presentation/pages/drift_remote_album.page.dart b/mobile/lib/presentation/pages/drift_remote_album.page.dart index ccbddb99f3..5e4e525e06 100644 --- a/mobile/lib/presentation/pages/drift_remote_album.page.dart +++ b/mobile/lib/presentation/pages/drift_remote_album.page.dart @@ -82,11 +82,7 @@ class _RemoteAlbumPageState extends ConsumerState { ref.invalidate(remoteAlbumSharedUsersProvider(_album.id)); } catch (e) { - ImmichToast.show( - context: context, - msg: "Failed to add users to album: ${e.toString()}", - toastType: ToastType.error, - ); + ImmichToast.show(context: context, msg: "Failed to add users to album: $e", toastType: ToastType.error); } } diff --git a/mobile/lib/presentation/pages/drift_slideshow.page.dart b/mobile/lib/presentation/pages/drift_slideshow.page.dart index 260ed3ba78..3f0c441c01 100644 --- a/mobile/lib/presentation/pages/drift_slideshow.page.dart +++ b/mobile/lib/presentation/pages/drift_slideshow.page.dart @@ -54,7 +54,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si bool _disableAnimations = false; @override - initState() { + void initState() { super.initState(); _config = ref.read(appConfigProvider.select((s) => s.slideshow)); final asset = ref.read(assetViewerProvider).currentAsset; @@ -78,7 +78,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si } @override - dispose() { + void dispose() { _timer.cancel(); _stopwatch.stop(); _pageController.dispose(); @@ -151,7 +151,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si } } - void _nextPage() async { + Future _nextPage() async { if (_nextIndex < 0 || _nextIndex >= widget.timeline.totalAssets) { if (_config.repeat) { final wrapped = _config.direction == SlideshowDirection.forward ? 0 : widget.timeline.totalAssets - 1; @@ -267,7 +267,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si _updateNextIndex(); } - void _onTapUp() async { + Future _onTapUp() async { await (_showAppBar ? SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive) : restoreEdgeToEdge()); WidgetsBinding.instance.addPostFrameCallback((_) { @@ -295,7 +295,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si } else { return LinearProgressIndicator( color: context.colorScheme.primary, - borderRadius: const BorderRadius.all(Radius.zero), + borderRadius: BorderRadius.zero, minHeight: 5, value: ref.watch(videoPlayerProvider(asset.heroTag).select((s) => s.position)).inMilliseconds / @@ -539,7 +539,7 @@ class _SlideshowProgressBarState extends State<_SlideshowProgressBar> with Singl animation: _controller, builder: (context, _) => LinearProgressIndicator( color: widget.color, - borderRadius: const BorderRadius.all(Radius.zero), + borderRadius: BorderRadius.zero, minHeight: 5, value: _controller.value, ), diff --git a/mobile/lib/presentation/pages/drift_trash.page.dart b/mobile/lib/presentation/pages/drift_trash.page.dart index d21b437efe..36db74a658 100644 --- a/mobile/lib/presentation/pages/drift_trash.page.dart +++ b/mobile/lib/presentation/pages/drift_trash.page.dart @@ -6,8 +6,8 @@ import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; +import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; @@ -41,7 +41,7 @@ class DriftTrashPage extends StatelessWidget { pinned: true, centerTitle: true, elevation: 0, - actions: [const _TrashKebabMenu()], + actions: const [_TrashKebabMenu()], ), topSliverWidgetHeight: 24, topSliverWidget: Consumer( diff --git a/mobile/lib/presentation/pages/drift_user_selection.page.dart b/mobile/lib/presentation/pages/drift_user_selection.page.dart index b73913fd02..41394014a0 100644 --- a/mobile/lib/presentation/pages/drift_user_selection.page.dart +++ b/mobile/lib/presentation/pages/drift_user_selection.page.dart @@ -52,11 +52,11 @@ class DriftUserSelectionPage extends HookConsumerWidget { final AsyncValue> suggestedShareUsers = ref.watch(driftUsersProvider); final sharedUsersList = useState>({}); - addNewUsersHandler() { + void addNewUsersHandler() { context.maybePop(sharedUsersList.value.map((e) => e.id).toList()); } - buildTileIcon(UserDto user) { + Widget buildTileIcon(UserDto user) { if (sharedUsersList.value.contains(user)) { return CircleAvatar(backgroundColor: context.primaryColor, child: const Icon(Icons.check_rounded, size: 25)); } else { @@ -64,8 +64,8 @@ class DriftUserSelectionPage extends HookConsumerWidget { } } - buildUserList(List users) { - List usersChip = []; + ListView buildUserList(List users) { + final List usersChip = []; for (var user in sharedUsersList.value) { usersChip.add( @@ -91,7 +91,7 @@ class DriftUserSelectionPage extends HookConsumerWidget { ListView.builder( primary: false, shrinkWrap: true, - itemBuilder: ((context, index) { + itemBuilder: (context, index) { return ListTile( leading: buildTileIcon(users[index]), dense: true, @@ -107,7 +107,7 @@ class DriftUserSelectionPage extends HookConsumerWidget { } }, ); - }), + }, itemCount: users.length, ), ], diff --git a/mobile/lib/presentation/pages/edit/drift_edit.page.dart b/mobile/lib/presentation/pages/edit/drift_edit.page.dart index 2e2d39e386..0ce9985c19 100644 --- a/mobile/lib/presentation/pages/edit/drift_edit.page.dart +++ b/mobile/lib/presentation/pages/edit/drift_edit.page.dart @@ -15,7 +15,7 @@ import 'package:immich_mobile/theme/theme_data.dart'; import 'package:immich_mobile/utils/editor.utils.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; import 'package:immich_ui/immich_ui.dart'; -import 'package:openapi/api.dart' show RotateParameters, MirrorParameters, MirrorAxis; +import 'package:openapi/api.dart' show MirrorAxis, MirrorParameters, RotateParameters; @RoutePage() class DriftEditImagePage extends ConsumerStatefulWidget { diff --git a/mobile/lib/presentation/pages/edit/editor.provider.dart b/mobile/lib/presentation/pages/edit/editor.provider.dart index 69c8b7bf54..3d97f2173f 100644 --- a/mobile/lib/presentation/pages/edit/editor.provider.dart +++ b/mobile/lib/presentation/pages/edit/editor.provider.dart @@ -25,7 +25,7 @@ class EditorProvider extends Notifier { final originalWidth = exifInfo.isFlipped ? exifInfo.height : exifInfo.width; final originalHeight = exifInfo.isFlipped ? exifInfo.width : exifInfo.height; - Rect crop = existingCrop != null && originalWidth != null && originalHeight != null + final Rect crop = existingCrop != null && originalWidth != null && originalHeight != null ? convertCropParametersToRect(existingCrop.parameters, originalWidth, originalHeight) : const Rect.fromLTRB(0, 0, 1, 1); diff --git a/mobile/lib/presentation/pages/search/drift_search.page.dart b/mobile/lib/presentation/pages/search/drift_search.page.dart index 22546b8e50..6b818bd273 100644 --- a/mobile/lib/presentation/pages/search/drift_search.page.dart +++ b/mobile/lib/presentation/pages/search/drift_search.page.dart @@ -80,7 +80,7 @@ class DriftSearchPage extends HookConsumerWidget { final userPreferences = ref.watch(userMetadataPreferencesProvider); - search(SearchFilter f) { + void search(SearchFilter f) { if (f == filter.value) { return; } @@ -94,7 +94,7 @@ class DriftSearchPage extends HookConsumerWidget { } } - loadMoreSearchResults() { + void loadMoreSearchResults() { unawaited(ref.read(paginatedSearchProvider.notifier).search(filter.value)); } @@ -123,19 +123,19 @@ class DriftSearchPage extends HookConsumerWidget { return null; }, [preFilter]); - showPeoplePicker() { + void showPeoplePicker() { var people = filter.value.people; - handleOnSelect(Set value) { + void handleOnSelect(Set value) { people = value; } - handleClear() { + void handleClear() { peopleCurrentFilterWidget.value = null; search(filter.value.copyWith(people: {})); } - handleApply() { + void handleApply() { final label = people.map((e) => e.name != '' ? e.name : 'no_name'.t(context: context)).join(', '); peopleCurrentFilterWidget.value = label.isNotEmpty ? Text(label, style: context.textTheme.labelLarge) : null; search(filter.value.copyWith(people: people)); @@ -157,21 +157,21 @@ class DriftSearchPage extends HookConsumerWidget { ); } - showTagPicker() { + void showTagPicker() { var tagIds = filter.value.tagIds ?? []; String tagLabel = ''; - handleOnSelect(Iterable tags) { + void handleOnSelect(Iterable tags) { tagIds = tags.map((t) => t.id).toList(); tagLabel = tags.map((t) => t.value).join(', '); } - handleClear() { + void handleClear() { tagCurrentFilterWidget.value = null; search(filter.value.copyWith(tagIds: [])); } - handleApply() { + void handleApply() { tagCurrentFilterWidget.value = tagLabel.isNotEmpty ? Text(tagLabel, style: context.textTheme.labelLarge) : null; search(filter.value.copyWith(tagIds: tagIds)); } @@ -192,19 +192,19 @@ class DriftSearchPage extends HookConsumerWidget { ); } - showLocationPicker() { + void showLocationPicker() { var location = filter.value.location; - handleOnSelect(Map value) { + void handleOnSelect(Map value) { location = SearchLocationFilter(country: value['country'], city: value['city'], state: value['state']); } - handleClear() { + void handleClear() { locationCurrentFilterWidget.value = null; search(filter.value.copyWith(location: SearchLocationFilter())); } - handleApply() { + void handleApply() { final locationText = [ if (location.country != null) location.country!, if (location.state != null) location.state!, @@ -238,19 +238,19 @@ class DriftSearchPage extends HookConsumerWidget { ); } - showCameraPicker() { + void showCameraPicker() { var camera = filter.value.camera; - handleOnSelect(Map value) { + void handleOnSelect(Map value) { camera = SearchCameraFilter(make: value['make'], model: value['model']); } - handleClear() { + void handleClear() { cameraCurrentFilterWidget.value = null; search(filter.value.copyWith(camera: SearchCameraFilter())); } - handleApply() { + void handleApply() { final make = camera.make ?? ''; final model = camera.model ?? ''; cameraCurrentFilterWidget.value = (make.isNotEmpty || model.isNotEmpty) @@ -275,7 +275,7 @@ class DriftSearchPage extends HookConsumerWidget { ); } - datePicked(DateFilterInputModel? selectedDate) { + void datePicked(DateFilterInputModel? selectedDate) { dateInputFilter.value = selectedDate; if (selectedDate == null) { dateRangeCurrentFilterWidget.value = null; @@ -298,7 +298,7 @@ class DriftSearchPage extends HookConsumerWidget { ); } - showDatePicker() async { + Future showDatePicker() async { final firstDate = DateTime(1900); final lastDate = DateTime.now(); @@ -338,7 +338,7 @@ class DriftSearchPage extends HookConsumerWidget { } } - showQuickDatePicker() { + void showQuickDatePicker() { showFilterBottomSheet( context: context, child: FilterBottomSheetScaffold( @@ -361,19 +361,19 @@ class DriftSearchPage extends HookConsumerWidget { } // MEDIA PICKER - showMediaTypePicker() { + void showMediaTypePicker() { var mediaType = filter.value.mediaType; - handleOnSelected(AssetType assetType) { + void handleOnSelected(AssetType assetType) { mediaType = assetType; } - handleClear() { + void handleClear() { mediaTypeCurrentFilterWidget.value = null; search(filter.value.copyWith(mediaType: AssetType.other)); } - handleApply() { + void handleApply() { mediaTypeCurrentFilterWidget.value = mediaType != AssetType.other ? Text( mediaType == AssetType.image ? 'image'.t(context: context) : 'video'.t(context: context), @@ -395,19 +395,19 @@ class DriftSearchPage extends HookConsumerWidget { } // STAR RATING PICKER - showStarRatingPicker() { + void showStarRatingPicker() { var rating = filter.value.rating; - handleOnSelected(SearchRatingFilter value) { + void handleOnSelected(SearchRatingFilter value) { rating = value; } - handleClear() { + void handleClear() { ratingCurrentFilterWidget.value = null; search(filter.value.copyWith(rating: SearchRatingFilter())); } - handleApply() { + void handleApply() { ratingCurrentFilterWidget.value = rating.rating.isSome ? Text( 'rating_count'.t(args: {'count': rating.rating.unwrapOrNull ?? 0}), @@ -430,10 +430,10 @@ class DriftSearchPage extends HookConsumerWidget { } // DISPLAY OPTION - showDisplayOptionPicker() { + void showDisplayOptionPicker() { var display = filter.value.display; - handleOnSelect(Map value) { + void handleOnSelect(Map value) { display = display.copyWith( isNotInAlbum: value[DisplayOption.notInAlbum], isArchive: value[DisplayOption.archive], @@ -441,7 +441,7 @@ class DriftSearchPage extends HookConsumerWidget { ); } - handleClear() { + void handleClear() { displayOptionCurrentFilterWidget.value = null; search( filter.value.copyWith( @@ -450,7 +450,7 @@ class DriftSearchPage extends HookConsumerWidget { ); } - handleApply() { + void handleApply() { final filterText = [ if (display.isNotInAlbum) 'search_filter_display_option_not_in_album'.t(context: context), if (display.isArchive) 'archive'.t(context: context), @@ -473,7 +473,7 @@ class DriftSearchPage extends HookConsumerWidget { ); } - handleTextSubmitted(String value) => search(switch (textSearchType.value) { + void handleTextSubmitted(String value) => search(switch (textSearchType.value) { TextSearchType.context => filter.value.copyWith(filename: '', context: value, description: '', ocr: ''), TextSearchType.filename => filter.value.copyWith(filename: value, context: '', description: '', ocr: ''), TextSearchType.description => filter.value.copyWith(filename: '', context: '', description: value, ocr: ''), diff --git a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart index dc48ed57ec..86d3fa0749 100644 --- a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart @@ -1,25 +1,23 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/album/album.model.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; +import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/unarchive_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; +import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; import 'package:immich_mobile/providers/user.provider.dart'; - -import 'package:immich_mobile/domain/models/album/album.model.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; - -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; +import 'package:immich_mobile/widgets/common/immich_toast.dart'; enum AddToMenuItem { album, archive, unarchive, lockedFolder } @@ -37,16 +35,12 @@ class _AddActionButtonState extends ConsumerState { switch (selected) { case AddToMenuItem.album: _openAlbumSelector(); - break; case AddToMenuItem.archive: performArchiveAction(context, ref, source: ActionSource.viewer); - break; case AddToMenuItem.unarchive: performUnArchiveAction(context, ref, source: ActionSource.viewer); - break; case AddToMenuItem.lockedFolder: performMoveToLockFolderAction(context, ref, source: ActionSource.viewer); - break; } } diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart index 2a7c4ba9d7..45dc5ec699 100644 --- a/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart @@ -30,7 +30,7 @@ class DeleteActionButton extends ConsumerWidget { this.menuItem = false, }); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart index 6911d09f89..5a94d9807e 100644 --- a/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart @@ -7,9 +7,9 @@ import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; -import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; /// This delete action has the following behavior: /// - Prompt to delete the asset locally @@ -20,7 +20,7 @@ class DeleteLocalActionButton extends ConsumerWidget { const DeleteLocalActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart index 267a9f55e6..922f8593fa 100644 --- a/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart @@ -28,7 +28,7 @@ class DeletePermanentActionButton extends ConsumerWidget { this.useShortLabel = false, }); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart index d19a188561..f3e048f06f 100644 --- a/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart @@ -18,7 +18,7 @@ class DeleteTrashActionButton extends ConsumerWidget { const DeleteTrashActionButton({super.key, required this.source}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart index a5129b643a..b6f8cc614e 100644 --- a/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart @@ -1,6 +1,6 @@ -import 'package:immich_mobile/constants/enums.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/utils/background_sync.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; @@ -14,7 +14,7 @@ class DownloadActionButton extends ConsumerWidget { final bool menuItem; const DownloadActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref, BackgroundSyncManager backgroundSyncManager) async { + Future _onTap(BuildContext context, WidgetRef ref, BackgroundSyncManager backgroundSyncManager) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart index 6eeec0658b..b2b5050a8e 100644 --- a/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart @@ -13,7 +13,7 @@ class EditDateTimeActionButton extends ConsumerWidget { const EditDateTimeActionButton({super.key, required this.source}); - _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart index 1a8a1a5c39..cc8e15617c 100644 --- a/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart @@ -13,7 +13,7 @@ class EditLocationActionButton extends ConsumerWidget { const EditLocationActionButton({super.key, required this.source}); - _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart index 07ace7e631..0365335fd2 100644 --- a/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart @@ -17,7 +17,7 @@ class FavoriteActionButton extends ConsumerWidget { const FavoriteActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/like_activity_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/like_activity_action_button.widget.dart index 4cb973cca1..46a5c2c41e 100644 --- a/mobile/lib/presentation/widgets/action_buttons/like_activity_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/like_activity_action_button.widget.dart @@ -25,7 +25,7 @@ class LikeActivityActionButton extends ConsumerWidget { final activities = ref.watch(albumActivityProvider((album?.id ?? "", asset?.id))); - onTap(Activity? liked) async { + Future onTap(Activity? liked) async { if (user == null) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart index 541a9f8093..adf73e4107 100644 --- a/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart @@ -21,20 +21,17 @@ class OpenInBrowserActionButton extends ConsumerWidget { this.menuItem = false, }); - void _onTap() async { + Future _onTap() async { final serverEndpoint = Store.get(StoreKey.serverEndpoint).replaceFirst('/api', ''); String originPath = ''; switch (origin) { case TimelineOrigin.favorite: originPath = '/favorites'; - break; case TimelineOrigin.trash: originPath = '/trash'; - break; case TimelineOrigin.archive: originPath = '/archive'; - break; default: break; } diff --git a/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart index 97a36a56dc..ebcfbaa1e5 100644 --- a/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart @@ -24,7 +24,7 @@ class RemoveFromAlbumActionButton extends ConsumerWidget { this.menuItem = false, }); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart index 17d2a76af7..75deef9ccb 100644 --- a/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart @@ -20,7 +20,7 @@ class RemoveFromLockFolderActionButton extends ConsumerWidget { this.menuItem = false, }); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart index 1713718967..b752a77c89 100644 --- a/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart @@ -17,7 +17,7 @@ class RestoreActionButton extends ConsumerWidget { const RestoreActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart index e7928bd325..82a9d98549 100644 --- a/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart @@ -12,7 +12,7 @@ class RestoreTrashActionButton extends ConsumerWidget { const RestoreTrashActionButton({super.key, required this.source}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart b/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart index 1d704aafe8..d080efc5b2 100644 --- a/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart @@ -22,7 +22,7 @@ class SetAlbumCoverActionButton extends ConsumerWidget { this.menuItem = false, }); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart index eef87f299d..ef520ea941 100644 --- a/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart @@ -93,13 +93,13 @@ class ShareActionButton extends ConsumerWidget { return switch (source) { ActionSource.timeline => ref.read(multiSelectProvider).selectedAssets, ActionSource.viewer => switch (ref.read(assetViewerProvider).currentAsset) { - BaseAsset asset => {asset}, + final BaseAsset asset => {asset}, null => const {}, }, }; } - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } @@ -108,7 +108,7 @@ class ShareActionButton extends ConsumerWidget { await _share(context, ref, fileType); } - void _onLongPress(BuildContext context, WidgetRef ref) async { + Future _onLongPress(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart index b8dc69f515..dfe8fad025 100644 --- a/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart @@ -12,7 +12,7 @@ class ShareLinkActionButton extends ConsumerWidget { const ShareLinkActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart index 42dcfa683a..02da265f31 100644 --- a/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart @@ -18,7 +18,7 @@ class SimilarPhotosActionButton extends ConsumerWidget { const SimilarPhotosActionButton({super.key, required this.assetId, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart index 22fccf5473..b87d288a3e 100644 --- a/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart @@ -14,7 +14,7 @@ class StackActionButton extends ConsumerWidget { const StackActionButton({super.key, required this.source}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart index e95569af45..a320d3b1b1 100644 --- a/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart @@ -20,7 +20,7 @@ class TrashActionButton extends ConsumerWidget { const TrashActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart index 57221303a8..78984f9ef1 100644 --- a/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart @@ -4,13 +4,13 @@ import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/events.model.dart'; +import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; // used to allow performing unarchive action from different sources (without duplicating code) Future performUnArchiveAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async { diff --git a/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart index 5e88735d9c..94d6588074 100644 --- a/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart @@ -17,7 +17,7 @@ class UnFavoriteActionButton extends ConsumerWidget { const UnFavoriteActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart index e7badf129f..c9a5102a9b 100644 --- a/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart @@ -15,7 +15,7 @@ class UnStackActionButton extends ConsumerWidget { const UnStackActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart index 599e11d467..1d09ad23a8 100644 --- a/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart @@ -24,7 +24,7 @@ class UploadActionButton extends ConsumerWidget { const UploadActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref) async { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } diff --git a/mobile/lib/presentation/widgets/album/album_selector.widget.dart b/mobile/lib/presentation/widgets/album/album_selector.widget.dart index 44abfba47e..285c6290a9 100644 --- a/mobile/lib/presentation/widgets/album/album_selector.widget.dart +++ b/mobile/lib/presentation/widgets/album/album_selector.widget.dart @@ -774,7 +774,7 @@ class AddToAlbumHeader extends ConsumerWidget { TextButton.icon( style: TextButton.styleFrom( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), // remove internal padding - minimumSize: const Size(0, 0), // allow shrinking + minimumSize: Size.zero, // allow shrinking tapTargetSize: MaterialTapTargetSize.shrinkWrap, // remove extra height ), onPressed: onCreateAlbum, @@ -797,7 +797,7 @@ class CreateAlbumButton extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { Future onCreateAlbum() async { - var albumName = await showDialog(context: context, builder: (context) => const NewAlbumNameModal()); + final albumName = await showDialog(context: context, builder: (context) => const NewAlbumNameModal()); if (albumName == null) { return; } @@ -839,7 +839,7 @@ class CreateAlbumButton extends ConsumerWidget { TextButton.icon( style: TextButton.styleFrom( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), - minimumSize: const Size(0, 0), + minimumSize: Size.zero, tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), onPressed: onCreateAlbum, diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/appears_in_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/appears_in_details.widget.dart index 6a565fa2cd..dffda47b84 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/appears_in_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/appears_in_details.widget.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; @@ -8,8 +9,8 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/widgets/album/album_tile.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/sheet_tile.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/routing/router.dart'; diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart index 8c144a83bd..379f0975b1 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart @@ -53,7 +53,7 @@ class _LocationDetailsState extends ConsumerState { } } - void editLocation() async { + Future editLocation() async { await ref.read(actionProvider.notifier).editLocation(ActionSource.viewer, context); } diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/rating_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/rating_details.widget.dart index e501c2ee3e..352838c761 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/rating_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/rating_details.widget.dart @@ -41,7 +41,7 @@ class RatingDetails extends ConsumerWidget { unfilledColor: context.themeData.colorScheme.onSurface.withAlpha(100), itemSize: 40, onRatingUpdate: (rating) async { - await ref.read(actionProvider.notifier).updateRating(ActionSource.viewer, rating.round()); + await ref.read(actionProvider.notifier).updateRating(ActionSource.viewer, rating); }, onClearRating: () async { await ref.read(actionProvider.notifier).updateRating(ActionSource.viewer, null); diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/technical_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/technical_details.widget.dart index 33e0fa38f5..e97fa4889b 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/technical_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/technical_details.widget.dart @@ -99,14 +99,14 @@ class TechnicalDetails extends ConsumerWidget { static String _getFileInfo(BaseAsset asset, ExifInfo? exifInfo) { final height = asset.height; final width = asset.width; - final resolution = (width != null && height != null) ? "${width.toInt()} x ${height.toInt()}" : null; + final resolution = (width != null && height != null) ? "$width x $height" : null; final fileSize = exifInfo?.fileSize != null ? formatBytes(exifInfo!.fileSize!) : null; return switch ((fileSize, resolution)) { (null, null) => '', - (String fileSize, null) => fileSize, - (null, String resolution) => resolution, - (String fileSize, String resolution) => '$fileSize$_kSeparator$resolution', + (final String fileSize, null) => fileSize, + (null, final String resolution) => resolution, + (final String fileSize, final String resolution) => '$fileSize$_kSeparator$resolution', }; } @@ -116,9 +116,9 @@ class TechnicalDetails extends ConsumerWidget { } return switch ((exifInfo.make, exifInfo.model)) { (null, null) => null, - (String make, null) => make, - (null, String model) => model, - (String make, String model) => '$make $model', + (final String make, null) => make, + (null, final String model) => model, + (final String make, final String model) => '$make $model', }; } diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_stack.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_stack.widget.dart index f5d75a6a86..23c473e618 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_stack.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_stack.widget.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/presentation/widgets/images/thumbnail.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; class AssetStackRow extends ConsumerWidget { @@ -23,7 +23,8 @@ class AssetStackRow extends ConsumerWidget { } final showingControls = ref.watch(assetViewerProvider.select((s) => s.showingControls)); - double opacity = ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); + final double opacity = + ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); return IgnorePointer( ignoring: opacity < 1.0, @@ -75,7 +76,7 @@ class _StackItemState extends ConsumerState<_StackItem> { Icons.play_circle_outline_rounded, color: Colors.white, size: 16, - shadows: [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset(0.0, 0.0))], + shadows: [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset.zero)], ), ); const selectedDecoration = BoxDecoration( diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart index 1065ebe25e..3952dafdb2 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart @@ -167,7 +167,7 @@ class _AssetViewerState extends ConsumerState { _handleCasting(); } - void _onAssetChanged(int index) async { + Future _onAssetChanged(int index) async { _currentPage = index; final asset = await ref.read(timelineServiceProvider).getAssetAsync(index); @@ -222,7 +222,7 @@ class _AssetViewerState extends ConsumerState { _onTimelineReloadEvent(); case ViewerReloadAssetEvent(): _onViewerReloadEvent(); - case ViewerStackAssetDeletedEvent event: + case final ViewerStackAssetDeletedEvent event: _onViewerStackAssetDeletedEvent(event); default: } diff --git a/mobile/lib/presentation/widgets/asset_viewer/rating_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/rating_bar.widget.dart index b956ef103c..0ed37869be 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/rating_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/rating_bar.widget.dart @@ -64,8 +64,8 @@ class _RatingBarState extends State { } else if (dx >= totalWidth) { newRating = widget.itemCount.toDouble(); } else { - double starWithPadding = widget.itemSize + widget.starPadding; - int tappedIndex = (dx / starWithPadding).floor().clamp(0, widget.itemCount - 1); + final double starWithPadding = widget.itemSize + widget.starPadding; + final int tappedIndex = (dx / starWithPadding).floor().clamp(0, widget.itemCount - 1); newRating = tappedIndex + 1.0; if (isTap && newRating == _currentRating && _currentRating != 0) { @@ -88,7 +88,7 @@ class _RatingBarState extends State { @override Widget build(BuildContext context) { final isRTL = Directionality.of(context) == TextDirection.rtl; - final double visualAlignmentOffset = 5.0; + const double visualAlignmentOffset = 5.0; return Column( mainAxisSize: MainAxisSize.min, @@ -107,8 +107,8 @@ class _RatingBarState extends State { if (i.isOdd) { return SizedBox(width: widget.starPadding); } - int index = i ~/ 2; - bool filled = _currentRating > index; + final int index = i ~/ 2; + final bool filled = _currentRating > index; return widget.itemBuilder ?? Icon( Icons.star_rounded, diff --git a/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart index ccbaf7660a..d007883ec9 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart @@ -83,7 +83,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg } @override - void didChangeAppLifecycleState(AppLifecycleState state) async { + Future didChangeAppLifecycleState(AppLifecycleState state) async { switch (state) { case AppLifecycleState.resumed: if (_shouldPlayOnForeground) { @@ -198,7 +198,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg return localAsset; } - void _onPlaybackReady() async { + Future _onPlaybackReady() async { if (!mounted || !widget.isCurrent) { return; } @@ -257,7 +257,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg _controller?.onPlaybackEnded.removeListener(_onPlaybackEnded); } - void _loadVideo() async { + Future _loadVideo() async { final nc = _controller; if (nc == null || nc.videoSource != null || !mounted) { return; diff --git a/mobile/lib/presentation/widgets/asset_viewer/viewer_bottom_app_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/viewer_bottom_app_bar.widget.dart index 1c0b600843..0e7b5661de 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/viewer_bottom_app_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/viewer_bottom_app_bar.widget.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/bottom_bar.widget.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; class ViewerBottomAppBar extends ConsumerWidget { const ViewerBottomAppBar({super.key}); @@ -9,7 +9,8 @@ class ViewerBottomAppBar extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final showingControls = ref.watch(assetViewerProvider.select((s) => s.showingControls)); - double opacity = ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); + final double opacity = + ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); return IgnorePointer( ignoring: opacity < 1.0, diff --git a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart index 5997e15bf0..878a1c9405 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart @@ -40,7 +40,8 @@ class ViewerTopAppBar extends ConsumerWidget implements PreferredSizeWidget { } final showingControls = ref.watch(assetViewerProvider.select((s) => s.showingControls)); - double opacity = ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); + final double opacity = + ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); final originalTheme = context.themeData; final assetForAction = [asset]; diff --git a/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart index 0d0e0259fd..d5ed3f6c96 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart @@ -74,7 +74,7 @@ class _BaseDraggableScrollableSheetState extends ConsumerState color: widget.backgroundColor ?? context.colorScheme.surfaceContainer, elevation: 3.0, shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(18))), - margin: const EdgeInsets.symmetric(horizontal: 0), + margin: EdgeInsets.zero, child: Column( children: [ Expanded( diff --git a/mobile/lib/presentation/widgets/bottom_sheet/map_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/map_bottom_sheet.widget.dart index 945bdc9584..06d1ddc99d 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/map_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/map_bottom_sheet.widget.dart @@ -21,10 +21,10 @@ class MapBottomSheet extends StatelessWidget { maxChildSize: 0.75, shouldCloseOnMinExtent: false, resizeOnScroll: false, - actions: [], + actions: const [], backgroundColor: context.themeData.colorScheme.surface, - slivers: [ - const SliverFillRemaining(hasScrollBody: false, child: SizedBox(height: 0, child: _ScopedMapTimeline())), + slivers: const [ + SliverFillRemaining(hasScrollBody: false, child: SizedBox(height: 0, child: _ScopedMapTimeline())), ], ); } diff --git a/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart b/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart index 9727ec29e4..2c89c68d99 100644 --- a/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart +++ b/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart @@ -4,10 +4,10 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/domain/models/feature_message.model.dart'; -import 'package:immich_mobile/presentation/widgets/feature_message/feature_message_placeholder.widget.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/widgets/feature_message/feature_message_placeholder.widget.dart'; Future showFeatureMessageDialog(BuildContext context) { return showGeneralDialog( diff --git a/mobile/lib/presentation/widgets/images/full_image.widget.dart b/mobile/lib/presentation/widgets/images/full_image.widget.dart index 77ea996b89..78fc0a6a21 100644 --- a/mobile/lib/presentation/widgets/images/full_image.widget.dart +++ b/mobile/lib/presentation/widgets/images/full_image.widget.dart @@ -22,7 +22,7 @@ class FullImage extends StatelessWidget { Widget build(BuildContext context) { final provider = getFullImageProvider(asset, size: size); return OctoImage( - fadeInDuration: const Duration(milliseconds: 0), + fadeInDuration: Duration.zero, fadeOutDuration: const Duration(milliseconds: 100), placeholderBuilder: placeholder != null ? (_) => placeholder! : null, image: provider, diff --git a/mobile/lib/presentation/widgets/images/image_provider.dart b/mobile/lib/presentation/widgets/images/image_provider.dart index b3c58314db..9cc386e302 100644 --- a/mobile/lib/presentation/widgets/images/image_provider.dart +++ b/mobile/lib/presentation/widgets/images/image_provider.dart @@ -25,7 +25,7 @@ mixin CancellableImageProviderMixin on CancellableImageProvide ImageInfo? getInitialImage(CancellableImageProvider provider) { final completer = CancelableCompleter(onCancel: provider.cancel); - final cachedStream = provider.resolve(const ImageConfiguration()); + final cachedStream = provider.resolve(ImageConfiguration.empty); ImageInfo? cachedImage; final listener = ImageStreamListener((image, synchronousCall) { if (synchronousCall) { diff --git a/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart b/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart index c42d365464..7d71f0296d 100644 --- a/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart +++ b/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart @@ -285,7 +285,7 @@ class _TileOverlayIcon extends StatelessWidget { icon, color: Colors.white, size: 16, - shadows: [const Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset(0.0, 0.0))], + shadows: const [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset.zero)], ); } } diff --git a/mobile/lib/presentation/widgets/map/map_utils.dart b/mobile/lib/presentation/widgets/map/map_utils.dart index 80df5995b6..3ce7b2e055 100644 --- a/mobile/lib/presentation/widgets/map/map_utils.dart +++ b/mobile/lib/presentation/widgets/map/map_utils.dart @@ -71,7 +71,7 @@ class MapUtils { bool silent = false, }) async { try { - bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); + final bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); if (!serviceEnabled && !silent) { unawaited(showDialog(context: context, builder: (context) => _LocationServiceDisabledDialog(context))); return (null, LocationPermission.deniedForever); @@ -98,7 +98,7 @@ class MapUtils { return (null, LocationPermission.deniedForever); } - Position currentUserLocation = await Geolocator.getCurrentPosition( + final Position currentUserLocation = await Geolocator.getCurrentPosition( locationSettings: const LocationSettings( accuracy: LocationAccuracy.high, distanceFilter: 0, diff --git a/mobile/lib/presentation/widgets/memory/memory_card.widget.dart b/mobile/lib/presentation/widgets/memory/memory_card.widget.dart index 2f7a616632..2a88de8e0a 100644 --- a/mobile/lib/presentation/widgets/memory/memory_card.widget.dart +++ b/mobile/lib/presentation/widgets/memory/memory_card.widget.dart @@ -55,7 +55,7 @@ class DriftMemoryCard extends StatelessWidget { } if (asset.isImage) { - return FullImage(asset, fit: fit, size: const Size(double.infinity, double.infinity)); + return FullImage(asset, fit: fit, size: Size.infinite); } return Center( diff --git a/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart b/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart index c194bbc684..6e66ff47ce 100644 --- a/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart +++ b/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart @@ -6,9 +6,9 @@ import 'package:immich_mobile/domain/models/person.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; +import 'package:immich_mobile/utils/debug_print.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; import 'package:scroll_date_picker/scroll_date_picker.dart'; -import 'package:immich_mobile/utils/debug_print.dart'; class DriftPersonBirthdayEditForm extends ConsumerStatefulWidget { final DriftPerson person; @@ -28,7 +28,7 @@ class _DriftPersonNameEditFormState extends ConsumerState saveBirthday() async { try { final result = await ref.read(driftPeopleServiceProvider).updateBrithday(widget.person.id, _selectedDate); diff --git a/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart b/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart index 6de19000e0..2eaac2ebf5 100644 --- a/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart +++ b/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart @@ -6,8 +6,8 @@ import 'package:immich_mobile/domain/models/person.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; import 'package:immich_mobile/utils/debug_print.dart'; +import 'package:immich_mobile/widgets/common/immich_toast.dart'; class DriftPersonNameEditForm extends ConsumerStatefulWidget { final DriftPerson person; @@ -27,7 +27,7 @@ class _DriftPersonNameEditFormState extends ConsumerState onEdit(String personId, String newName) async { try { final result = await ref.read(driftPeopleServiceProvider).updateName(personId, newName); if (result != 0) { diff --git a/mobile/lib/presentation/widgets/people/person_option_sheet.widget.dart b/mobile/lib/presentation/widgets/people/person_option_sheet.widget.dart index b374d48417..b0ded02624 100644 --- a/mobile/lib/presentation/widgets/people/person_option_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/people/person_option_sheet.widget.dart @@ -11,7 +11,7 @@ class PersonOptionSheet extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - TextStyle textStyle = Theme.of(context).textTheme.bodyLarge!.copyWith(fontWeight: FontWeight.w600); + final TextStyle textStyle = Theme.of(context).textTheme.bodyLarge!.copyWith(fontWeight: FontWeight.w600); return SafeArea( child: Padding( diff --git a/mobile/lib/presentation/widgets/timeline/header.widget.dart b/mobile/lib/presentation/widgets/timeline/header.widget.dart index 3eff305251..d73d024efb 100644 --- a/mobile/lib/presentation/widgets/timeline/header.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/header.widget.dart @@ -6,8 +6,8 @@ import 'package:immich_mobile/domain/models/timeline.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; import 'package:immich_mobile/providers/haptic_feedback.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; class TimelineHeader extends HookConsumerWidget { diff --git a/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart b/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart index 27f523a2a8..f5e3493a8e 100644 --- a/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart @@ -590,7 +590,7 @@ class _SlideFadeTransition extends StatelessWidget { animation: _animation, builder: (context, child) => _animation.value == 0.0 ? const SizedBox() : child!, child: SlideTransition( - position: Tween(begin: const Offset(0.3, 0.0), end: const Offset(0.0, 0.0)).animate(_animation), + position: Tween(begin: const Offset(0.3, 0.0), end: Offset.zero).animate(_animation), child: FadeTransition(opacity: _animation, child: _child), ), ); diff --git a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart index 20a4b4257e..5bd39deb8a 100644 --- a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart @@ -199,7 +199,7 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> with WidgetsBi switch (event) { case ScrollToTopEvent(): _scrollToTop(); - case ScrollToDateEvent scrollToDateEvent: + case final ScrollToDateEvent scrollToDateEvent: _scrollToDate(scrollToDateEvent.date); case TimelineReloadEvent(): setState(() {}); diff --git a/mobile/lib/providers/album/album_title.provider.dart b/mobile/lib/providers/album/album_title.provider.dart index bf812a01d8..b38c2929fb 100644 --- a/mobile/lib/providers/album/album_title.provider.dart +++ b/mobile/lib/providers/album/album_title.provider.dart @@ -3,11 +3,11 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; class AlbumTitleNotifier extends StateNotifier { AlbumTitleNotifier() : super(""); - setAlbumTitle(String title) { + void setAlbumTitle(String title) { state = title; } - clearAlbumTitle() { + void clearAlbumTitle() { state = ""; } } diff --git a/mobile/lib/providers/app_life_cycle.provider.dart b/mobile/lib/providers/app_life_cycle.provider.dart index ad0940b776..2b52973c0a 100644 --- a/mobile/lib/providers/app_life_cycle.provider.dart +++ b/mobile/lib/providers/app_life_cycle.provider.dart @@ -35,7 +35,7 @@ class AppLifeCycleNotifier extends StateNotifier { return state; } - void handleAppResume() async { + Future handleAppResume() async { state = AppLifeCycleEnum.resumed; // Prevent overlapping resume operations diff --git a/mobile/lib/providers/asset_viewer/download.provider.dart b/mobile/lib/providers/asset_viewer/download.provider.dart index 37d3392d88..2c4854bdb0 100644 --- a/mobile/lib/providers/asset_viewer/download.provider.dart +++ b/mobile/lib/providers/asset_viewer/download.provider.dart @@ -37,7 +37,7 @@ class DownloadStateNotifier extends StateNotifier { ); } - void cancelDownload(String id) async { + Future cancelDownload(String id) async { final isCanceled = await _downloadService.cancelDownload(id); if (isCanceled) { @@ -55,5 +55,5 @@ class DownloadStateNotifier extends StateNotifier { } final downloadStateProvider = StateNotifierProvider( - ((ref) => DownloadStateNotifier(ref.watch(downloadServiceProvider))), + (ref) => DownloadStateNotifier(ref.watch(downloadServiceProvider)), ); diff --git a/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart b/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart index 8bd0581061..51119f4ba2 100644 --- a/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart +++ b/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart @@ -9,11 +9,11 @@ import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; final shareIntentUploadProvider = StateNotifierProvider>( - ((ref) => ShareIntentUploadStateNotifier( + (ref) => ShareIntentUploadStateNotifier( ref.watch(appRouterProvider), ref.read(foregroundUploadServiceProvider), ref.read(shareIntentServiceProvider), - )), + ), ); class ShareIntentUploadStateNotifier extends StateNotifier> { diff --git a/mobile/lib/providers/auth.provider.dart b/mobile/lib/providers/auth.provider.dart index 23ccea8025..2ed4cbcf00 100644 --- a/mobile/lib/providers/auth.provider.dart +++ b/mobile/lib/providers/auth.provider.dart @@ -134,7 +134,7 @@ class AuthNotifier extends StateNotifier { await _widgetService.writeCredentials(serverEndpoint, accessToken, customHeaders); // Get the deviceid from the store if it exists, otherwise generate a new one - String deviceId = Store.tryGet(StoreKey.deviceId) ?? await FlutterUdid.consistentUdid; + final String deviceId = Store.tryGet(StoreKey.deviceId) ?? await FlutterUdid.consistentUdid; UserDto? user = _userService.tryGetMyUser(); diff --git a/mobile/lib/providers/backup/drift_backup.provider.dart b/mobile/lib/providers/backup/drift_backup.provider.dart index bf2b7cae4a..b43fec023c 100644 --- a/mobile/lib/providers/backup/drift_backup.provider.dart +++ b/mobile/lib/providers/backup/drift_backup.provider.dart @@ -2,16 +2,15 @@ import 'dart:async'; import 'package:collection/collection.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:logging/logging.dart'; - import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/domain/models/album/local_album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/utils/upload_speed_calculator.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/services/foreground_upload.service.dart'; import 'package:immich_mobile/services/background_upload.service.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:immich_mobile/utils/upload_speed_calculator.dart'; +import 'package:logging/logging.dart'; class EnqueueStatus { final int enqueueCount; diff --git a/mobile/lib/providers/cast.provider.dart b/mobile/lib/providers/cast.provider.dart index b298514d67..943ac930ec 100644 --- a/mobile/lib/providers/cast.provider.dart +++ b/mobile/lib/providers/cast.provider.dart @@ -58,7 +58,6 @@ class CastNotifier extends StateNotifier { switch (type) { case CastDestinationType.googleCast: await _gCastService.connect(device); - break; } } diff --git a/mobile/lib/providers/gallery_permission.provider.dart b/mobile/lib/providers/gallery_permission.provider.dart index 6e4fc69926..315c67a214 100644 --- a/mobile/lib/providers/gallery_permission.provider.dart +++ b/mobile/lib/providers/gallery_permission.provider.dart @@ -12,7 +12,7 @@ class GalleryPermissionNotifier extends StateNotifier { getGalleryPermissionStatus(); } - get hasPermission => state.isGranted || state.isLimited; + bool get hasPermission => state.isGranted || state.isLimited; /// Requests the gallery permission Future requestGalleryPermission() async { diff --git a/mobile/lib/providers/haptic_feedback.provider.dart b/mobile/lib/providers/haptic_feedback.provider.dart index 711c6fa4e2..e1ce5c8d0d 100644 --- a/mobile/lib/providers/haptic_feedback.provider.dart +++ b/mobile/lib/providers/haptic_feedback.provider.dart @@ -13,31 +13,31 @@ class HapticNotifier extends StateNotifier { HapticNotifier(this._ref) : super(null); - selectionClick() { + void selectionClick() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { HapticFeedback.selectionClick(); } } - lightImpact() { + void lightImpact() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { HapticFeedback.lightImpact(); } } - mediumImpact() { + void mediumImpact() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { HapticFeedback.mediumImpact(); } } - heavyImpact() { + void heavyImpact() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { HapticFeedback.heavyImpact(); } } - vibrate() { + void vibrate() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { HapticFeedback.vibrate(); } diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index 52e2d9e0b9..7e08686078 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -110,7 +110,7 @@ class ActionNotifier extends Notifier { return switch (source) { ActionSource.timeline => ref.read(multiSelectProvider).selectedAssets, ActionSource.viewer => switch (ref.read(assetViewerProvider).currentAsset) { - BaseAsset asset => {asset}, + final BaseAsset asset => {asset}, null => const {}, }, }; @@ -273,7 +273,7 @@ class ActionNotifier extends Notifier { Future deleteLocal(ActionSource source, BuildContext context) async { final assets = _getAssets(source); - bool? backedUpOnly = assets.every((asset) => asset.storage == AssetState.merged) + final bool? backedUpOnly = assets.every((asset) => asset.storage == AssetState.merged) ? true : await showDialog( context: context, diff --git a/mobile/lib/providers/infrastructure/timeline.provider.dart b/mobile/lib/providers/infrastructure/timeline.provider.dart index a67b8dd822..e5ac1389e9 100644 --- a/mobile/lib/providers/infrastructure/timeline.provider.dart +++ b/mobile/lib/providers/infrastructure/timeline.provider.dart @@ -24,7 +24,7 @@ final timelineServiceProvider = Provider( }, // Empty dependencies to inform the framework that this provider // might be used in a ProviderScope - dependencies: [], + dependencies: const [], ); final timelineFactoryProvider = Provider( diff --git a/mobile/lib/providers/local_auth.provider.dart b/mobile/lib/providers/local_auth.provider.dart index 44fc5ad80c..d2860975bb 100644 --- a/mobile/lib/providers/local_auth.provider.dart +++ b/mobile/lib/providers/local_auth.provider.dart @@ -48,15 +48,12 @@ class LocalAuthNotifier extends StateNotifier { case "NotEnrolled": _log.warning("User is not enrolled in biometrics"); errorMessage = "biometric_no_options".tr(); - break; case "NotAvailable": _log.warning("Biometric authentication is not available"); errorMessage = "biometric_not_available".tr(); - break; case "LockedOut": _log.warning("User is locked out of biometric authentication"); errorMessage = "biometric_locked_out".tr(); - break; default: _log.warning("Failed to authenticate with unknown reason"); errorMessage = 'failed_to_authenticate'.tr(); diff --git a/mobile/lib/providers/map/map_marker.provider.dart b/mobile/lib/providers/map/map_marker.provider.dart index 38432eab6b..ab73f94c10 100644 --- a/mobile/lib/providers/map/map_marker.provider.dart +++ b/mobile/lib/providers/map/map_marker.provider.dart @@ -8,8 +8,8 @@ final mapMarkersProvider = FutureProvider.autoDispose>((ref) asy final mapState = ref.read(mapStateNotifierProvider); DateTime? fileCreatedAfter; bool? isFavorite; - bool isIncludeArchived = mapState.includeArchived; - bool isWithPartners = mapState.withPartners; + final bool isIncludeArchived = mapState.includeArchived; + final bool isWithPartners = mapState.withPartners; if (mapState.relativeTime != 0) { fileCreatedAfter = DateTime.now().subtract(Duration(days: mapState.relativeTime)); diff --git a/mobile/lib/providers/oauth.provider.dart b/mobile/lib/providers/oauth.provider.dart index 14b3353943..fd39e0907d 100644 --- a/mobile/lib/providers/oauth.provider.dart +++ b/mobile/lib/providers/oauth.provider.dart @@ -1,5 +1,5 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/services/oauth.service.dart'; import 'package:immich_mobile/providers/api.provider.dart'; +import 'package:immich_mobile/services/oauth.service.dart'; final oAuthServiceProvider = Provider((ref) => OAuthService(ref.watch(apiServiceProvider))); diff --git a/mobile/lib/providers/server_info.provider.dart b/mobile/lib/providers/server_info.provider.dart index 98300894f9..bf83b36f54 100644 --- a/mobile/lib/providers/server_info.provider.dart +++ b/mobile/lib/providers/server_info.provider.dart @@ -56,11 +56,11 @@ class ServerInfoNotifier extends StateNotifier { } } - _checkServerVersionMismatch(ServerVersion serverVersion, {ServerVersion? latestVersion}) async { + Future _checkServerVersionMismatch(ServerVersion serverVersion, {ServerVersion? latestVersion}) async { state = state.copyWith(serverVersion: serverVersion, latestVersion: latestVersion); - var packageInfo = await PackageInfo.fromPlatform(); - SemVer clientVersion = SemVer.fromString(packageInfo.version); + final packageInfo = await PackageInfo.fromPlatform(); + final SemVer clientVersion = SemVer.fromString(packageInfo.version); if (serverVersion < clientVersion || (latestVersion != null && serverVersion < latestVersion)) { state = state.copyWith(versionStatus: VersionStatus.serverOutOfDate); @@ -75,12 +75,12 @@ class ServerInfoNotifier extends StateNotifier { state = state.copyWith(versionStatus: VersionStatus.upToDate); } - handleReleaseInfo(ServerVersion serverVersion, ServerVersion? latestVersion) { + void handleReleaseInfo(ServerVersion serverVersion, ServerVersion? latestVersion) { // Update local server version _checkServerVersionMismatch(serverVersion, latestVersion: latestVersion); } - getServerFeatures() async { + Future getServerFeatures() async { final serverFeatures = await _serverInfoService.getServerFeatures(); if (serverFeatures == null) { return; @@ -88,7 +88,7 @@ class ServerInfoNotifier extends StateNotifier { state = state.copyWith(serverFeatures: serverFeatures); } - getServerConfig() async { + Future getServerConfig() async { final serverConfig = await _serverInfoService.getServerConfig(); if (serverConfig == null) { return; diff --git a/mobile/lib/providers/sync_status.provider.dart b/mobile/lib/providers/sync_status.provider.dart index 8d7266abf7..b7d4f8bdc3 100644 --- a/mobile/lib/providers/sync_status.provider.dart +++ b/mobile/lib/providers/sync_status.provider.dart @@ -7,7 +7,7 @@ enum SyncStatus { success, error; - localized() { + String localized() { return switch (this) { SyncStatus.idle => "idle".tr(), SyncStatus.syncing => "running".tr(), diff --git a/mobile/lib/providers/timeline/multiselect.provider.dart b/mobile/lib/providers/timeline/multiselect.provider.dart index 10c8bb86b6..cb053e0041 100644 --- a/mobile/lib/providers/timeline/multiselect.provider.dart +++ b/mobile/lib/providers/timeline/multiselect.provider.dart @@ -102,7 +102,7 @@ class MultiSelectNotifier extends Notifier { } /// Bucket bulk operations - void selectBucket(int offset, int bucketCount) async { + Future selectBucket(int offset, int bucketCount) async { final assets = await _timelineService.loadAssets(offset, bucketCount); final selectedAssets = state.selectedAssets.toSet(); @@ -111,7 +111,7 @@ class MultiSelectNotifier extends Notifier { state = state.copyWith(selectedAssets: selectedAssets); } - void deselectBucket(int offset, int bucketCount) async { + Future deselectBucket(int offset, int bucketCount) async { final assets = await _timelineService.loadAssets(offset, bucketCount); final selectedAssets = state.selectedAssets.toSet(); @@ -120,7 +120,7 @@ class MultiSelectNotifier extends Notifier { state = state.copyWith(selectedAssets: selectedAssets); } - void toggleBucketSelection(int offset, int bucketCount) async { + Future toggleBucketSelection(int offset, int bucketCount) async { final assets = await _timelineService.loadAssets(offset, bucketCount); toggleBucketSelectionByAssets(assets); } diff --git a/mobile/lib/providers/upload_profile_image.provider.dart b/mobile/lib/providers/upload_profile_image.provider.dart index 77772b0205..5e7f7fc732 100644 --- a/mobile/lib/providers/upload_profile_image.provider.dart +++ b/mobile/lib/providers/upload_profile_image.provider.dart @@ -66,7 +66,7 @@ class UploadProfileImageNotifier extends StateNotifier Future upload(XFile file, {String? fileName}) async { state = state.copyWith(status: UploadProfileStatus.loading); - var profileImagePath = await _userService.createProfileImage(fileName ?? file.name, await file.readAsBytes()); + final profileImagePath = await _userService.createProfileImage(fileName ?? file.name, await file.readAsBytes()); if (profileImagePath != null) { dPrint(() => "Successfully upload profile image"); @@ -80,5 +80,5 @@ class UploadProfileImageNotifier extends StateNotifier } final uploadProfileImageProvider = StateNotifierProvider( - ((ref) => UploadProfileImageNotifier(ref.watch(userServiceProvider))), + (ref) => UploadProfileImageNotifier(ref.watch(userServiceProvider)), ); diff --git a/mobile/lib/providers/user.provider.dart b/mobile/lib/providers/user.provider.dart index 5a56b65793..622847b0c2 100644 --- a/mobile/lib/providers/user.provider.dart +++ b/mobile/lib/providers/user.provider.dart @@ -14,7 +14,7 @@ class CurrentUserProvider extends StateNotifier { final UserService _userService; late final StreamSubscription streamSub; - refresh() async { + Future refresh() async { try { await _userService.refreshMyUser(); } catch (_) {} diff --git a/mobile/lib/providers/websocket.provider.dart b/mobile/lib/providers/websocket.provider.dart index fa05f9a4cd..a7c08457af 100644 --- a/mobile/lib/providers/websocket.provider.dart +++ b/mobile/lib/providers/websocket.provider.dart @@ -71,7 +71,7 @@ class WebsocketNotifier extends StateNotifier { final endpoint = Uri.parse(Store.get(StoreKey.serverEndpoint)); dPrint(() => "Attempting to connect to websocket"); // Configure socket transports must be specified - Socket socket = io( + final Socket socket = io( endpoint.origin, OptionBuilder() .setPath("${endpoint.path}/socket.io") @@ -107,7 +107,7 @@ class WebsocketNotifier extends StateNotifier { socket.on('on_config_update', _handleOnConfigUpdate); socket.on('on_new_release', _handleReleaseUpdates); } catch (e) { - dPrint(() => "[WEBSOCKET] Catch Websocket Error - ${e.toString()}"); + dPrint(() => "[WEBSOCKET] Catch Websocket Error - $e"); } } } @@ -147,7 +147,7 @@ class WebsocketNotifier extends StateNotifier { _ref.read(serverInfoProvider.notifier).getServerConfig(); } - _handleReleaseUpdates(dynamic data) { + void _handleReleaseUpdates(dynamic data) { // Json guard if (data is! Map) { return; diff --git a/mobile/lib/repositories/asset_media.repository.dart b/mobile/lib/repositories/asset_media.repository.dart index 4c9b6f6009..5bfb18a00f 100644 --- a/mobile/lib/repositories/asset_media.repository.dart +++ b/mobile/lib/repositories/asset_media.repository.dart @@ -37,9 +37,9 @@ class AssetMediaRepository { Future _androidSupportsTrash() async { if (Platform.isAndroid) { - DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); - AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; - int sdkVersion = androidInfo.version.sdkInt; + final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); + final AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; + final int sdkVersion = androidInfo.version.sdkInt; return sdkVersion >= 31; } return false; diff --git a/mobile/lib/repositories/auth_api.repository.dart b/mobile/lib/repositories/auth_api.repository.dart index 05dc7f103a..447826b9aa 100644 --- a/mobile/lib/repositories/auth_api.repository.dart +++ b/mobile/lib/repositories/auth_api.repository.dart @@ -32,7 +32,7 @@ class AuthApiRepository extends ApiRepository { await _apiService.authenticationApi.logout().timeout(const Duration(seconds: 7)); } - _mapLoginReponse(LoginResponseDto dto) { + LoginResponse _mapLoginReponse(LoginResponseDto dto) { return LoginResponse( accessToken: dto.accessToken, isAdmin: dto.isAdmin, diff --git a/mobile/lib/repositories/drift_album_api_repository.dart b/mobile/lib/repositories/drift_album_api_repository.dart index 3a654b7511..e0d4cc4632 100644 --- a/mobile/lib/repositories/drift_album_api_repository.dart +++ b/mobile/lib/repositories/drift_album_api_repository.dart @@ -36,7 +36,8 @@ class DriftAlbumApiRepository extends ApiRepository { Future<({List removed, List failed})> removeAssets(String albumId, Iterable assetIds) async { final response = await checkNull(_api.removeAssetFromAlbum(albumId, BulkIdsDto(ids: assetIds.toList()))); - final List removed = [], failed = []; + final List removed = []; + final List failed = []; for (final dto in response) { if (dto.success) { removed.add(dto.id); @@ -55,7 +56,8 @@ class DriftAlbumApiRepository extends ApiRepository { final response = await checkNull( _api.addAssetsToAlbum(albumId, BulkIdsDto(ids: assetIds.toList()), abortTrigger: abortTrigger), ); - final List added = [], failed = []; + final List added = []; + final List failed = []; for (final dto in response) { if (dto.success) { added.add(dto.id); diff --git a/mobile/lib/repositories/gcast.repository.dart b/mobile/lib/repositories/gcast.repository.dart index db3e0f45d0..b8ffe79b04 100644 --- a/mobile/lib/repositories/gcast.repository.dart +++ b/mobile/lib/repositories/gcast.repository.dart @@ -1,7 +1,7 @@ import 'package:cast/device.dart'; +import 'package:cast/discovery_service.dart'; import 'package:cast/session.dart'; import 'package:cast/session_manager.dart'; -import 'package:cast/discovery_service.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; final gCastRepositoryProvider = Provider((_) { diff --git a/mobile/lib/repositories/upload.repository.dart b/mobile/lib/repositories/upload.repository.dart index 68522490d8..1ebc9825f4 100644 --- a/mobile/lib/repositories/upload.repository.dart +++ b/mobile/lib/repositories/upload.repository.dart @@ -4,13 +4,13 @@ import 'dart:io'; import 'package:background_downloader/background_downloader.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:http/http.dart'; import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/infrastructure/repositories/network.repository.dart'; -import 'package:logging/logging.dart'; -import 'package:http/http.dart'; import 'package:immich_mobile/utils/debug_print.dart'; +import 'package:logging/logging.dart'; final uploadRepositoryProvider = Provider((ref) => UploadRepository()); @@ -144,7 +144,7 @@ class UploadRepository { logger.warning("Upload $logContext was cancelled"); return UploadResult.cancelled(); } catch (error, stackTrace) { - logger.warning("Error uploading $logContext: ${error.toString()}: $stackTrace"); + logger.warning("Error uploading $logContext: $error: $stackTrace"); return UploadResult.error(errorMessage: error.toString()); } } diff --git a/mobile/lib/routing/duplicate_guard.dart b/mobile/lib/routing/duplicate_guard.dart index c55c7318d0..bffe6064ee 100644 --- a/mobile/lib/routing/duplicate_guard.dart +++ b/mobile/lib/routing/duplicate_guard.dart @@ -5,7 +5,7 @@ import 'package:immich_mobile/utils/debug_print.dart'; class DuplicateGuard extends AutoRouteGuard { const DuplicateGuard(); @override - void onNavigation(NavigationResolver resolver, StackRouter router) async { + Future onNavigation(NavigationResolver resolver, StackRouter router) async { // Duplicate navigation if (resolver.route.name == router.current.name) { dPrint(() => 'DuplicateGuard: Preventing duplicate route navigation for ${resolver.route.name}'); diff --git a/mobile/lib/routing/locked_guard.dart b/mobile/lib/routing/locked_guard.dart index 38484538e0..da0a025bca 100644 --- a/mobile/lib/routing/locked_guard.dart +++ b/mobile/lib/routing/locked_guard.dart @@ -21,7 +21,7 @@ class LockedGuard extends AutoRouteGuard { LockedGuard(this._apiService, this._secureStorageService, this._localAuth); @override - void onNavigation(NavigationResolver resolver, StackRouter router) async { + Future onNavigation(NavigationResolver resolver, StackRouter router) async { final authStatus = await _apiService.authenticationApi.getAuthStatus(); if (authStatus == null) { @@ -62,13 +62,10 @@ class LockedGuard extends AutoRouteGuard { switch (error.code) { case auth_error.notAvailable: _log.severe("notAvailable: $error"); - break; case auth_error.notEnrolled: _log.severe("not enrolled"); - break; default: _log.severe("error"); - break; } resolver.next(false); diff --git a/mobile/lib/routing/router.dart b/mobile/lib/routing/router.dart index 34d29be945..ea33e4ba25 100644 --- a/mobile/lib/routing/router.dart +++ b/mobile/lib/routing/router.dart @@ -38,7 +38,6 @@ import 'package:immich_mobile/pages/share_intent/share_intent.page.dart'; import 'package:immich_mobile/presentation/pages/cleanup_preview.page.dart'; import 'package:immich_mobile/presentation/pages/dev/main_timeline.page.dart'; import 'package:immich_mobile/presentation/pages/dev/media_stat.page.dart'; -import 'package:immich_mobile/presentation/pages/feature_message/whats_new.page.dart'; import 'package:immich_mobile/presentation/pages/download_info.page.dart'; import 'package:immich_mobile/presentation/pages/drift_activities.page.dart'; import 'package:immich_mobile/presentation/pages/drift_album.page.dart'; @@ -66,6 +65,7 @@ import 'package:immich_mobile/presentation/pages/drift_trash.page.dart'; import 'package:immich_mobile/presentation/pages/drift_user_selection.page.dart'; import 'package:immich_mobile/presentation/pages/drift_video.page.dart'; import 'package:immich_mobile/presentation/pages/edit/drift_edit.page.dart'; +import 'package:immich_mobile/presentation/pages/feature_message/whats_new.page.dart'; import 'package:immich_mobile/presentation/pages/local_timeline.page.dart'; import 'package:immich_mobile/presentation/pages/profile/profile_picture_crop.page.dart'; import 'package:immich_mobile/presentation/pages/search/drift_search.page.dart'; diff --git a/mobile/lib/services/api.service.dart b/mobile/lib/services/api.service.dart index ab05ffc18f..f5e4c5c33e 100644 --- a/mobile/lib/services/api.service.dart +++ b/mobile/lib/services/api.service.dart @@ -53,7 +53,7 @@ class ApiService { _apiClient.client = NetworkRepository.client; } - setEndpoint(String endpoint) { + void setEndpoint(String endpoint) { _apiClient.basePath = endpoint; _apiClient.client = NetworkRepository.client; usersApi = UsersApi(_apiClient); @@ -118,7 +118,7 @@ class ApiService { } try { - await setEndpoint(serverUrl); + setEndpoint(serverUrl); await serverInfoApi.pingServer().timeout(const Duration(seconds: 5)); } on TimeoutException catch (_) { return false; @@ -155,7 +155,7 @@ class ApiService { } Future setDeviceInfoHeader() async { - DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); + final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); if (Platform.isIOS) { final iosInfo = await deviceInfoPlugin.iosInfo; diff --git a/mobile/lib/services/auth.service.dart b/mobile/lib/services/auth.service.dart index 0de22fd124..0e02c7b1b9 100644 --- a/mobile/lib/services/auth.service.dart +++ b/mobile/lib/services/auth.service.dart @@ -5,8 +5,8 @@ import 'package:immich_mobile/domain/models/settings_key.dart'; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/domain/utils/background_sync.dart'; import 'package:immich_mobile/entities/store.entity.dart'; -import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/network.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/models/auth/auxilary_endpoint.model.dart'; import 'package:immich_mobile/models/auth/login_response.model.dart'; import 'package:immich_mobile/providers/api.provider.dart'; diff --git a/mobile/lib/services/background_upload.service.dart b/mobile/lib/services/background_upload.service.dart index ec731c6f68..5b379ff890 100644 --- a/mobile/lib/services/background_upload.service.dart +++ b/mobile/lib/services/background_upload.service.dart @@ -171,7 +171,7 @@ class BackgroundUploadService { const batchSize = 100; final batch = candidates.take(batchSize).toList(); - List tasks = []; + final List tasks = []; for (final asset in batch) { final task = await getUploadTask(asset); @@ -205,7 +205,7 @@ class BackgroundUploadService { return _uploadRepository.start(); } - void _handleTaskStatusUpdate(TaskStatusUpdate update) async { + Future _handleTaskStatusUpdate(TaskStatusUpdate update) async { switch (update.status) { case TaskStatus.complete: unawaited(_handleLivePhoto(update)); @@ -219,8 +219,6 @@ class BackgroundUploadService { } } - break; - default: break; } @@ -295,7 +293,7 @@ class BackgroundUploadService { final extension = p.extension(file.path).isNotEmpty ? p.extension(file.path) : p.extension(asset.name); final originalFileName = p.setExtension(fileName, extension); - String metadata = UploadTaskMetadata( + final String metadata = UploadTaskMetadata( localAssetId: asset.id, isLivePhotos: entity.isLivePhoto, livePhotoVideoId: '', diff --git a/mobile/lib/services/download.service.dart b/mobile/lib/services/download.service.dart index b84d6ebfe8..de8e8af3f5 100644 --- a/mobile/lib/services/download.service.dart +++ b/mobile/lib/services/download.service.dart @@ -63,7 +63,7 @@ class DownloadService { onVideoDownloadStatus?.call(update); } - void _onLivePhotoRecordComplete(TaskRecord record) async { + Future _onLivePhotoRecordComplete(TaskRecord record) async { final livePhotosId = LivePhotosMetadata.fromJson(record.task.metaData).id; await _saveLivePhotos(livePhotosId); } diff --git a/mobile/lib/services/folder.service.dart b/mobile/lib/services/folder.service.dart index 543c7231d6..011acbe869 100644 --- a/mobile/lib/services/folder.service.dart +++ b/mobile/lib/services/folder.service.dart @@ -18,7 +18,7 @@ class FolderService { final paths = await _folderApiRepository.getAllUniquePaths(); // Create folder structure - Map> folderMap = {}; + final Map> folderMap = {}; for (String fullPath in paths) { if (fullPath == '/') { @@ -30,12 +30,12 @@ class FolderService { fullPath = '/$fullPath'; } - List segments = fullPath.split('/')..removeWhere((s) => s.isEmpty); + final List segments = fullPath.split('/')..removeWhere((s) => s.isEmpty); String currentPath = ''; for (int i = 0; i < segments.length; i++) { - String parentPath = currentPath.isEmpty ? '_root_' : currentPath; + final String parentPath = currentPath.isEmpty ? '_root_' : currentPath; currentPath = i == 0 ? '/${segments[i]}' : '$currentPath/${segments[i]}'; if (!folderMap.containsKey(parentPath)) { @@ -55,7 +55,7 @@ class FolderService { } void attachSubfolders(RecursiveFolder folder) { - String fullPath = folder.path.isEmpty ? '/${folder.name}' : '${folder.path}/${folder.name}'; + final String fullPath = folder.path.isEmpty ? '/${folder.name}' : '${folder.path}/${folder.name}'; if (folderMap.containsKey(fullPath)) { folder.subfolders.addAll(folderMap[fullPath]!); @@ -67,7 +67,7 @@ class FolderService { } } - List rootSubfolders = folderMap['_root_'] ?? []; + final List rootSubfolders = folderMap['_root_'] ?? []; // Sort root subfolders based on order parameter rootSubfolders.sort((a, b) => order == SortOrder.desc ? b.name.compareTo(a.name) : a.name.compareTo(b.name)); @@ -83,7 +83,7 @@ class FolderService { if (folder is RecursiveFolder) { String fullPath = folder.path.isEmpty ? folder.name : '${folder.path}/${folder.name}'; fullPath = fullPath[0] == '/' ? fullPath.substring(1) : fullPath; - var result = await _folderApiRepository.getAssetsForPath(fullPath); + final result = await _folderApiRepository.getAssetsForPath(fullPath); if (order == SortOrder.desc) { result.sort((a, b) => b.createdAt.compareTo(a.createdAt)); diff --git a/mobile/lib/services/foreground_upload.service.dart b/mobile/lib/services/foreground_upload.service.dart index cce1241473..7c0352a00e 100644 --- a/mobile/lib/services/foreground_upload.service.dart +++ b/mobile/lib/services/foreground_upload.service.dart @@ -398,7 +398,7 @@ class ForegroundUploadService { } } } catch (error, stackTrace) { - _logger.severe(() => "Error backup asset: ${error.toString()}", stackTrace); + _logger.severe(() => "Error backup asset: $error", stackTrace); callbacks.onError?.call(asset.localId!, error.toString()); } finally { if (Platform.isIOS) { @@ -406,7 +406,7 @@ class ForegroundUploadService { await file?.delete(); await livePhotoFile?.delete(); } catch (error, stackTrace) { - _logger.severe(() => "ERROR deleting file: ${error.toString()}", stackTrace); + _logger.severe(() => "ERROR deleting file: $error", stackTrace); } } } diff --git a/mobile/lib/services/gcast.service.dart b/mobile/lib/services/gcast.service.dart index dcf7685237..d9fc44a34d 100644 --- a/mobile/lib/services/gcast.service.dart +++ b/mobile/lib/services/gcast.service.dart @@ -62,7 +62,6 @@ class GCastService { switch (message['type']) { case "MEDIA_STATUS": _handleMediaStatus(message); - break; } } @@ -77,13 +76,10 @@ class GCastService { switch (status['playerState']) { case "PLAYING": onCastState?.call(CastState.playing); - break; case "PAUSED": onCastState?.call(CastState.paused); - break; case "BUFFERING": onCastState?.call(CastState.buffering); - break; case "IDLE": onCastState?.call(CastState.idle); @@ -91,8 +87,6 @@ class GCastService { if (status["idleReason"] == "FINISHED") { _mediaStatusPollingTimer?.cancel(); } - - break; } if (status["media"] != null && status["media"]["duration"] != null) { @@ -147,7 +141,7 @@ class GCastService { return bufferedExpiration.isAfter(DateTime.now()); } - void loadMedia(RemoteAsset asset, bool reload) async { + Future loadMedia(RemoteAsset asset, bool reload) async { if (!isConnected) { return; } else if (asset.id == currentAssetId && !reload) { diff --git a/mobile/lib/services/search.service.dart b/mobile/lib/services/search.service.dart index 0330c8485c..e64c529f26 100644 --- a/mobile/lib/services/search.service.dart +++ b/mobile/lib/services/search.service.dart @@ -34,7 +34,7 @@ class SearchService { model: model, ); } catch (e) { - dPrint(() => "[ERROR] [getSearchSuggestions] ${e.toString()}"); + dPrint(() => "[ERROR] [getSearchSuggestions] $e"); return []; } } diff --git a/mobile/lib/services/server_info.service.dart b/mobile/lib/services/server_info.service.dart index 460e135421..fb8b347caa 100644 --- a/mobile/lib/services/server_info.service.dart +++ b/mobile/lib/services/server_info.service.dart @@ -21,7 +21,7 @@ class ServerInfoService { return ServerDiskInfo.fromDto(dto); } } catch (e) { - dPrint(() => "Error [getDiskInfo] ${e.toString()}"); + dPrint(() => "Error [getDiskInfo] $e"); } return null; } @@ -33,7 +33,7 @@ class ServerInfoService { return ServerVersion.fromDto(dto); } } catch (e) { - dPrint(() => "Error [getServerVersion] ${e.toString()}"); + dPrint(() => "Error [getServerVersion] $e"); } return null; } @@ -45,7 +45,7 @@ class ServerInfoService { return ServerFeatures.fromDto(dto); } } catch (e) { - dPrint(() => "Error [getServerFeatures] ${e.toString()}"); + dPrint(() => "Error [getServerFeatures] $e"); } return null; } @@ -57,7 +57,7 @@ class ServerInfoService { return ServerConfig.fromDto(dto); } } catch (e) { - dPrint(() => "Error [getServerConfig] ${e.toString()}"); + dPrint(() => "Error [getServerConfig] $e"); } return null; } diff --git a/mobile/lib/theme/dynamic_theme.dart b/mobile/lib/theme/dynamic_theme.dart index 7f7c4d05d7..088679b508 100644 --- a/mobile/lib/theme/dynamic_theme.dart +++ b/mobile/lib/theme/dynamic_theme.dart @@ -1,6 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:dynamic_color/dynamic_color.dart'; - +import 'package:flutter/material.dart'; import 'package:immich_mobile/theme/theme_data.dart'; import 'package:immich_mobile/utils/debug_print.dart'; diff --git a/mobile/lib/utils/bytes_units.dart b/mobile/lib/utils/bytes_units.dart index 5eb15221fe..2c5c5f18a9 100644 --- a/mobile/lib/utils/bytes_units.dart +++ b/mobile/lib/utils/bytes_units.dart @@ -22,6 +22,6 @@ String formatHumanReadableBytes(int bytes, int decimals) { return "0 B"; } const suffixes = ["B", "KiB", "MiB", "GiB", "TiB"]; - var i = (log(bytes) / log(1024)).floor(); + final i = (log(bytes) / log(1024)).floor(); return '${(bytes / pow(1024, i)).toStringAsFixed(decimals)} ${suffixes[i]}'; } diff --git a/mobile/lib/utils/diff.dart b/mobile/lib/utils/diff.dart index ea20de16cc..fae3a5d516 100644 --- a/mobile/lib/utils/diff.dart +++ b/mobile/lib/utils/diff.dart @@ -16,7 +16,8 @@ Future diffSortedLists( assert(la.isSorted(compare), "first argument must be sorted"); assert(lb.isSorted(compare), "second argument must be sorted"); bool diff = false; - int i = 0, j = 0; + int i = 0; + int j = 0; for (; i < la.length && j < lb.length;) { final int order = compare(la[i], lb[j]); if (order == 0) { @@ -53,7 +54,8 @@ bool diffSortedListsSync( assert(la.isSorted(compare), "first argument must be sorted"); assert(lb.isSorted(compare), "second argument must be sorted"); bool diff = false; - int i = 0, j = 0; + int i = 0; + int j = 0; for (; i < la.length && j < lb.length;) { final int order = compare(la[i], lb[j]); if (order == 0) { diff --git a/mobile/lib/utils/editor.utils.dart b/mobile/lib/utils/editor.utils.dart index fa2dedf383..c3440cce1a 100644 --- a/mobile/lib/utils/editor.utils.dart +++ b/mobile/lib/utils/editor.utils.dart @@ -50,10 +50,10 @@ typedef NormalizedTransform = ({double rotation, bool mirrorHorizontal, bool mir NormalizedTransform normalizeTransformEdits(List edits) { final matrix = buildAffineFromEdits(edits); - double a = matrix.a; - double b = matrix.b; - double c = matrix.c; - double d = matrix.d; + final double a = matrix.a; + final double b = matrix.b; + final double c = matrix.c; + final double d = matrix.d; final rotation = ((isCloseToZero(a) ? asin(c) : acos(a)) * 180) / pi; diff --git a/mobile/lib/utils/error_handler.dart b/mobile/lib/utils/error_handler.dart index d82e480575..dcac1431ab 100644 --- a/mobile/lib/utils/error_handler.dart +++ b/mobile/lib/utils/error_handler.dart @@ -24,7 +24,7 @@ void handleError(Object error, {StackTrace? stack, String? description}) { ); final String message; - if (serverErrorMessage(error) case String serverMessage) { + if (serverErrorMessage(error) case final String serverMessage) { message = serverMessage; } else if (isConnectionError(error)) { message = StaticTranslations.instance.login_form_server_error; diff --git a/mobile/lib/utils/hooks/crop_controller_hook.dart b/mobile/lib/utils/hooks/crop_controller_hook.dart index 663bca3dbf..cea901bd2e 100644 --- a/mobile/lib/utils/hooks/crop_controller_hook.dart +++ b/mobile/lib/utils/hooks/crop_controller_hook.dart @@ -1,7 +1,8 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:crop_image/crop_image.dart'; import 'dart:ui'; // Import the dart:ui library for Rect +import 'package:crop_image/crop_image.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; + /// A hook that provides a [CropController] instance. CropController useCropController() { return useMemoized(() => CropController(defaultCrop: const Rect.fromLTRB(0, 0, 1, 1))); diff --git a/mobile/lib/utils/image_converter.dart b/mobile/lib/utils/image_converter.dart index 6711e2bd56..d0fd4f873f 100644 --- a/mobile/lib/utils/image_converter.dart +++ b/mobile/lib/utils/image_converter.dart @@ -12,7 +12,7 @@ import 'package:flutter/material.dart'; Future imageToUint8List(Image image) async { final Completer completer = Completer(); image.image - .resolve(const ImageConfiguration()) + .resolve(ImageConfiguration.empty) .addListener( ImageStreamListener((ImageInfo info, bool _) { info.image.toByteData(format: ImageByteFormat.png).then((byteData) { diff --git a/mobile/lib/utils/image_url_builder.dart b/mobile/lib/utils/image_url_builder.dart index 7a7ee03f2b..4f584061d7 100644 --- a/mobile/lib/utils/image_url_builder.dart +++ b/mobile/lib/utils/image_url_builder.dart @@ -12,7 +12,7 @@ String getThumbnailUrlForRemoteId( bool edited = true, String? thumbhash, }) { - final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=${type.toString()}&edited=$edited'; + final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=$type&edited=$edited'; return thumbhash != null ? '$url&c=${Uri.encodeComponent(thumbhash)}' : url; } diff --git a/mobile/lib/utils/map_utils.dart b/mobile/lib/utils/map_utils.dart index 6213b214a9..19c66e51e9 100644 --- a/mobile/lib/utils/map_utils.dart +++ b/mobile/lib/utils/map_utils.dart @@ -68,7 +68,7 @@ class MapUtils { bool silent = false, }) async { try { - bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); + final bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); if (!serviceEnabled && !silent) { unawaited(showDialog(context: context, builder: (context) => _LocationServiceDisabledDialog())); return (null, LocationPermission.deniedForever); @@ -95,7 +95,7 @@ class MapUtils { return (null, LocationPermission.deniedForever); } - Position currentUserLocation = await Geolocator.getCurrentPosition( + final Position currentUserLocation = await Geolocator.getCurrentPosition( locationSettings: const LocationSettings( accuracy: LocationAccuracy.high, distanceFilter: 0, diff --git a/mobile/lib/utils/openapi_patching.dart b/mobile/lib/utils/openapi_patching.dart index 711a4a3163..e92b2afd12 100644 --- a/mobile/lib/utils/openapi_patching.dart +++ b/mobile/lib/utils/openapi_patching.dart @@ -56,9 +56,9 @@ void upgradeDto(dynamic value, String targetType) { }); } -addDefault(dynamic value, String keys, dynamic defaultValue) { +void addDefault(dynamic value, String keys, dynamic defaultValue) { // Loop through the keys and assign the default value if the key is not present - List keyList = keys.split('.'); + final List keyList = keys.split('.'); dynamic current = value; for (int i = 0; i < keyList.length - 1; i++) { diff --git a/mobile/lib/utils/people.utils.dart b/mobile/lib/utils/people.utils.dart index ddd1867269..18ae8a4528 100644 --- a/mobile/lib/utils/people.utils.dart +++ b/mobile/lib/utils/people.utils.dart @@ -5,8 +5,8 @@ import 'package:immich_mobile/presentation/widgets/people/person_edit_birthday_m import 'package:immich_mobile/presentation/widgets/people/person_edit_name_modal.widget.dart'; String formatAge(DateTime birthDate, DateTime referenceDate) { - int ageInYears = _calculateAge(birthDate, referenceDate); - int ageInMonths = _calculateAgeInMonths(birthDate, referenceDate); + final int ageInYears = _calculateAge(birthDate, referenceDate); + final int ageInMonths = _calculateAgeInMonths(birthDate, referenceDate); if (ageInMonths <= 11) { return "person_age_months".t(args: {'months': ageInMonths.toString()}); diff --git a/mobile/lib/utils/timezone.dart b/mobile/lib/utils/timezone.dart index 3e8c42d1b2..980d51de8e 100644 --- a/mobile/lib/utils/timezone.dart +++ b/mobile/lib/utils/timezone.dart @@ -21,7 +21,7 @@ import 'package:timezone/timezone.dart'; return (dt, dt.timeZoneOffset); } on LocationNotFoundException { // Handle UTC offset format (e.g., "UTC+08:00") - RegExp re = RegExp(r'^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$', caseSensitive: false); + final RegExp re = RegExp(r'^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$', caseSensitive: false); final m = re.firstMatch(timeZone); if (m != null) { final hours = int.parse(m.group(1) ?? '0'); diff --git a/mobile/lib/widgets/album/remote_album_shared_user_icons.dart b/mobile/lib/widgets/album/remote_album_shared_user_icons.dart index 2025fa7583..be908259d4 100644 --- a/mobile/lib/widgets/album/remote_album_shared_user_icons.dart +++ b/mobile/lib/widgets/album/remote_album_shared_user_icons.dart @@ -30,12 +30,12 @@ class RemoteAlbumSharedUserIcons extends ConsumerWidget { height: 50, child: ListView.builder( scrollDirection: Axis.horizontal, - itemBuilder: ((context, index) { + itemBuilder: (context, index) { return Padding( padding: const EdgeInsets.only(right: 4.0), child: UserCircleAvatar(user: sharedUsers[index], size: 36, hasBorder: true), ); - }), + }, itemCount: sharedUsers.length, ), ), diff --git a/mobile/lib/widgets/asset_grid/thumbnail_placeholder.dart b/mobile/lib/widgets/asset_grid/thumbnail_placeholder.dart index a84dfbae37..12105aa498 100644 --- a/mobile/lib/widgets/asset_grid/thumbnail_placeholder.dart +++ b/mobile/lib/widgets/asset_grid/thumbnail_placeholder.dart @@ -11,7 +11,7 @@ class ThumbnailPlaceholder extends StatelessWidget { @override Widget build(BuildContext context) { - var gradientColors = [ + final gradientColors = [ context.colorScheme.surfaceContainer, context.colorScheme.surfaceContainer.darken(amount: .1), ]; diff --git a/mobile/lib/widgets/asset_viewer/detail_panel/exif_map.dart b/mobile/lib/widgets/asset_viewer/detail_panel/exif_map.dart index f48ee06fdd..18bb27d024 100644 --- a/mobile/lib/widgets/asset_viewer/detail_panel/exif_map.dart +++ b/mobile/lib/widgets/asset_viewer/detail_panel/exif_map.dart @@ -39,7 +39,7 @@ class ExifMap extends StatelessWidget { const zoomLevel = 16; if (Platform.isAndroid) { - Uri uri = Uri( + final Uri uri = Uri( scheme: 'geo', host: '$latitude,$longitude', queryParameters: {'z': '$zoomLevel', 'q': '$latitude,$longitude'}, @@ -48,8 +48,8 @@ class ExifMap extends StatelessWidget { return uri; } } else if (Platform.isIOS) { - var params = {'ll': '$latitude,$longitude', 'q': '$latitude,$longitude', 'z': '$zoomLevel'}; - Uri uri = Uri.https('maps.apple.com', '/', params); + final params = {'ll': '$latitude,$longitude', 'q': '$latitude,$longitude', 'z': '$zoomLevel'}; + final Uri uri = Uri.https('maps.apple.com', '/', params); if (await canLaunchUrl(uri)) { return uri; } @@ -73,7 +73,7 @@ class ExifMap extends StatelessWidget { assetMarkerRemoteId: markerId, assetThumbhash: markerAssetThumbhash, onTap: (tapPosition, latLong) async { - Uri? uri = await createCoordinatesUri(); + final Uri? uri = await createCoordinatesUri(); if (uri == null) { return; diff --git a/mobile/lib/widgets/asset_viewer/video_controls.dart b/mobile/lib/widgets/asset_viewer/video_controls.dart index 0f1e0e020d..f39077a522 100644 --- a/mobile/lib/widgets/asset_viewer/video_controls.dart +++ b/mobile/lib/widgets/asset_viewer/video_controls.dart @@ -4,11 +4,11 @@ import 'package:async/async.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/colors.dart'; +import 'package:immich_mobile/extensions/duration_extensions.dart'; import 'package:immich_mobile/models/cast/cast_manager_state.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/asset_viewer/video_player_provider.dart'; import 'package:immich_mobile/providers/cast.provider.dart'; -import 'package:immich_mobile/extensions/duration_extensions.dart'; import 'package:immich_mobile/widgets/asset_viewer/animated_play_pause.dart'; class VideoControls extends ConsumerStatefulWidget { diff --git a/mobile/lib/widgets/backup/drift_album_info_list_tile.dart b/mobile/lib/widgets/backup/drift_album_info_list_tile.dart index 84128ddde2..85f655ec86 100644 --- a/mobile/lib/widgets/backup/drift_album_info_list_tile.dart +++ b/mobile/lib/widgets/backup/drift_album_info_list_tile.dart @@ -20,7 +20,7 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { final bool isSelected = album.backupSelection == BackupSelection.selected; final bool isExcluded = album.backupSelection == BackupSelection.excluded; - buildTileColor() { + Color? buildTileColor() { if (isSelected) { return context.isDarkTheme ? context.primaryColor.withAlpha(100) : context.primaryColor.withAlpha(25); } else if (isExcluded) { @@ -30,7 +30,7 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { } } - buildIcon() { + Icon buildIcon() { if (isSelected) { return Icon(Icons.check_circle_rounded, color: context.colorScheme.primary); } diff --git a/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart b/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart index e77bc1869e..22c860becf 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart @@ -29,9 +29,9 @@ class ImmichAppBarDialog extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { ref.watch(localeProvider); - ServerDiskInfo backupState = ref.watch(backupProvider); + final ServerDiskInfo backupState = ref.watch(backupProvider); final theme = context.themeData; - bool isHorizontal = !context.isMobile; + final bool isHorizontal = !context.isMobile; final horizontalPadding = isHorizontal ? 100.0 : 20.0; final user = ref.watch(currentUserProvider); final isLoggingOut = useState(false); @@ -43,7 +43,7 @@ class ImmichAppBarDialog extends HookConsumerWidget { return null; }, []); - buildTopRow() { + SizedBox buildTopRow() { return SizedBox( height: 56, child: Stack( @@ -68,7 +68,7 @@ class ImmichAppBarDialog extends HookConsumerWidget { ); } - buildActionButton(IconData icon, String text, Function() onTap, {Widget? trailing}) { + ListTile buildActionButton(IconData icon, String text, Function() onTap, {Widget? trailing}) { return ListTile( dense: true, visualDensity: VisualDensity.standard, @@ -84,11 +84,11 @@ class ImmichAppBarDialog extends HookConsumerWidget { ); } - buildSettingButton() { + ListTile buildSettingButton() { return buildActionButton(Icons.settings_outlined, "settings", () => context.pushRoute(const SettingsRoute())); } - buildFreeUpSpaceButton() { + ListTile buildFreeUpSpaceButton() { return buildActionButton( Icons.cleaning_services_outlined, "free_up_space", @@ -96,7 +96,7 @@ class ImmichAppBarDialog extends HookConsumerWidget { ); } - buildAppLogButton() { + ListTile buildAppLogButton() { return buildActionButton( Icons.assignment_outlined, "profile_drawer_app_logs", @@ -104,7 +104,7 @@ class ImmichAppBarDialog extends HookConsumerWidget { ); } - buildSignOutButton() { + ListTile buildSignOutButton() { return buildActionButton( Icons.logout_rounded, "sign_out", @@ -171,7 +171,7 @@ class ImmichAppBarDialog extends HookConsumerWidget { ); } - buildFooter() { + Padding buildFooter() { return Padding( padding: const EdgeInsets.only(top: 10, bottom: 20), child: Row( @@ -213,7 +213,7 @@ class ImmichAppBarDialog extends HookConsumerWidget { ); } - buildReadonlyMessage() { + Padding buildReadonlyMessage() { return Padding( padding: const EdgeInsets.only(left: 10.0, right: 10.0), child: ListTile( diff --git a/mobile/lib/widgets/common/app_bar_dialog/app_bar_profile_info.dart b/mobile/lib/widgets/common/app_bar_dialog/app_bar_profile_info.dart index d6881f519a..c963564c69 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/app_bar_profile_info.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/app_bar_profile_info.dart @@ -24,7 +24,7 @@ class AppBarProfileInfoBox extends HookConsumerWidget { final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); final user = ref.watch(currentUserProvider); - buildUserProfileImage() { + Widget buildUserProfileImage() { if (user == null) { return const CircleAvatar( radius: 20, @@ -42,17 +42,17 @@ class AppBarProfileInfoBox extends HookConsumerWidget { return userImage; } - pickUserProfileImage() async { + Future pickUserProfileImage() async { final XFile? image = await ImagePicker().pickImage(source: ImageSource.gallery, maxHeight: 1024, maxWidth: 1024); if (image != null) { - var success = await ref.watch(uploadProfileImageProvider.notifier).upload(image); + final success = await ref.watch(uploadProfileImageProvider.notifier).upload(image); if (success) { final profileImagePath = ref.read(uploadProfileImageProvider).profileImagePath; ref.watch(authProvider.notifier).updateUserProfileImagePath(profileImagePath); if (user != null) { - ref.read(currentUserProvider.notifier).refresh(); + unawaited(ref.read(currentUserProvider.notifier).refresh()); } unawaited(ref.read(backupProvider.notifier).updateDiskInfo()); diff --git a/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart b/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart index a209d280c3..fbec03bbbd 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart @@ -18,14 +18,14 @@ class AppBarServerInfo extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { ref.watch(localeProvider); - ServerInfo serverInfoState = ref.watch(serverInfoProvider); + final ServerInfo serverInfoState = ref.watch(serverInfoProvider); final user = ref.watch(currentUserProvider); final bool showVersionWarning = ref.watch(versionWarningPresentProvider(user)); final appInfo = useState({}); - getPackageInfo() async { - PackageInfo packageInfo = await PackageInfo.fromPlatform(); + Future getPackageInfo() async { + final PackageInfo packageInfo = await PackageInfo.fromPlatform(); appInfo.value = {"version": packageInfo.version, "buildNumber": packageInfo.buildNumber}; } diff --git a/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart b/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart index 179eab8e7d..c29475351e 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart @@ -16,8 +16,10 @@ class ServerUpdateNotification extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final serverInfoState = ref.watch(serverInfoProvider); - Color errorColor = const Color.fromARGB(85, 253, 97, 83); - Color infoColor = context.isDarkTheme ? context.primaryColor.withAlpha(55) : context.primaryColor.withAlpha(25); + const Color errorColor = Color.fromARGB(85, 253, 97, 83); + final Color infoColor = context.isDarkTheme + ? context.primaryColor.withAlpha(55) + : context.primaryColor.withAlpha(25); void openUpdateLink() { String url; if (serverInfoState.versionStatus == VersionStatus.serverOutOfDate) { @@ -69,7 +71,7 @@ class ServerUpdateNotification extends HookConsumerWidget { onPressed: openUpdateLink, style: TextButton.styleFrom( padding: const EdgeInsets.all(4), - minimumSize: const Size(0, 0), + minimumSize: Size.zero, tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), child: serverInfoState.versionStatus == VersionStatus.clientOutOfDate diff --git a/mobile/lib/widgets/common/date_time_picker.dart b/mobile/lib/widgets/common/date_time_picker.dart index 0ebd7bba93..679241fc1b 100644 --- a/mobile/lib/widgets/common/date_time_picker.dart +++ b/mobile/lib/widgets/common/date_time_picker.dart @@ -41,7 +41,7 @@ class _DateTimePicker extends HookWidget { } } - Duration? tzOffset = initialTZOffset ?? initialDateTime?.timeZoneOffset; + final Duration? tzOffset = initialTZOffset ?? initialDateTime?.timeZoneOffset; if (tzOffset != null) { final offsetInMilli = tzOffset.inMilliseconds; @@ -80,7 +80,7 @@ class _DateTimePicker extends HookWidget { ) .toList(); - void pickDate() async { + Future pickDate() async { final now = DateTime.now(); // Handles cases where the date from the asset is far off in the future final initialDate = date.value.isAfter(now) ? now : date.value; diff --git a/mobile/lib/widgets/common/immich_sliver_app_bar.dart b/mobile/lib/widgets/common/immich_sliver_app_bar.dart index 6905b5b430..22528b05d5 100644 --- a/mobile/lib/widgets/common/immich_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/immich_sliver_app_bar.dart @@ -10,8 +10,8 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/models/server_info/server_info.model.dart'; import 'package:immich_mobile/providers/backup/drift_backup.provider.dart'; import 'package:immich_mobile/providers/cast.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/sync_status.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; diff --git a/mobile/lib/widgets/common/immich_toast.dart b/mobile/lib/widgets/common/immich_toast.dart index 1da07f419d..0a06de4d91 100644 --- a/mobile/lib/widgets/common/immich_toast.dart +++ b/mobile/lib/widgets/common/immich_toast.dart @@ -5,7 +5,7 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart'; enum ToastType { info, success, error } class ImmichToast { - static show({ + static void show({ required BuildContext context, required String msg, ToastType toastType = ToastType.info, diff --git a/mobile/lib/widgets/common/person_sliver_app_bar.dart b/mobile/lib/widgets/common/person_sliver_app_bar.dart index a9f9413c47..80dded2130 100644 --- a/mobile/lib/widgets/common/person_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/person_sliver_app_bar.dart @@ -13,11 +13,11 @@ import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; -import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/utils/people.utils.dart'; import 'package:immich_mobile/utils/image_url_builder.dart'; +import 'package:immich_mobile/utils/people.utils.dart'; class PersonSliverAppBar extends ConsumerStatefulWidget { const PersonSliverAppBar({ @@ -56,8 +56,8 @@ class _MesmerizingSliverAppBarState extends ConsumerState { @override Widget build(BuildContext context) { final isMultiSelectEnabled = ref.watch(multiSelectProvider.select((s) => s.isEnabled)); - Color? actionIconColor = Color.lerp(Colors.white, context.primaryColor, _scrollProgress); - List actionIconShadows = [ + final Color? actionIconColor = Color.lerp(Colors.white, context.primaryColor, _scrollProgress); + final List actionIconShadows = [ if (_scrollProgress < 0.95) Shadow(offset: const Offset(0, 2), blurRadius: 5, color: Colors.black.withValues(alpha: 0.5)) else diff --git a/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart b/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart index fee77dcd99..4d2dc5ef88 100644 --- a/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart @@ -64,9 +64,9 @@ class _MesmerizingSliverAppBarState extends ConsumerState actionIconShadows = [ + final List actionIconShadows = [ if (_scrollProgress < 0.95) Shadow(offset: const Offset(0, 2), blurRadius: 5, color: Colors.black.withValues(alpha: 0.5)) else diff --git a/mobile/lib/widgets/common/selection_sliver_app_bar.dart b/mobile/lib/widgets/common/selection_sliver_app_bar.dart index ac74e69e64..d60124041c 100644 --- a/mobile/lib/widgets/common/selection_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/selection_sliver_app_bar.dart @@ -23,7 +23,7 @@ class _SelectionSliverAppBarState extends ConsumerState { return !toExclude.contains(asset); }).toSet(); - onDone(Set selected) { + void onDone(Set selected) { ref.read(multiSelectProvider.notifier).reset(); context.pop>(selected); } diff --git a/mobile/lib/widgets/common/tag_picker.dart b/mobile/lib/widgets/common/tag_picker.dart index 0265cf7e6c..97fbff1930 100644 --- a/mobile/lib/widgets/common/tag_picker.dart +++ b/mobile/lib/widgets/common/tag_picker.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/tag.model.dart'; @@ -86,7 +86,7 @@ class TagPicker extends HookConsumerWidget { final searchQuery = useState(''); final tags = ref.watch(tagProvider); final selectedTagIds = useState>(filter); - final borderRadius = const BorderRadius.all(Radius.circular(10)); + const borderRadius = BorderRadius.all(Radius.circular(10)); final selectedNewTagValues = useState>({}); return Column( diff --git a/mobile/lib/widgets/forms/change_password_form.dart b/mobile/lib/widgets/forms/change_password_form.dart index 7ed9fa5f1c..7ab556b292 100644 --- a/mobile/lib/widgets/forms/change_password_form.dart +++ b/mobile/lib/widgets/forms/change_password_form.dart @@ -55,7 +55,7 @@ class ChangePasswordForm extends HookConsumerWidget { passwordController: passwordController, onPressed: () async { if (formKey.currentState!.validate()) { - var isSuccess = await ref + final isSuccess = await ref .read(authProvider.notifier) .changePassword(passwordController.value.text); diff --git a/mobile/lib/widgets/forms/login/login_form.dart b/mobile/lib/widgets/forms/login/login_form.dart index 79617f8fe4..4c9b56646f 100644 --- a/mobile/lib/widgets/forms/login/login_form.dart +++ b/mobile/lib/widgets/forms/login/login_form.dart @@ -76,7 +76,7 @@ class LoginForm extends HookConsumerWidget { final loginFormKey = GlobalKey(); final ValueNotifier serverEndpoint = useState(null); - checkVersionMismatch() async { + Future checkVersionMismatch() async { try { final packageInfo = await PackageInfo.fromPlatform(); final appSemVer = SemVer.fromString(packageInfo.version); @@ -151,13 +151,13 @@ class LoginForm extends HookConsumerWidget { return null; }, []); - populateTestLoginInfo() { + void populateTestLoginInfo() { emailController.text = 'demo@immich.app'; passwordController.text = 'demo'; serverEndpointController.text = 'https://demo.immich.app'; } - populateTestLoginInfo1() { + void populateTestLoginInfo1() { emailController.text = 'testuser@email.com'; passwordController.text = 'password'; serverEndpointController.text = 'http://10.1.15.216:2283/api'; @@ -177,7 +177,7 @@ class LoginForm extends HookConsumerWidget { } } - getManageMediaPermission() async { + Future getManageMediaPermission() async { final hasPermission = await ref.read(permissionRepositoryProvider).hasManageMediaPermission(); if (!hasPermission) { await showDialog( @@ -226,7 +226,7 @@ class LoginForm extends HookConsumerWidget { bool isSyncRemoteDeletionsMode() => Platform.isAndroid && Store.get(StoreKey.manageLocalMediaAndroid, false); - login() async { + Future login() async { TextInput.finishAutofillContext(); // Invalidate all api repository provider instance to take into account new access token @@ -277,13 +277,13 @@ class LoginForm extends HookConsumerWidget { } Future generatePKCECodeChallenge(String codeVerifier) async { - var bytes = utf8.encode(codeVerifier); - var digest = sha256.convert(bytes); + final bytes = utf8.encode(codeVerifier); + final digest = sha256.convert(bytes); return base64Url.encode(digest.bytes).replaceAll('=', ''); } - oAuthLogin() async { - var oAuthService = ref.watch(oAuthServiceProvider); + Future oAuthLogin() async { + final oAuthService = ref.watch(oAuthServiceProvider); String? oAuthServerUrl; final state = generateRandomString(32); @@ -357,7 +357,7 @@ class LoginForm extends HookConsumerWidget { } } - buildVersionCompatWarning() { + SingleChildRenderObjectWidget buildVersionCompatWarning() { checkVersionMismatch(); if (warningMessage.value == null) { diff --git a/mobile/lib/widgets/forms/pin_input.dart b/mobile/lib/widgets/forms/pin_input.dart index c4f0d8f3b7..8bcfd51282 100644 --- a/mobile/lib/widgets/forms/pin_input.dart +++ b/mobile/lib/widgets/forms/pin_input.dart @@ -26,9 +26,9 @@ class PinInput extends StatelessWidget { @override Widget build(BuildContext context) { - getPinSize() { - final minimumPadding = 18.0; - final gapWidth = 3.0; + Size getPinSize() { + const minimumPadding = 18.0; + const gapWidth = 3.0; final screenWidth = context.width; final pinWidth = (screenWidth - (minimumPadding * 2) - (gapWidth * 5)) / (length ?? 6); diff --git a/mobile/lib/widgets/forms/pin_registration_form.dart b/mobile/lib/widgets/forms/pin_registration_form.dart index d126169aad..b3270ec524 100644 --- a/mobile/lib/widgets/forms/pin_registration_form.dart +++ b/mobile/lib/widgets/forms/pin_registration_form.dart @@ -29,7 +29,7 @@ class PinRegistrationForm extends HookConsumerWidget { return true; } - createNewPinCode() async { + Future createNewPinCode() async { final isValid = validatePinCode(); if (!isValid) { hasError.value = true; diff --git a/mobile/lib/widgets/forms/pin_verification_form.dart b/mobile/lib/widgets/forms/pin_verification_form.dart index 2b7e3e8251..de2acaa1f7 100644 --- a/mobile/lib/widgets/forms/pin_verification_form.dart +++ b/mobile/lib/widgets/forms/pin_verification_form.dart @@ -29,7 +29,7 @@ class PinVerificationForm extends HookConsumerWidget { final hasError = useState(false); final isVerified = useState(false); - verifyPin(String pinCode) async { + Future verifyPin(String pinCode) async { final isUnlocked = await ref.read(authProvider.notifier).unlockPinCode(pinCode); if (isUnlocked) { diff --git a/mobile/lib/widgets/map/asset_marker_icon.dart b/mobile/lib/widgets/map/asset_marker_icon.dart index ff6058161b..75881195a4 100644 --- a/mobile/lib/widgets/map/asset_marker_icon.dart +++ b/mobile/lib/widgets/map/asset_marker_icon.dart @@ -69,15 +69,15 @@ class _PinPainter extends CustomPainter { @override void paint(Canvas canvas, Size size) { - Paint primaryBrush = Paint() + final Paint primaryBrush = Paint() ..color = primaryColor ..style = PaintingStyle.fill; - Paint secondaryBrush = Paint() + final Paint secondaryBrush = Paint() ..color = secondaryColor ..style = PaintingStyle.fill; - Paint lineBrush = Paint() + final Paint lineBrush = Paint() ..color = primaryColor ..style = PaintingStyle.stroke ..strokeWidth = 2; diff --git a/mobile/lib/widgets/map/map_theme_override.dart b/mobile/lib/widgets/map/map_theme_override.dart index 57f970b0d1..dda96efeaf 100644 --- a/mobile/lib/widgets/map/map_theme_override.dart +++ b/mobile/lib/widgets/map/map_theme_override.dart @@ -66,7 +66,7 @@ class _MapThemeOverrideState extends ConsumerState with Widget @override Widget build(BuildContext context) { _theme = widget.themeMode ?? ref.watch(mapStateNotifierProvider.select((v) => v.themeMode)); - var appTheme = ref.watch(immichThemeProvider); + final appTheme = ref.watch(immichThemeProvider); final locale = ref.watch(localeProvider); useValueChanged(_theme, (_, __) { diff --git a/mobile/lib/widgets/map/map_thumbnail.dart b/mobile/lib/widgets/map/map_thumbnail.dart index 7defb52264..eb4653e17e 100644 --- a/mobile/lib/widgets/map/map_thumbnail.dart +++ b/mobile/lib/widgets/map/map_thumbnail.dart @@ -6,8 +6,8 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/maplibrecontroller_extensions.dart'; -import 'package:immich_mobile/widgets/map/map_theme_override.dart'; import 'package:immich_mobile/widgets/map/asset_marker_icon.dart'; +import 'package:immich_mobile/widgets/map/map_theme_override.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; /// A non-interactive thumbnail of a map in the given coordinates with optional markers diff --git a/mobile/lib/widgets/photo_view/src/core/photo_view_core.dart b/mobile/lib/widgets/photo_view/src/core/photo_view_core.dart index 265feb756e..341decdbd6 100644 --- a/mobile/lib/widgets/photo_view/src/core/photo_view_core.dart +++ b/mobile/lib/widgets/photo_view/src/core/photo_view_core.dart @@ -1,15 +1,15 @@ import 'package:flutter/widgets.dart'; import 'package:immich_mobile/widgets/photo_view/photo_view.dart' show - PhotoViewScaleState, PhotoViewHeroAttributes, - PhotoViewImageTapDownCallback, - PhotoViewImageTapUpCallback, - PhotoViewImageScaleEndCallback, PhotoViewImageDragEndCallback, PhotoViewImageDragStartCallback, PhotoViewImageDragUpdateCallback, PhotoViewImageLongPressStartCallback, + PhotoViewImageScaleEndCallback, + PhotoViewImageTapDownCallback, + PhotoViewImageTapUpCallback, + PhotoViewScaleState, ScaleStateCycle; import 'package:immich_mobile/widgets/photo_view/src/controller/photo_view_controller.dart'; import 'package:immich_mobile/widgets/photo_view/src/controller/photo_view_controller_delegate.dart'; @@ -436,7 +436,7 @@ class PhotoViewCoreState extends State ? SizedBox( width: scaleBoundaries.childSize.width * scale, height: scaleBoundaries.childSize.height * scale, - child: widget.customChild!, + child: widget.customChild, ) : Image( key: widget.heroAttributes?.tag != null ? ObjectKey(widget.heroAttributes!.tag) : null, diff --git a/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart b/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart index a9cfeb3a40..db66cb962d 100644 --- a/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart +++ b/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart @@ -75,7 +75,7 @@ class ImageWrapper extends StatefulWidget { final int index; @override - createState() => _ImageWrapperState(); + State createState() => _ImageWrapperState(); } class _ImageWrapperState extends State { @@ -122,7 +122,7 @@ class _ImageWrapperState extends State { // retrieve image from the provider void _resolveImage() { - final ImageStream newStream = widget.imageProvider.resolve(const ImageConfiguration()); + final ImageStream newStream = widget.imageProvider.resolve(ImageConfiguration.empty); _updateSourceStream(newStream); } @@ -135,7 +135,7 @@ class _ImageWrapperState extends State { } void handleImageFrame(ImageInfo info, bool synchronousCall) { - setupCB() { + void setupCB() { _imageSize = Size(info.image.width.toDouble(), info.image.height.toDouble()); _loading = false; _imageInfo = _imageInfo; diff --git a/mobile/lib/widgets/search/search_filter/filter_bottom_sheet_scaffold.dart b/mobile/lib/widgets/search/search_filter/filter_bottom_sheet_scaffold.dart index dee42ec5a0..1c338b8828 100644 --- a/mobile/lib/widgets/search/search_filter/filter_bottom_sheet_scaffold.dart +++ b/mobile/lib/widgets/search/search_filter/filter_bottom_sheet_scaffold.dart @@ -20,7 +20,7 @@ class FilterBottomSheetScaffold extends StatelessWidget { @override Widget build(BuildContext context) { - buildChildWidget() { + Widget buildChildWidget() { if (expanded != null && expanded == true) { return Expanded(child: child); } diff --git a/mobile/lib/widgets/search/search_filter/people_picker.dart b/mobile/lib/widgets/search/search_filter/people_picker.dart index a9382ec3ae..0732b30a63 100644 --- a/mobile/lib/widgets/search/search_filter/people_picker.dart +++ b/mobile/lib/widgets/search/search_filter/people_picker.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/person.model.dart'; @@ -21,7 +21,7 @@ class PeoplePicker extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final formFocus = useFocusNode(); - final imageSize = 60.0; + const imageSize = 60.0; final searchQuery = useState(''); final people = ref.watch(getAllPeopleProvider); final selectedPeople = useState>(filter ?? {}); diff --git a/mobile/lib/widgets/search/search_filter/star_rating_picker.dart b/mobile/lib/widgets/search/search_filter/star_rating_picker.dart index 32d1ab5bd4..864ddf2591 100644 --- a/mobile/lib/widgets/search/search_filter/star_rating_picker.dart +++ b/mobile/lib/widgets/search/search_filter/star_rating_picker.dart @@ -28,7 +28,7 @@ class StarRatingPicker extends HookWidget { 6, (index) => RadioListTile( key: Key("star_$index"), - title: Text('rating_count'.t(args: {'count': (index)})), + title: Text('rating_count'.t(args: {'count': index})), value: index, ), ), diff --git a/mobile/lib/widgets/search/thumbnail_with_info.dart b/mobile/lib/widgets/search/thumbnail_with_info.dart index 7ba8257c8a..d25a324860 100644 --- a/mobile/lib/widgets/search/thumbnail_with_info.dart +++ b/mobile/lib/widgets/search/thumbnail_with_info.dart @@ -22,7 +22,7 @@ class ThumbnailWithInfo extends StatelessWidget { @override Widget build(BuildContext context) { - var textAndIconColor = context.isDarkTheme ? Colors.grey[100] : Colors.grey[700]; + final textAndIconColor = context.isDarkTheme ? Colors.grey[100] : Colors.grey[700]; return ThumbnailWithInfoContainer( onTap: onTap, borderRadius: borderRadius, diff --git a/mobile/lib/widgets/settings/advanced_settings.dart b/mobile/lib/widgets/settings/advanced_settings.dart index 542a7cc5e2..1c1d42639f 100644 --- a/mobile/lib/widgets/settings/advanced_settings.dart +++ b/mobile/lib/widgets/settings/advanced_settings.dart @@ -7,9 +7,9 @@ import 'package:flutter_hooks/flutter_hooks.dart' hide Store; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/services/log.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; import 'package:immich_mobile/repositories/permission.repository.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/utils/bytes_units.dart'; @@ -45,9 +45,9 @@ class AdvancedSettings extends HookConsumerWidget { Future checkAndroidVersion() async { if (Platform.isAndroid) { - DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); - AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; - int sdkVersion = androidInfo.version.sdkInt; + final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); + final AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; + final int sdkVersion = androidInfo.version.sdkInt; return sdkVersion >= 31; } return false; diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/asset_viewer_settings.dart b/mobile/lib/widgets/settings/asset_viewer_settings/asset_viewer_settings.dart index f3b9039b2b..25829327e0 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/asset_viewer_settings.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/asset_viewer_settings.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:immich_mobile/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart'; import 'package:immich_mobile/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart'; -import 'package:immich_mobile/widgets/settings/asset_viewer_settings/video_viewer_settings.dart'; import 'package:immich_mobile/widgets/settings/asset_viewer_settings/slideshow_settings.dart'; +import 'package:immich_mobile/widgets/settings/asset_viewer_settings/video_viewer_settings.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; class AssetViewerSettings extends StatelessWidget { diff --git a/mobile/lib/widgets/settings/free_up_space_settings.dart b/mobile/lib/widgets/settings/free_up_space_settings.dart index da14933997..7b16c2d67d 100644 --- a/mobile/lib/widgets/settings/free_up_space_settings.dart +++ b/mobile/lib/widgets/settings/free_up_space_settings.dart @@ -173,7 +173,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { } @override - dispose() { + void dispose() { super.dispose(); WakelockPlus.disable(); } diff --git a/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart b/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart index 8250ef438a..f3c2b6c97f 100644 --- a/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart +++ b/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart @@ -19,7 +19,7 @@ class ExternalNetworkPreference extends HookConsumerWidget { final entries = useState([const AuxilaryEndpoint(url: '', status: AuxCheckStatus.unknown)]); final canSave = useState(false); - saveEndpointList() { + Future saveEndpointList() { canSave.value = entries.value.every((e) => e.status == AuxCheckStatus.valid); final urls = entries.value @@ -30,7 +30,7 @@ class ExternalNetworkPreference extends HookConsumerWidget { return ref.read(settingsProvider).write(SettingsKey.networkExternalEndpointList, urls); } - updateValidationStatus(String url, int index, AuxCheckStatus status) async { + Future updateValidationStatus(String url, int index, AuxCheckStatus status) async { entries.value[index] = entries.value[index].copyWith(url: url, status: status); await saveEndpointList(); @@ -39,7 +39,7 @@ class ExternalNetworkPreference extends HookConsumerWidget { } } - handleReorder(int oldIndex, int newIndex) { + void handleReorder(int oldIndex, int newIndex) { final entry = entries.value.removeAt(oldIndex); entries.value.insert(newIndex, entry); entries.value = [...entries.value]; @@ -47,7 +47,7 @@ class ExternalNetworkPreference extends HookConsumerWidget { saveEndpointList(); } - handleDismiss(int index) { + void handleDismiss(int index) { entries.value = [...entries.value..removeAt(index)]; saveEndpointList(); diff --git a/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart b/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart index 1d2b5eea0f..f8b6b087a3 100644 --- a/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart +++ b/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart @@ -62,17 +62,17 @@ class LocalNetworkPreference extends HookConsumerWidget { return null; }, []); - saveWifiName(String wifiName) { + Future saveWifiName(String wifiName) { wifiNameText.value = wifiName; return ref.read(authProvider.notifier).saveWifiName(wifiName); } - saveLocalEndpoint(String url) { + Future saveLocalEndpoint(String url) { localEndpointText.value = url; return ref.read(authProvider.notifier).saveLocalEndpoint(url); } - handleEditWifiName() async { + Future handleEditWifiName() async { final wifiName = await _showEditDialog(context, "wifi_name".tr(), "your_wifi_name".tr(), wifiNameText.value); if (wifiName != null) { @@ -80,7 +80,7 @@ class LocalNetworkPreference extends HookConsumerWidget { } } - handleEditServerEndpoint() async { + Future handleEditServerEndpoint() async { final localEndpoint = await _showEditDialog( context, "server_endpoint".tr(), @@ -94,7 +94,7 @@ class LocalNetworkPreference extends HookConsumerWidget { } } - autofillCurrentNetwork() async { + Future autofillCurrentNetwork() async { final wifiName = await ref.read(networkProvider.notifier).getWifiName(); if (wifiName == null) { diff --git a/mobile/lib/widgets/settings/notification_setting.dart b/mobile/lib/widgets/settings/notification_setting.dart index 8b7c652925..ee2e15f52b 100644 --- a/mobile/lib/widgets/settings/notification_setting.dart +++ b/mobile/lib/widgets/settings/notification_setting.dart @@ -15,14 +15,14 @@ class NotificationSetting extends HookConsumerWidget { final permissionService = ref.watch(notificationPermissionProvider); final hasPermission = permissionService == PermissionStatus.granted; - openAppNotificationSettings(BuildContext ctx) { + void openAppNotificationSettings(BuildContext ctx) { ctx.pop(); openAppSettings(); } // When permissions are permanently denied, you need to go to settings to // allow them - showPermissionsDialog() { + void showPermissionsDialog() { showDialog( context: context, builder: (ctx) => AlertDialog( diff --git a/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart b/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart index 5e745dd61d..bfdb0f065c 100644 --- a/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart @@ -3,9 +3,9 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; import 'package:immich_mobile/widgets/settings/setting_group_title.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; class HapticSetting extends HookConsumerWidget { const HapticSetting({super.key}); @@ -15,7 +15,7 @@ class HapticSetting extends HookConsumerWidget { final hapticFeedbackSetting = useAppSettingsState(AppSettingsEnum.enableHapticFeedback); final isHapticFeedbackEnabled = useValueNotifier(hapticFeedbackSetting.value); - onHapticFeedbackChange(bool isEnabled) { + void onHapticFeedbackChange(bool isEnabled) { hapticFeedbackSetting.value = isEnabled; } diff --git a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart index 48d0ca672b..3fead2c59f 100644 --- a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart @@ -25,12 +25,12 @@ class PrimaryColorSetting extends HookConsumerWidget { }); } - onUseSystemColorChange(bool newValue) { + void onUseSystemColorChange(bool newValue) { ref.read(settingsProvider).write(.themeDynamic, newValue); popBottomSheet(); } - onPrimaryColorChange(ImmichColorPreset colorPreset) { + void onPrimaryColorChange(ImmichColorPreset colorPreset) { ref.read(settingsProvider).write(.themePrimaryColor, colorPreset); //turn off system color setting @@ -40,7 +40,7 @@ class PrimaryColorSetting extends HookConsumerWidget { popBottomSheet(); } - buildPrimaryColorTile({ + Container buildPrimaryColorTile({ required Color topColor, required Color bottomColor, required double tileSize, @@ -85,7 +85,7 @@ class PrimaryColorSetting extends HookConsumerWidget { ); } - bottomSheetContent() { + Column bottomSheetContent() { return Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/mobile/lib/widgets/settings/settings_switch_list_tile.dart b/mobile/lib/widgets/settings/settings_switch_list_tile.dart index d8ed3ac017..4d358fa2b6 100644 --- a/mobile/lib/widgets/settings/settings_switch_list_tile.dart +++ b/mobile/lib/widgets/settings/settings_switch_list_tile.dart @@ -44,7 +44,7 @@ class SettingsSwitchListTile extends StatelessWidget { onChanged: onSwitchChanged, activeThumbColor: enabled ? context.primaryColor : context.themeData.disabledColor, dense: true, - secondary: icon != null ? Icon(icon!, color: valueNotifier.value ? context.primaryColor : null) : null, + secondary: icon != null ? Icon(icon, color: valueNotifier.value ? context.primaryColor : null) : null, title: Text( title, style: diff --git a/mobile/packages/ui/lib/src/components/password_input.dart b/mobile/packages/ui/lib/src/components/password_input.dart index e99e9730a8..d08b3de99d 100644 --- a/mobile/packages/ui/lib/src/components/password_input.dart +++ b/mobile/packages/ui/lib/src/components/password_input.dart @@ -51,7 +51,7 @@ class _ImmichPasswordInputState extends State { onPressed: _toggleVisibility, icon: Icon(_visible ? Icons.visibility_off_rounded : Icons.visibility_rounded), ), - autofillHints: [AutofillHints.password], + autofillHints: const [AutofillHints.password], ); } } diff --git a/mobile/test/domain/services/sync_stream_service_test.dart b/mobile/test/domain/services/sync_stream_service_test.dart index e033229408..ac81513d96 100644 --- a/mobile/test/domain/services/sync_stream_service_test.dart +++ b/mobile/test/domain/services/sync_stream_service_test.dart @@ -70,7 +70,7 @@ void main() { await db.close(); }); - successHandler(Invocation _) async => true; + Future successHandler(Invocation _) async => true; setUp(() async { mockSyncStreamRepo = MockSyncStreamRepository(); diff --git a/mobile/test/infrastructure/repositories/sync_api_repository_test.dart b/mobile/test/infrastructure/repositories/sync_api_repository_test.dart index d538b567bd..3a3e40cbae 100644 --- a/mobile/test/infrastructure/repositories/sync_api_repository_test.dart +++ b/mobile/test/infrastructure/repositories/sync_api_repository_test.dart @@ -37,7 +37,7 @@ void main() { late MockHttpClient mockHttpClient; late MockStreamedResponse mockStreamedResponse; late StreamController> responseStreamController; - late int testBatchSize = 3; + const int testBatchSize = 3; setUpAll(() async { final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); diff --git a/mobile/test/infrastructure/repository.mock.dart b/mobile/test/infrastructure/repository.mock.dart index 0688576682..355e128fc0 100644 --- a/mobile/test/infrastructure/repository.mock.dart +++ b/mobile/test/infrastructure/repository.mock.dart @@ -3,9 +3,9 @@ import 'package:immich_mobile/infrastructure/repositories/local_album.repository import 'package:immich_mobile/infrastructure/repositories/local_asset.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/log.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/partner.repository.dart'; -import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_album.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/storage.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/sync_api.repository.dart'; diff --git a/mobile/test/medium/repositories/local_asset_repository_test.dart b/mobile/test/medium/repositories/local_asset_repository_test.dart index bc74728346..d92b1c0184 100644 --- a/mobile/test/medium/repositories/local_asset_repository_test.dart +++ b/mobile/test/medium/repositories/local_asset_repository_test.dart @@ -456,7 +456,7 @@ void main() { test('does not update when longitude does not match', () async { final remoteAsset = await ctx.newRemoteAsset(ownerId: userId); - final cloudIdAsset = await ctx.newRemoteAssetCloudId(id: remoteAsset.id, longitude: .fromNullable((-74.006))); + final cloudIdAsset = await ctx.newRemoteAssetCloudId(id: remoteAsset.id, longitude: .fromNullable(-74.006)); final localAsset = await ctx.newLocalAsset( checksumOption: const Option.none(), iCloudId: cloudIdAsset.cloudId, diff --git a/mobile/test/medium/repositories/timeline_repository_test.dart b/mobile/test/medium/repositories/timeline_repository_test.dart index 94b3413c9b..d78d9b1ef7 100644 --- a/mobile/test/medium/repositories/timeline_repository_test.dart +++ b/mobile/test/medium/repositories/timeline_repository_test.dart @@ -27,7 +27,7 @@ void main() { // Regression check for #23273: a LEFT OUTER JOIN on checksum would fan out and create duplicates // happens when same photo exists in multiple albums on device final user = await ctx.newUser(); - final checksum = 'yolo'; + const checksum = 'yolo'; final album = await ctx.newRemoteAlbum(ownerId: user.id); final remoteAsset = await ctx.newRemoteAsset(ownerId: user.id, checksum: checksum); await ctx.newRemoteAlbumAsset(albumId: album.id, assetId: remoteAsset.id); diff --git a/mobile/test/modules/utils/async_mutex_test.dart b/mobile/test/modules/utils/async_mutex_test.dart index 08cafeb307..10fdcbad5e 100644 --- a/mobile/test/modules/utils/async_mutex_test.dart +++ b/mobile/test/modules/utils/async_mutex_test.dart @@ -6,8 +6,8 @@ import 'package:immich_mobile/utils/async_mutex.dart'; void main() { group('Test AsyncMutex grouped', () { test('test ordered execution', () async { - AsyncMutex lock = AsyncMutex(); - List events = []; + final AsyncMutex lock = AsyncMutex(); + final List events = []; expect(0, lock.enqueued); unawaited(lock.run(() => Future.delayed(const Duration(milliseconds: 10), () => events.add(1)))); expect(1, lock.enqueued); diff --git a/mobile/test/modules/utils/datetime_helpers_test.dart b/mobile/test/modules/utils/datetime_helpers_test.dart index dfe83b4925..ca196224a0 100644 --- a/mobile/test/modules/utils/datetime_helpers_test.dart +++ b/mobile/test/modules/utils/datetime_helpers_test.dart @@ -10,38 +10,38 @@ void main() { test('returns null for value below minimum allowed range', () { // _minMillisecondsSinceEpoch = -62135596800000 - final seconds = -62135596800000 ~/ 1000 - 1; // One second before min allowed + const seconds = -62135596800000 ~/ 1000 - 1; // One second before min allowed final result = tryFromSecondsSinceEpoch(seconds); expect(result, isNull); }); test('returns null for value above maximum allowed range', () { // _maxMillisecondsSinceEpoch = 8640000000000000 - final seconds = 8640000000000000 ~/ 1000 + 1; // One second after max allowed + const seconds = 8640000000000000 ~/ 1000 + 1; // One second after max allowed final result = tryFromSecondsSinceEpoch(seconds); expect(result, isNull); }); test('returns correct DateTime for minimum allowed value', () { - final seconds = -62135596800000 ~/ 1000; // Minimum allowed timestamp + const seconds = -62135596800000 ~/ 1000; // Minimum allowed timestamp final result = tryFromSecondsSinceEpoch(seconds); expect(result, DateTime.fromMillisecondsSinceEpoch(-62135596800000)); }); test('returns correct DateTime for maximum allowed value', () { - final seconds = 8640000000000000 ~/ 1000; // Maximum allowed timestamp + const seconds = 8640000000000000 ~/ 1000; // Maximum allowed timestamp final result = tryFromSecondsSinceEpoch(seconds); expect(result, DateTime.fromMillisecondsSinceEpoch(8640000000000000)); }); test('returns correct DateTime for negative timestamp', () { - final seconds = -1577836800; // Dec 31, 1919 (pre-epoch) + const seconds = -1577836800; // Dec 31, 1919 (pre-epoch) final result = tryFromSecondsSinceEpoch(seconds); expect(result, DateTime.fromMillisecondsSinceEpoch(-1577836800 * 1000)); }); test('returns correct DateTime for zero timestamp', () { - final seconds = 0; // Jan 1, 1970 (epoch) + const seconds = 0; // Jan 1, 1970 (epoch) final result = tryFromSecondsSinceEpoch(seconds); expect(result, DateTime.fromMillisecondsSinceEpoch(0)); }); diff --git a/mobile/test/modules/utils/debouncer_test.dart b/mobile/test/modules/utils/debouncer_test.dart index 7aa13842d6..036c538f03 100644 --- a/mobile/test/modules/utils/debouncer_test.dart +++ b/mobile/test/modules/utils/debouncer_test.dart @@ -11,7 +11,7 @@ class _Counter { void main() { test('Executes the method after the interval', () async { - var counter = _Counter(); + final counter = _Counter(); final debouncer = Debouncer(interval: const Duration(milliseconds: 300)); debouncer.run(() => counter.increment()); expect(counter.count, 0); @@ -20,17 +20,17 @@ void main() { }); test('Executes the method immediately if zero interval', () async { - var counter = _Counter(); - final debouncer = Debouncer(interval: const Duration(milliseconds: 0)); + final counter = _Counter(); + final debouncer = Debouncer(interval: Duration.zero); debouncer.run(() => counter.increment()); // Even though it is supposed to be executed immediately, it is added to the async queue and so // we need this delay to make sure the actual debounced method is called - await Future.delayed(const Duration(milliseconds: 0)); + await Future.delayed(Duration.zero); expect(counter.count, 1); }); test('Delayes method execution after all the calls are completed', () async { - var counter = _Counter(); + final counter = _Counter(); final debouncer = Debouncer(interval: const Duration(milliseconds: 100)); debouncer.run(() => counter.increment()); debouncer.run(() => counter.increment()); diff --git a/mobile/test/modules/utils/openapi_patching_test.dart b/mobile/test/modules/utils/openapi_patching_test.dart index 18ab07b3a9..15d42c34f2 100644 --- a/mobile/test/modules/utils/openapi_patching_test.dart +++ b/mobile/test/modules/utils/openapi_patching_test.dart @@ -1,8 +1,8 @@ import 'dart:convert'; import 'package:flutter_test/flutter_test.dart'; -import 'package:openapi/api.dart'; import 'package:immich_mobile/utils/openapi_patching.dart'; +import 'package:openapi/api.dart'; void main() { group('Test OpenApi Patching', () { @@ -26,7 +26,7 @@ void main() { }); test('addDefault', () { - dynamic value = jsonDecode(""" + final dynamic value = jsonDecode(""" { "download": { "archiveSize": 4294967296, @@ -47,7 +47,7 @@ void main() { }); test('addDefault with null', () { - dynamic value = jsonDecode(""" + final dynamic value = jsonDecode(""" { "download": { "archiveSize": 4294967296, diff --git a/mobile/test/services/auth.service_test.dart b/mobile/test/services/auth.service_test.dart index d71a52f2ae..b62ad3ad2c 100644 --- a/mobile/test/services/auth.service_test.dart +++ b/mobile/test/services/auth.service_test.dart @@ -103,7 +103,7 @@ void main() { }); test('Should return null if auto endpoint switching is disabled', () async { - when(() => authRepository.getEndpointSwitchingFeature()).thenReturn((false)); + when(() => authRepository.getEndpointSwitchingFeature()).thenReturn(false); final result = await sut.setOpenApiServiceEndpoint(); diff --git a/mobile/test/services/background_upload.service_test.dart b/mobile/test/services/background_upload.service_test.dart index 65f17501a0..aa46bd9de3 100644 --- a/mobile/test/services/background_upload.service_test.dart +++ b/mobile/test/services/background_upload.service_test.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'dart:io'; -import 'package:drift/drift.dart' hide isNull, isNotNull; +import 'package:drift/drift.dart' hide isNotNull, isNull; import 'package:drift/native.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; diff --git a/mobile/test/services/foreground_upload.service_test.dart b/mobile/test/services/foreground_upload.service_test.dart index 46e9a82141..d4344ed77e 100644 --- a/mobile/test/services/foreground_upload.service_test.dart +++ b/mobile/test/services/foreground_upload.service_test.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:drift/drift.dart' hide isNull, isNotNull; +import 'package:drift/drift.dart' hide isNotNull, isNull; import 'package:drift/native.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/mobile/test/unit/presentation/partner_page_test.dart b/mobile/test/unit/presentation/partner_page_test.dart index 162094c720..ee9c6a3575 100644 --- a/mobile/test/unit/presentation/partner_page_test.dart +++ b/mobile/test/unit/presentation/partner_page_test.dart @@ -17,7 +17,7 @@ void main() { group('PartnerSharedByList', () { testWidgets('shows the empty-state add button when there are no partners', (tester) async { - final action = const PartnerAddAction(); + const action = PartnerAddAction(); await tester.pumpTestWidget(context, const PartnerSharedByList(partners: [])); @@ -39,7 +39,7 @@ void main() { testWidgets('renders a remove action for each partner', (tester) async { final partner1 = PartnerFactory.create(inTimeline: true); final partner2 = PartnerFactory.create(); - final action = const PartnerRemoveAction(sharedWithId: '', partnerName: ''); + const action = PartnerRemoveAction(sharedWithId: '', partnerName: ''); await tester.pumpTestWidget(context, PartnerSharedByList(partners: [partner1, partner2])); expect(find.byIcon(action.icon), findsNWidgets(2)); }); diff --git a/mobile/test/unit/utils/editor_test.dart b/mobile/test/unit/utils/editor_test.dart index 82cf584f76..6f3f41f374 100644 --- a/mobile/test/unit/utils/editor_test.dart +++ b/mobile/test/unit/utils/editor_test.dart @@ -4,7 +4,7 @@ import 'package:immich_mobile/utils/editor.utils.dart'; import 'package:openapi/api.dart' show MirrorAxis, MirrorParameters, RotateParameters; List normalizedToEdits(NormalizedTransform transform) { - List edits = []; + final List edits = []; if (transform.mirrorHorizontal) { edits.add(MirrorEdit(MirrorParameters(axis: MirrorAxis.horizontal))); @@ -25,10 +25,10 @@ bool compareEditAffines(List editsA, List editsB) { final normA = buildAffineFromEdits(editsA); final normB = buildAffineFromEdits(editsB); - return ((normA.a - normB.a).abs() < 0.0001 && + return (normA.a - normB.a).abs() < 0.0001 && (normA.b - normB.b).abs() < 0.0001 && (normA.c - normB.c).abs() < 0.0001 && - (normA.d - normB.d).abs() < 0.0001); + (normA.d - normB.d).abs() < 0.0001; } void main() { diff --git a/mobile/test/utils_legacy/action_button_utils_test.dart b/mobile/test/utils_legacy/action_button_utils_test.dart index 0a6020762a..52d25c4c75 100644 --- a/mobile/test/utils_legacy/action_button_utils_test.dart +++ b/mobile/test/utils_legacy/action_button_utils_test.dart @@ -1074,7 +1074,7 @@ void main() { test('should build correct widget for each button type', () { for (final buttonType in ActionButtonType.values) { - var buttonContext = context; + final buttonContext = context; if (buttonType == ActionButtonType.removeFromAlbum) { final album = createRemoteAlbum(); From 9d03a92b10c0d46c08c1fd2f94c1176235ef65b8 Mon Sep 17 00:00:00 2001 From: Ben Beckford Date: Thu, 30 Jul 2026 02:08:24 -0700 Subject: [PATCH 14/69] fix: assetFileFilter path matching (#30394) --- packages/plugin-core/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugin-core/src/index.ts b/packages/plugin-core/src/index.ts index e3f180f98b..7b91ed7111 100644 --- a/packages/plugin-core/src/index.ts +++ b/packages/plugin-core/src/index.ts @@ -89,7 +89,8 @@ const methods = wrapper({ } }, - assetFileFilter: ({ data, config }) => matchValueResult(data.asset.originalFileName || '', config), + assetFileFilter: ({ data, config }) => + matchValueResult(config.usePath ? data.asset.originalPath : data.asset.originalFileName, config), assetLocationFilter: ({ config, data }) => { if ( From 7e70f90c15466cfd709ceed6442df18b03912716 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Thu, 30 Jul 2026 14:53:08 +0530 Subject: [PATCH 15/69] fix: apply disabled styling to UI buttons (#30322) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../ui/lib/src/components/column_button.dart | 17 +++-------------- .../ui/lib/src/components/icon_button.dart | 17 +++-------------- .../ui/lib/src/components/text_button.dart | 17 +++-------------- 3 files changed, 9 insertions(+), 42 deletions(-) diff --git a/mobile/packages/ui/lib/src/components/column_button.dart b/mobile/packages/ui/lib/src/components/column_button.dart index f990dbc065..03b6933389 100644 --- a/mobile/packages/ui/lib/src/components/column_button.dart +++ b/mobile/packages/ui/lib/src/components/column_button.dart @@ -43,21 +43,10 @@ class _ImmichColumnButtonState extends State { } } - Future? _onPressed() { - if (_isDisabled) { - return null; - } + VoidCallback? get _onPressed => _isDisabled ? null : () => _runAction(widget.onPressed); - return _runAction(widget.onPressed); - } - - Future? _onLongPress() { - if (_isDisabled || widget.onLongPress == null) { - return null; - } - - return _runAction(widget.onLongPress!); - } + VoidCallback? get _onLongPress => + _isDisabled || widget.onLongPress == null ? null : () => _runAction(widget.onLongPress!); @override Widget build(BuildContext context) { diff --git a/mobile/packages/ui/lib/src/components/icon_button.dart b/mobile/packages/ui/lib/src/components/icon_button.dart index 1c02f30ed3..c0e1bcc3fa 100644 --- a/mobile/packages/ui/lib/src/components/icon_button.dart +++ b/mobile/packages/ui/lib/src/components/icon_button.dart @@ -44,21 +44,10 @@ class _ImmichIconButtonState extends State { } } - Future? _onPressed() { - if (_isDisabled) { - return null; - } + VoidCallback? get _onPressed => _isDisabled ? null : () => _runAction(widget.onPressed); - return _runAction(widget.onPressed); - } - - Future? _onLongPress() { - if (_isDisabled || widget.onLongPress == null) { - return null; - } - - return _runAction(widget.onLongPress!); - } + VoidCallback? get _onLongPress => + _isDisabled || widget.onLongPress == null ? null : () => _runAction(widget.onLongPress!); @override Widget build(BuildContext context) { diff --git a/mobile/packages/ui/lib/src/components/text_button.dart b/mobile/packages/ui/lib/src/components/text_button.dart index bbcfe4a3a7..6cbc08473b 100644 --- a/mobile/packages/ui/lib/src/components/text_button.dart +++ b/mobile/packages/ui/lib/src/components/text_button.dart @@ -46,21 +46,10 @@ class _ImmichTextButtonState extends State { } } - Future? _onPressed() { - if (_isDisabled) { - return null; - } + VoidCallback? get _onPressed => _isDisabled ? null : () => _runAction(widget.onPressed); - return _runAction(widget.onPressed); - } - - Future? _onLongPress() { - if (_isDisabled || widget.onLongPress == null) { - return null; - } - - return _runAction(widget.onLongPress!); - } + VoidCallback? get _onLongPress => + _isDisabled || widget.onLongPress == null ? null : () => _runAction(widget.onLongPress!); @override Widget build(BuildContext context) { From 1f16fe16c2b0c4fea25de23b1a2dbe1b606f4551 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Thu, 30 Jul 2026 17:58:08 +0200 Subject: [PATCH 16/69] chore: enable merge queue batching (#30410) This waits for up to 2 min to group up to 3 PRs into the same draft. That should cut down on the amount of draft PRs that get created. The main downsides are the 2 minute wait when only queueing one PR, and less failure isolation: on an error, mergify has to do bisect runs to figure out which PR failed the batch, which takes more time than purely sequential operation. All of this can be tuned further of course. --- .mergify.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index 226e26c4c0..12f3ef6715 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,2 +1,7 @@ merge_queue: status_comments: outcomes + +queue_rules: + - name: default + batch_size: 3 + batch_max_wait_time: 2 min From a316ba35cafe0d22f9b414bb9ed4d64a79ba4b37 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Thu, 30 Jul 2026 21:12:25 +0200 Subject: [PATCH 17/69] fix: shared check for server setup availability (#30311) * fix: shared check for server setup availability * chore: add medium test * feat: require @Authenticated decorator everywhere * fix: lints --- docs/docs/install/environment-variables.md | 2 +- e2e/src/responses.ts | 3 - .../server/database-backups.e2e-spec.ts | 2 +- server/src/controllers/app.controller.ts | 3 + .../src/controllers/auth.controller.spec.ts | 13 +++ server/src/controllers/auth.controller.ts | 2 + .../database-backup.controller.spec.ts | 55 +++++++++++++ .../controllers/database-backup.controller.ts | 1 + server/src/controllers/index.spec.ts | 8 +- .../src/controllers/maintenance.controller.ts | 2 + server/src/controllers/oauth.controller.ts | 4 + server/src/controllers/server.controller.ts | 6 ++ server/src/middleware/auth.guard.spec.ts | 82 +++++++++++++++++++ server/src/middleware/auth.guard.ts | 27 ++++-- server/src/services/auth.service.spec.ts | 10 --- server/src/services/auth.service.ts | 10 --- server/src/services/base.service.ts | 11 +++ .../src/services/maintenance.service.spec.ts | 16 ++++ server/src/services/maintenance.service.ts | 7 +- server/src/services/server.service.spec.ts | 16 +++- server/src/services/server.service.ts | 3 +- server/test/medium/responses.ts | 3 - .../specs/services/auth.service.spec.ts | 10 --- server/test/utils.ts | 19 +++-- 24 files changed, 249 insertions(+), 66 deletions(-) create mode 100644 server/src/controllers/database-backup.controller.spec.ts create mode 100644 server/src/middleware/auth.guard.spec.ts diff --git a/docs/docs/install/environment-variables.md b/docs/docs/install/environment-variables.md index dbfd2fb112..c10a858ed9 100644 --- a/docs/docs/install/environment-variables.md +++ b/docs/docs/install/environment-variables.md @@ -45,7 +45,7 @@ These environment variables are used by the `docker-compose.yml` file and do **N | `IMMICH_PROCESS_INVALID_IMAGES` | When `true`, generate thumbnails for invalid images | | server | microservices | | `IMMICH_TRUSTED_PROXIES` | List of comma-separated IPs set as trusted proxies | | server | api | | `IMMICH_IGNORE_MOUNT_CHECK_ERRORS` | See [System Integrity](/administration/system-integrity) | | server | api, microservices | -| `IMMICH_ALLOW_SETUP` | When `false` disables the `/auth/admin-sign-up` endpoint | `true` | server | api | +| `IMMICH_ALLOW_SETUP` | When `false` disables the `/auth/admin-sign-up` and `/admin/database-backups/start-restore` endpoints | `true` | server | api | \*1: `TZ` should be set to a `TZ identifier` from [this list][tz-list]. For example, `TZ="Etc/UTC"`. `TZ` is used by `exiftool` as a fallback in case the timezone cannot be determined from the image metadata. It is also used for logfile timestamps and cron job execution. diff --git a/e2e/src/responses.ts b/e2e/src/responses.ts index 5fd887c44b..1b3447767e 100644 --- a/e2e/src/responses.ts +++ b/e2e/src/responses.ts @@ -38,9 +38,6 @@ export const errorDto = { incorrectLogin: { message: 'Incorrect email or password', }, - alreadyHasAdmin: { - message: 'The server already has an admin', - }, }; export const signupResponseDto = { diff --git a/e2e/src/specs/maintenance/server/database-backups.e2e-spec.ts b/e2e/src/specs/maintenance/server/database-backups.e2e-spec.ts index cf6d752561..e757c721d6 100644 --- a/e2e/src/specs/maintenance/server/database-backups.e2e-spec.ts +++ b/e2e/src/specs/maintenance/server/database-backups.e2e-spec.ts @@ -108,7 +108,7 @@ describe('/admin/database-backups', () => { const { status, body } = await request(app).post('/admin/database-backups/start-restore').send(); expect(status).toBe(400); - expect(body).toEqual(errorDto.badRequest('The server already has an admin')); + expect(body).toEqual(errorDto.badRequest('Admin setup is not available')); }); it.sequential('should enter maintenance mode in "database restore mode"', async () => { diff --git a/server/src/controllers/app.controller.ts b/server/src/controllers/app.controller.ts index 3fe9b49368..eca7e5bcb5 100644 --- a/server/src/controllers/app.controller.ts +++ b/server/src/controllers/app.controller.ts @@ -1,5 +1,6 @@ import { Controller, Get, Header } from '@nestjs/common'; import { ApiExcludeEndpoint } from '@nestjs/swagger'; +import { Authenticated } from 'src/middleware/auth.guard'; import { SystemConfigService } from 'src/services/system-config.service'; @Controller() @@ -8,6 +9,7 @@ export class AppController { @ApiExcludeEndpoint() @Get('.well-known/immich') + @Authenticated({ public: true }) getImmichWellKnown() { return { api: { @@ -18,6 +20,7 @@ export class AppController { @ApiExcludeEndpoint() @Get('custom.css') + @Authenticated({ public: true }) @Header('Content-Type', 'text/css') getCustomCss() { return this.service.getCustomCss(); diff --git a/server/src/controllers/auth.controller.spec.ts b/server/src/controllers/auth.controller.spec.ts index d105dd90b9..3bf1d59f8b 100644 --- a/server/src/controllers/auth.controller.spec.ts +++ b/server/src/controllers/auth.controller.spec.ts @@ -1,3 +1,4 @@ +import { BadRequestException } from '@nestjs/common'; import { AuthController } from 'src/controllers/auth.controller'; import { LoginResponseDto } from 'src/dtos/auth.dto'; import { AuthService } from 'src/services/auth.service'; @@ -76,6 +77,18 @@ describe(AuthController.name, () => { .send({ name: 'admin', password: 'password', email: 'admin@local' }); expect(status).toEqual(201); }); + + it('should not sign up an admin when setup is unavailable', async () => { + ctx.requireSetupAvailable.mockRejectedValue(new BadRequestException('Admin setup is not available')); + + const { status, body } = await request(ctx.getHttpServer()) + .post('/auth/admin-sign-up') + .send({ name, email, password }); + + expect(status).toEqual(400); + expect(body).toEqual(errorDto.badRequest('Admin setup is not available')); + expect(service.adminSignUp).not.toHaveBeenCalled(); + }); }); describe('POST /auth/login', () => { diff --git a/server/src/controllers/auth.controller.ts b/server/src/controllers/auth.controller.ts index 63cdce4f32..b96ba4dee3 100644 --- a/server/src/controllers/auth.controller.ts +++ b/server/src/controllers/auth.controller.ts @@ -33,6 +33,7 @@ export class AuthController { description: 'Login with username and password and receive a session token.', history: new HistoryBuilder().added('v1').beta('v1').stable('v2'), }) + @Authenticated({ public: true }) async login( @Res({ passthrough: true }) res: Response, @Body() loginCredential: LoginCredentialDto, @@ -55,6 +56,7 @@ export class AuthController { description: 'Create the first admin user in the system.', history: new HistoryBuilder().added('v1').beta('v1').stable('v2'), }) + @Authenticated({ public: true, setup: true }) signUpAdmin(@Body() dto: SignUpDto): Promise { return this.service.adminSignUp(dto); } diff --git a/server/src/controllers/database-backup.controller.spec.ts b/server/src/controllers/database-backup.controller.spec.ts new file mode 100644 index 0000000000..43fa779e8d --- /dev/null +++ b/server/src/controllers/database-backup.controller.spec.ts @@ -0,0 +1,55 @@ +import { BadRequestException } from '@nestjs/common'; +import { DatabaseBackupController } from 'src/controllers/database-backup.controller'; +import { DatabaseBackupService } from 'src/services/database-backup.service'; +import { MaintenanceService } from 'src/services/maintenance.service'; +import request from 'supertest'; +import { errorDto } from 'test/medium/responses'; +import { automock, ControllerContext, controllerSetup, mockBaseService } from 'test/utils'; + +describe(DatabaseBackupController.name, () => { + let ctx: ControllerContext; + const service = automock(DatabaseBackupService, { args: [{ setContext: () => {} }], strict: false }); + const maintenanceService = mockBaseService(MaintenanceService); + + beforeAll(async () => { + ctx = await controllerSetup(DatabaseBackupController, [ + { provide: DatabaseBackupService, useValue: service }, + { provide: MaintenanceService, useValue: maintenanceService }, + ]); + return () => ctx.close(); + }); + + beforeEach(() => { + service.resetAllMocks(); + maintenanceService.resetAllMocks(); + ctx.reset(); + }); + + describe('GET /admin/database-backups', () => { + it('should be an authenticated route', async () => { + await request(ctx.getHttpServer()).get('/admin/database-backups').send(); + expect(ctx.authenticate).toHaveBeenCalled(); + }); + }); + + describe('POST /admin/database-backups/start-restore', () => { + it('should not be an authenticated route', async () => { + maintenanceService.startRestoreFlow.mockResolvedValue({ jwt: 'jwt' }); + + await request(ctx.getHttpServer()).post('/admin/database-backups/start-restore').send(); + + expect(ctx.authenticate).not.toHaveBeenCalled(); + expect(ctx.requireSetupAvailable).toHaveBeenCalled(); + }); + + it('should not start a restore when setup is unavailable', async () => { + ctx.requireSetupAvailable.mockRejectedValue(new BadRequestException('Admin setup is not available')); + + const { status, body } = await request(ctx.getHttpServer()).post('/admin/database-backups/start-restore').send(); + + expect(status).toEqual(400); + expect(body).toEqual(errorDto.badRequest('Admin setup is not available')); + expect(maintenanceService.startRestoreFlow).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/server/src/controllers/database-backup.controller.ts b/server/src/controllers/database-backup.controller.ts index 737c8f3958..4cb2092d1b 100644 --- a/server/src/controllers/database-backup.controller.ts +++ b/server/src/controllers/database-backup.controller.ts @@ -71,6 +71,7 @@ export class DatabaseBackupController { description: 'Put Immich into maintenance mode to restore a backup (Immich must not be configured)', history: new HistoryBuilder().added('v2.5.0').alpha('v2.5.0'), }) + @Authenticated({ public: true, setup: true }) async startDatabaseRestoreFlow( @GetLoginDetails() loginDetails: LoginDetails, @Res({ passthrough: true }) res: Response, diff --git a/server/src/controllers/index.spec.ts b/server/src/controllers/index.spec.ts index 67962e8b3c..3d39a4dd3d 100644 --- a/server/src/controllers/index.spec.ts +++ b/server/src/controllers/index.spec.ts @@ -53,12 +53,10 @@ describe('controllers', () => { expect(new Set(reachableByNonAdmins)).toEqual(UNAUTHENTICATED_ADMIN_ROUTES); }); - it('should not authenticate the bootstrap routes under admin/', () => { - const authenticated = routes - .filter((route) => UNAUTHENTICATED_ADMIN_ROUTES.has(route.id) && route.auth !== undefined) - .map((route) => route.label); + it('should declare authentication on every route', () => { + const undeclared = routes.filter((route) => route.auth === undefined).map((route) => route.label); - expect(authenticated).toEqual([]); + expect(undeclared).toEqual([]); }); it('should require admin access for routes with an admin permission', () => { diff --git a/server/src/controllers/maintenance.controller.ts b/server/src/controllers/maintenance.controller.ts index d5f13e341c..3d8c6c1194 100644 --- a/server/src/controllers/maintenance.controller.ts +++ b/server/src/controllers/maintenance.controller.ts @@ -27,6 +27,7 @@ export class MaintenanceController { description: 'Fetch information about the currently running maintenance action.', history: new HistoryBuilder().added('v2.5.0').alpha('v2.5.0'), }) + @Authenticated({ public: true }) getMaintenanceStatus(): MaintenanceStatusResponseDto { return this.service.getMaintenanceStatus(); } @@ -48,6 +49,7 @@ export class MaintenanceController { description: 'Login with maintenance token or cookie to receive current information and perform further actions.', history: new HistoryBuilder().added('v2.3.0').alpha('v2.3.0'), }) + @Authenticated({ public: true }) maintenanceLogin(@Body() _dto: MaintenanceLoginDto): MaintenanceAuthDto { throw new BadRequestException('Not in maintenance mode'); } diff --git a/server/src/controllers/oauth.controller.ts b/server/src/controllers/oauth.controller.ts index 7f2313a058..54f5c1f10b 100644 --- a/server/src/controllers/oauth.controller.ts +++ b/server/src/controllers/oauth.controller.ts @@ -22,6 +22,7 @@ export class OAuthController { constructor(private service: AuthService) {} @Get('mobile-redirect') + @Authenticated({ public: true }) @Redirect() @Endpoint({ summary: 'Redirect OAuth to mobile', @@ -37,6 +38,7 @@ export class OAuthController { } @Post('authorize') + @Authenticated({ public: true }) @Endpoint({ summary: 'Start OAuth', description: 'Initiate the OAuth authorization process.', @@ -62,6 +64,7 @@ export class OAuthController { } @Post('callback') + @Authenticated({ public: true }) @Endpoint({ summary: 'Finish OAuth', description: 'Complete the OAuth authorization process by exchanging the authorization code for a session token.', @@ -115,6 +118,7 @@ export class OAuthController { } @Post('backchannel-logout') + @Authenticated({ public: true }) @HttpCode(HttpStatus.OK) @ApiConsumes('application/x-www-form-urlencoded') @Endpoint({ diff --git a/server/src/controllers/server.controller.ts b/server/src/controllers/server.controller.ts index f5ce4b851c..6407155492 100644 --- a/server/src/controllers/server.controller.ts +++ b/server/src/controllers/server.controller.ts @@ -64,6 +64,7 @@ export class ServerController { } @Get('ping') + @Authenticated({ public: true }) @Endpoint({ summary: 'Ping', description: 'Pong', @@ -74,6 +75,7 @@ export class ServerController { } @Get('version') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get server version', description: 'Retrieve the current server version in semantic versioning (semver) format.', @@ -84,6 +86,7 @@ export class ServerController { } @Get('version-history') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get version history', description: 'Retrieve a list of past versions the server has been on.', @@ -94,6 +97,7 @@ export class ServerController { } @Get('features') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get features', description: 'Retrieve available features supported by this server.', @@ -104,6 +108,7 @@ export class ServerController { } @Get('config') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get config', description: 'Retrieve the current server configuration.', @@ -125,6 +130,7 @@ export class ServerController { } @Get('media-types') + @Authenticated({ public: true }) @Endpoint({ summary: 'Get supported media types', description: 'Retrieve all media types supported by the server.', diff --git a/server/src/middleware/auth.guard.spec.ts b/server/src/middleware/auth.guard.spec.ts new file mode 100644 index 0000000000..5b094c03c1 --- /dev/null +++ b/server/src/middleware/auth.guard.spec.ts @@ -0,0 +1,82 @@ +import { ExecutionContext } from '@nestjs/common'; +import { Reflector } from '@nestjs/core'; +import { Authenticated, AuthGuard } from 'src/middleware/auth.guard'; +import { LoggingRepository } from 'src/repositories/logging.repository'; +import { AuthService } from 'src/services/auth.service'; +import { mockEnvData } from 'test/repositories/config.repository.mock'; +import { newTestService, ServiceMocks } from 'test/utils'; + +class TestController { + @Authenticated({ public: true, setup: true }) + setupRoute() {} + + @Authenticated({ public: true }) + publicRoute() {} + + undecoratedRoute() {} +} + +const contextFor = (handler: () => void) => + ({ + getHandler: () => handler, + switchToHttp: () => ({ getRequest: () => ({ headers: {}, query: {}, path: '/' }) }), + }) as unknown as ExecutionContext; + +describe(AuthGuard.name, () => { + let sut: AuthGuard; + let authService: AuthService; + let mocks: ServiceMocks; + + beforeEach(() => { + ({ sut: authService, mocks } = newTestService(AuthService)); + sut = new AuthGuard(mocks.logger as unknown as LoggingRepository, new Reflector(), authService); + }); + + describe('setup routes', () => { + it('should allow access while the server is awaiting its first admin', async () => { + mocks.user.hasAdmin.mockResolvedValue(false); + const authenticate = vitest.spyOn(authService, 'authenticate'); + + await expect(sut.canActivate(contextFor(TestController.prototype.setupRoute))).resolves.toBe(true); + + expect(authenticate).not.toHaveBeenCalled(); + }); + + it('should reject when setup is disabled', async () => { + mocks.config.getEnv.mockReturnValue(mockEnvData({ setup: { allow: false } })); + mocks.user.hasAdmin.mockResolvedValue(false); + + await expect(sut.canActivate(contextFor(TestController.prototype.setupRoute))).rejects.toThrowError( + 'Admin setup is not available', + ); + }); + + it('should reject when the server already has an admin', async () => { + mocks.user.hasAdmin.mockResolvedValue(true); + + await expect(sut.canActivate(contextFor(TestController.prototype.setupRoute))).rejects.toThrowError( + 'Admin setup is not available', + ); + }); + }); + + describe('public routes', () => { + it('should not require setup availability', async () => { + mocks.user.hasAdmin.mockResolvedValue(true); + + await expect(sut.canActivate(contextFor(TestController.prototype.publicRoute))).resolves.toBe(true); + }); + }); + + describe('undecorated routes', () => { + it('should be rejected', async () => { + const authenticate = vitest.spyOn(authService, 'authenticate'); + + await expect(sut.canActivate(contextFor(TestController.prototype.undecoratedRoute))).rejects.toThrowError( + 'does not declare @Authenticated()', + ); + + expect(authenticate).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/server/src/middleware/auth.guard.ts b/server/src/middleware/auth.guard.ts index d9870ec7b9..93bcfe26e7 100644 --- a/server/src/middleware/auth.guard.ts +++ b/server/src/middleware/auth.guard.ts @@ -17,23 +17,26 @@ import { getUserAgentDetails } from 'src/utils/request'; type AdminRoute = { admin?: true }; type SharedLinkRoute = { sharedLink?: true }; -export type AuthenticatedOptions = { permission?: Permission | false } & (AdminRoute | SharedLinkRoute); +type AuthorizedRoute = { permission?: Permission | false; public?: never; setup?: never } & ( + AdminRoute | SharedLinkRoute +); +type PublicRoute = { public: true; setup?: true; permission?: never; admin?: never; sharedLink?: never }; +export type AuthenticatedOptions = AuthorizedRoute | PublicRoute; type ReflectorTarget = Parameters[1]; /** Resolves the `@Authenticated()` options of a route handler, with the defaults applied. */ export const getAuthenticatedOptions = (reflector: Reflector, target: ReflectorTarget) => { const options = reflector.getAllAndOverride(MetadataKey.AuthRoute, [target]); - return options && { sharedLink: false, admin: false, ...options }; + return options && { sharedLink: false, admin: false, public: false, setup: false, ...options }; }; export const Authenticated = (options: AuthenticatedOptions = {}): MethodDecorator => { - const decorators: MethodDecorator[] = [ - ApiBearerAuth(), - ApiCookieAuth(), - ApiSecurity(MetadataKey.ApiKeySecurity), - SetMetadata(MetadataKey.AuthRoute, options), - ]; + const decorators: MethodDecorator[] = [SetMetadata(MetadataKey.AuthRoute, options)]; + + if (!options.public) { + decorators.push(ApiBearerAuth(), ApiCookieAuth(), ApiSecurity(MetadataKey.ApiKeySecurity)); + } if ((options as AdminRoute).admin) { decorators.push(ApiExtension(ApiCustomExtension.AdminOnly, true)); @@ -96,6 +99,14 @@ export class AuthGuard implements CanActivate { async canActivate(context: ExecutionContext): Promise { const options = getAuthenticatedOptions(this.reflector, context.getHandler()); if (!options) { + throw new Error(`Route ${context.getHandler().name} does not declare @Authenticated()`); + } + + if (options.setup) { + await this.authService.requireSetupAvailable(); + } + + if (options.public) { return true; } diff --git a/server/src/services/auth.service.spec.ts b/server/src/services/auth.service.spec.ts index dad13ef5f5..48dcf5a509 100644 --- a/server/src/services/auth.service.spec.ts +++ b/server/src/services/auth.service.spec.ts @@ -307,16 +307,7 @@ describe(AuthService.name, () => { describe('adminSignUp', () => { const dto: SignUpDto = { email: 'test@immich.com', password: 'password', name: 'immich admin' }; - it('should only allow one admin', async () => { - mocks.user.getAdmin.mockResolvedValue({} as UserAdmin); - - await expect(sut.adminSignUp(dto)).rejects.toBeInstanceOf(BadRequestException); - - expect(mocks.user.getAdmin).toHaveBeenCalled(); - }); - it('should sign up the admin', async () => { - mocks.user.getAdmin.mockResolvedValue(void 0); mocks.user.create.mockResolvedValue({ ...userStub.admin, ...dto, @@ -334,7 +325,6 @@ describe(AuthService.name, () => { name: 'immich admin', }); - expect(mocks.user.getAdmin).toHaveBeenCalled(); expect(mocks.user.create).toHaveBeenCalled(); }); }); diff --git a/server/src/services/auth.service.ts b/server/src/services/auth.service.ts index f3be40f7dd..59e20276af 100644 --- a/server/src/services/auth.service.ts +++ b/server/src/services/auth.service.ts @@ -197,16 +197,6 @@ export class AuthService extends BaseService { } async adminSignUp(dto: SignUpDto): Promise { - const { setup } = this.configRepository.getEnv(); - if (!setup.allow) { - throw new BadRequestException('Admin setup is disabled'); - } - - const adminUser = await this.userRepository.getAdmin(); - if (adminUser) { - throw new BadRequestException('The server already has an admin'); - } - const admin = await this.createUser({ isAdmin: true, email: dto.email, diff --git a/server/src/services/base.service.ts b/server/src/services/base.service.ts index 6d17410441..2195c66a22 100644 --- a/server/src/services/base.service.ts +++ b/server/src/services/base.service.ts @@ -280,6 +280,17 @@ export class BaseService { return checkAccess(this.accessRepository, request); } + async isSetupAvailable(): Promise { + const { setup } = this.configRepository.getEnv(); + return setup.allow && !(await this.userRepository.hasAdmin()); + } + + async requireSetupAvailable(): Promise { + if (!(await this.isSetupAvailable())) { + throw new BadRequestException('Admin setup is not available'); + } + } + async createUser(dto: Insertable & { email: string }): Promise { const exists = await this.userRepository.getByEmail(dto.email); if (exists) { diff --git a/server/src/services/maintenance.service.spec.ts b/server/src/services/maintenance.service.spec.ts index e598f1c71d..1eaefb689d 100644 --- a/server/src/services/maintenance.service.spec.ts +++ b/server/src/services/maintenance.service.spec.ts @@ -134,6 +134,22 @@ describe(MaintenanceService.name, () => { }); }); + describe('startRestoreFlow', () => { + it('should start maintenance mode and return a jwt', async () => { + mocks.systemMetadata.get.mockResolvedValue({ isMaintenanceMode: false }); + + await expect(sut.startRestoreFlow()).resolves.toMatchObject({ jwt: expect.any(String) }); + + expect(mocks.systemMetadata.set).toHaveBeenCalledWith(SystemMetadataKey.MaintenanceMode, { + isMaintenanceMode: true, + secret: expect.stringMatching(/^\w{128}$/), + action: { + action: MaintenanceAction.SelectDatabaseRestore, + }, + }); + }); + }); + describe('createLoginUrl', () => { it('should fail outside of maintenance mode without secret', async () => { mocks.systemMetadata.get.mockResolvedValue({ isMaintenanceMode: false }); diff --git a/server/src/services/maintenance.service.ts b/server/src/services/maintenance.service.ts index ca1e05d93f..bcd6f2e834 100644 --- a/server/src/services/maintenance.service.ts +++ b/server/src/services/maintenance.service.ts @@ -1,4 +1,4 @@ -import { BadRequestException, Injectable } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { OnEvent } from 'src/decorators'; import { MaintenanceAuthDto, @@ -59,11 +59,6 @@ export class MaintenanceService extends BaseService { } async startRestoreFlow(): Promise<{ jwt: string }> { - const adminUser = await this.userRepository.getAdmin(); - if (adminUser) { - throw new BadRequestException('The server already has an admin'); - } - return this.startMaintenance( { action: MaintenanceAction.SelectDatabaseRestore, diff --git a/server/src/services/server.service.spec.ts b/server/src/services/server.service.spec.ts index e1575a496a..b4b1af35d6 100644 --- a/server/src/services/server.service.spec.ts +++ b/server/src/services/server.service.spec.ts @@ -1,5 +1,6 @@ import { SystemMetadataKey } from 'src/enum'; import { ServerService } from 'src/services/server.service'; +import { mockEnvData } from 'test/repositories/config.repository.mock'; import { newTestService, ServiceMocks } from 'test/utils'; describe(ServerService.name, () => { @@ -161,7 +162,7 @@ describe(ServerService.name, () => { oauthButtonText: 'Login with OAuth', trashDays: 30, userDeleteDelay: 7, - isInitialized: undefined, + isInitialized: false, isOnboarded: false, externalDomain: '', publicUsers: true, @@ -172,6 +173,19 @@ describe(ServerService.name, () => { }); expect(mocks.systemMetadata.get).toHaveBeenCalled(); }); + + it('should be initialized once an admin exists', async () => { + mocks.user.hasAdmin.mockResolvedValue(true); + + await expect(sut.getSystemConfig()).resolves.toMatchObject({ isInitialized: true }); + }); + + it('should be initialized when setup is disabled', async () => { + mocks.config.getEnv.mockReturnValue(mockEnvData({ setup: { allow: false } })); + mocks.user.hasAdmin.mockResolvedValue(false); + + await expect(sut.getSystemConfig()).resolves.toMatchObject({ isInitialized: true }); + }); }); describe('getStats', () => { diff --git a/server/src/services/server.service.ts b/server/src/services/server.service.ts index ad212292ba..57342f9509 100644 --- a/server/src/services/server.service.ts +++ b/server/src/services/server.service.ts @@ -111,9 +111,8 @@ export class ServerService extends BaseService { } async getSystemConfig(): Promise { - const { setup } = this.configRepository.getEnv(); const config = await this.getConfig({ withCache: false }); - const isInitialized = !setup.allow || (await this.userRepository.hasAdmin()); + const isInitialized = !(await this.isSetupAvailable()); const onboarding = await this.systemMetadataRepository.get(SystemMetadataKey.AdminOnboarding); return { diff --git a/server/test/medium/responses.ts b/server/test/medium/responses.ts index b416b3b904..9b75bc85ec 100644 --- a/server/test/medium/responses.ts +++ b/server/test/medium/responses.ts @@ -35,7 +35,4 @@ export const errorDto = { incorrectLogin: { message: 'Incorrect email or password', }, - alreadyHasAdmin: { - message: 'The server already has an admin', - }, }; diff --git a/server/test/medium/specs/services/auth.service.spec.ts b/server/test/medium/specs/services/auth.service.spec.ts index 1fc306f790..5e5c880955 100644 --- a/server/test/medium/specs/services/auth.service.spec.ts +++ b/server/test/medium/specs/services/auth.service.spec.ts @@ -57,16 +57,6 @@ describe(AuthService.name, () => { }), ); }); - - it('should not allow a second admin to sign up', async () => { - const { sut, ctx } = setup(); - await ctx.newUser({ isAdmin: true }); - const dto = { name: 'Admin', email: 'admin@immich.cloud', password: 'password' }; - - const response = sut.adminSignUp(dto); - await expect(response).rejects.toThrow(BadRequestException); - await expect(response).rejects.toThrow('The server already has an admin'); - }); }); describe('login', () => { diff --git a/server/test/utils.ts b/server/test/utils.ts index b633cbc4de..2f32f3b412 100644 --- a/server/test/utils.ts +++ b/server/test/utils.ts @@ -89,6 +89,7 @@ import { assert, Mock, Mocked, vitest } from 'vitest'; export type ControllerContext = { authenticate: Mock; + requireSetupAvailable: Mock; getHttpServer: () => any; reset: () => void; close: () => Promise; @@ -124,7 +125,7 @@ export const controllerSetup = async (controller: new (...args: any[]) => unknow { provide: APP_GUARD, useClass: AuthGuard }, { provide: LoggingRepository, useValue: LoggingRepository.create() }, { provide: ClsService, useValue: { getId: vi.fn() } }, - { provide: AuthService, useValue: { authenticate: vi.fn() } }, + { provide: AuthService, useValue: { authenticate: vi.fn(), requireSetupAvailable: vi.fn() } }, ...providers, ], }) @@ -137,13 +138,17 @@ export const controllerSetup = async (controller: new (...args: any[]) => unknow await app.init(); // allow the AuthController to override the AuthService itself - const authenticate = app.get>(AuthService).authenticate as Mock; + const resolvedAuthService = app.get>(AuthService); + const authenticate = resolvedAuthService.authenticate as Mock; + const requireSetupAvailable = resolvedAuthService.requireSetupAvailable as Mock; return { authenticate, + requireSetupAvailable, getHttpServer: () => app.getHttpServer(), reset: () => { authenticate.mockReset(); + requireSetupAvailable.mockReset(); }, close: async () => { await app.close(); @@ -184,10 +189,12 @@ export const automock = ( const mocks: Mock[] = []; const instance = new Dependency(...args); - const propertyNames = new Set([ - ...Object.getOwnPropertyNames(Dependency.prototype), - ...Object.getOwnPropertyNames(instance), - ]); + const propertyNames = new Set(Object.getOwnPropertyNames(instance)); + for (let proto = Dependency.prototype; proto && proto !== Object.prototype; proto = Object.getPrototypeOf(proto)) { + for (const property of Object.getOwnPropertyNames(proto)) { + propertyNames.add(property); + } + } for (const property of propertyNames) { if (property === 'constructor') { continue; From 6afcc39fb240be0596edf6a6f99826253132a018 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Thu, 30 Jul 2026 21:12:42 +0200 Subject: [PATCH 18/69] chore: sequence pnpm installs in mise tasks (#30412) --- e2e/mise.toml | 17 +++++++++-------- packages/cli/mise.toml | 6 ++++-- web/mise.toml | 11 ++++++++--- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/e2e/mise.toml b/e2e/mise.toml index b149922564..487f4ebf46 100644 --- a/e2e/mise.toml +++ b/e2e/mise.toml @@ -1,5 +1,5 @@ [tasks.install] -run = "pnpm install --filter immich-e2e --frozen-lockfile" +run = "pnpm install --filter immich-e2e... --frozen-lockfile" [tasks.build] dir = "{{ config_root }}" @@ -40,18 +40,19 @@ run = "tsc --noEmit" [tasks.ci-setup] -depends = [ - "//:sdk:install", - "//:sdk:build", - "//packages/cli:install", - "//packages/cli:build", +run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, + { task = "//packages/cli:install" }, + { task = "//packages/cli:build" }, + { task = ":install" }, ] -run = { task = ":install" } [tasks.ci-unit] -depends = ["//:sdk:install", "//:sdk:build"] run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, { task = ":install" }, { task = ":format" }, { task = ":lint" }, diff --git a/packages/cli/mise.toml b/packages/cli/mise.toml index 28d5e1858f..320ce001d8 100644 --- a/packages/cli/mise.toml +++ b/packages/cli/mise.toml @@ -29,16 +29,18 @@ env._.path = "./node_modules/.bin" run = "tsc --noEmit" [tasks.ci-publish] -depends = ["//:sdk:install", "//:sdk:build"] run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, { task = ":install" }, { task = ":build" }, "pnpm publish --provenance --no-git-checks", ] [tasks.ci-unit] -depends = ["//:sdk:install", "//:sdk:build"] run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, { task = ":install" }, { task = ":format" }, { task = ":lint" }, diff --git a/web/mise.toml b/web/mise.toml index b0d41317cb..7b9e3c2f3b 100644 --- a/web/mise.toml +++ b/web/mise.toml @@ -11,8 +11,12 @@ run = "pnpm run build:stats" run = "pnpm run preview" [tasks.start] -depends = [":install", "//:sdk:install", "//:sdk:build"] -run = "pnpm run dev" +run = [ + { task = ":install" }, + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, + "pnpm run dev", +] [tasks."start-demo"] env.IMMICH_SERVER_URL = "https://demo.immich.app" @@ -43,8 +47,9 @@ run = "pnpm run check:svelte" run = { tasks = [":check-typescript", ":check-svelte"] } [tasks.ci-unit] -depends = ["//:sdk:install", "//:sdk:build"] run = [ + { task = "//:sdk:install" }, + { task = "//:sdk:build" }, { task = ":install" }, { task = ":format" }, { task = ":check" }, From 6e1e79585ecd17d3ae29693629998bce093be28d Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Thu, 30 Jul 2026 21:13:12 +0200 Subject: [PATCH 19/69] chore: install mise tools from the lockfile in the server image (#30416) --- server/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index b7a4e105a3..df9d8ad7ba 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -60,12 +60,13 @@ COPY --from=ghcr.io/jdx/mise:2026.7.15@sha256:e62097049bfc980de5d9a25fbe16431e24 WORKDIR /app COPY ./mise.toml ./mise.toml +COPY ./mise.lock ./mise.lock COPY ./packages/plugin-core/mise.toml ./packages/plugin-core/ ENV MISE_TRUSTED_CONFIG_PATHS=/app/mise.toml ENV MISE_DATA_DIR=/buildcache/mise ENV MISE_DISABLE_TOOLS=flutter RUN --mount=type=cache,id=mise-tools-${TARGETPLATFORM},target=/buildcache/mise \ - mise install + mise install --locked COPY ./packages/sdk ./packages/sdk/ COPY ./packages/plugin-core ./packages/plugin-core/ From 7c44c29a8f52b9a42981579fad6e06b31f044fa2 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Thu, 30 Jul 2026 21:13:44 +0200 Subject: [PATCH 20/69] chore: deflake album to asset backfill sync test (#30417) --- server/test/medium/specs/sync/sync-album-to-asset.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/test/medium/specs/sync/sync-album-to-asset.spec.ts b/server/test/medium/specs/sync/sync-album-to-asset.spec.ts index a0802abe73..0fd58c527c 100644 --- a/server/test/medium/specs/sync/sync-album-to-asset.spec.ts +++ b/server/test/medium/specs/sync/sync-album-to-asset.spec.ts @@ -161,12 +161,14 @@ describe(SyncRequestType.AlbumToAssetsV1, () => { // backfill needs assets with an older updateId const { asset: sharedAsset1 } = await ctx.newAsset({ ownerId: user2.id }); + await wait(2); const { asset: sharedAsset2 } = await ctx.newAsset({ ownerId: user2.id }); await wait(2); const { album: sharedAlbum } = await ctx.newAlbum({ ownerId: user2.id }); await ctx.newAlbumAsset({ albumId: sharedAlbum.id, assetId: sharedAsset1.id }); + await wait(2); await ctx.newAlbumAsset({ albumId: sharedAlbum.id, assetId: sharedAsset2.id }); await wait(2); From 4a68a87531d62a3ac48631d48ee158e8d1eed080 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Thu, 30 Jul 2026 21:14:18 +0200 Subject: [PATCH 21/69] fix: use trixie-slim base image for cli and e2e-auth-server (#30411) The alpine suffix part wasn't getting updated by renovate, and the 3.20 chain stopped getting node updates too. This also just aligns the base image distro with what we use elsewere. --- packages/cli/Dockerfile | 2 +- packages/e2e-auth-server/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/Dockerfile b/packages/cli/Dockerfile index ee2a4294bd..716522ecd7 100644 --- a/packages/cli/Dockerfile +++ b/packages/cli/Dockerfile @@ -1,4 +1,4 @@ -FROM node:24.1.0-alpine3.20@sha256:8fe019e0d57dbdce5f5c27c0b63d2775cf34b00e3755a7dea969802d7e0c2b25 AS core +FROM node:24.18.0-trixie-slim@sha256:ae91dcc111a68c9d2d81ff2a17bda61be126426176fde6fe7d08ab13b7f50573 AS core WORKDIR /usr/src/app COPY package* pnpm* .pnpmfile.cjs ./ diff --git a/packages/e2e-auth-server/Dockerfile b/packages/e2e-auth-server/Dockerfile index 3a49307316..bfc939c084 100644 --- a/packages/e2e-auth-server/Dockerfile +++ b/packages/e2e-auth-server/Dockerfile @@ -1,4 +1,4 @@ -FROM node:24.1.0-alpine3.20@sha256:8fe019e0d57dbdce5f5c27c0b63d2775cf34b00e3755a7dea969802d7e0c2b25 +FROM node:24.18.0-trixie-slim@sha256:ae91dcc111a68c9d2d81ff2a17bda61be126426176fde6fe7d08ab13b7f50573 WORKDIR /usr/src/app COPY package* pnpm* .pnpmfile.cjs ./ COPY ./packages ./packages/ From 9a143f0047173c45adb570dc1347921bc55dbbe4 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Thu, 30 Jul 2026 12:14:50 -0700 Subject: [PATCH 22/69] chore(mobile): remove Pigeon generated code (#30343) --- mobile/.gitignore | 5 + .../immich/background/BackgroundWorker.g.kt | 453 ---------- .../background/BackgroundWorkerLock.g.kt | 95 -- .../immich/connectivity/Connectivity.g.kt | 116 --- .../app/alextran/immich/core/Network.g.kt | 451 ---------- .../alextran/immich/images/LocalImages.g.kt | 140 --- .../alextran/immich/images/RemoteImages.g.kt | 123 --- .../immich/permission/PermissionApi.g.kt | 169 ---- .../app/alextran/immich/sync/Messages.g.kt | 823 ------------------ .../immich/viewintent/ViewIntent.g.kt | 292 ------- .../Background/BackgroundWorker.g.swift | 418 --------- .../Runner/Connectivity/Connectivity.g.swift | 129 --- mobile/ios/Runner/Core/Network.g.swift | 406 --------- mobile/ios/Runner/Images/LocalImages.g.swift | 139 --- mobile/ios/Runner/Images/RemoteImages.g.swift | 134 --- .../Runner/Permission/PermissionApi.g.swift | 168 ---- mobile/ios/Runner/Sync/Messages.g.swift | 777 ----------------- .../lib/platform/background_worker_api.g.dart | 365 -------- .../background_worker_lock_api.g.dart | 90 -- mobile/lib/platform/connectivity_api.g.dart | 89 -- mobile/lib/platform/local_image_api.g.dart | 128 --- mobile/lib/platform/native_sync_api.g.dart | 708 --------------- mobile/lib/platform/network_api.g.dart | 331 ------- mobile/lib/platform/permission_api.g.dart | 146 ---- mobile/lib/platform/remote_image_api.g.dart | 114 --- mobile/lib/platform/thumbnail_api.g.dart | 142 --- mobile/lib/platform/view_intent_api.g.dart | 191 ---- 27 files changed, 5 insertions(+), 7137 deletions(-) delete mode 100644 mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt delete mode 100644 mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt delete mode 100644 mobile/android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt delete mode 100644 mobile/android/app/src/main/kotlin/app/alextran/immich/core/Network.g.kt delete mode 100644 mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImages.g.kt delete mode 100644 mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImages.g.kt delete mode 100644 mobile/android/app/src/main/kotlin/app/alextran/immich/permission/PermissionApi.g.kt delete mode 100644 mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt delete mode 100644 mobile/android/app/src/main/kotlin/app/alextran/immich/viewintent/ViewIntent.g.kt delete mode 100644 mobile/ios/Runner/Background/BackgroundWorker.g.swift delete mode 100644 mobile/ios/Runner/Connectivity/Connectivity.g.swift delete mode 100644 mobile/ios/Runner/Core/Network.g.swift delete mode 100644 mobile/ios/Runner/Images/LocalImages.g.swift delete mode 100644 mobile/ios/Runner/Images/RemoteImages.g.swift delete mode 100644 mobile/ios/Runner/Permission/PermissionApi.g.swift delete mode 100644 mobile/ios/Runner/Sync/Messages.g.swift delete mode 100644 mobile/lib/platform/background_worker_api.g.dart delete mode 100644 mobile/lib/platform/background_worker_lock_api.g.dart delete mode 100644 mobile/lib/platform/connectivity_api.g.dart delete mode 100644 mobile/lib/platform/local_image_api.g.dart delete mode 100644 mobile/lib/platform/native_sync_api.g.dart delete mode 100644 mobile/lib/platform/network_api.g.dart delete mode 100644 mobile/lib/platform/permission_api.g.dart delete mode 100644 mobile/lib/platform/remote_image_api.g.dart delete mode 100644 mobile/lib/platform/thumbnail_api.g.dart delete mode 100644 mobile/lib/platform/view_intent_api.g.dart diff --git a/mobile/.gitignore b/mobile/.gitignore index 64aa4a8dd7..bdddf7bbcc 100644 --- a/mobile/.gitignore +++ b/mobile/.gitignore @@ -34,6 +34,11 @@ lib/**/*.drift.dart test/drift/main/generated/ +# Pigeon related +/lib/platform/*.g.dart +/ios/**/*.g.swift +/android/**/*.g.kt + # Web related lib/generated_plugin_registrant.dart diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt deleted file mode 100644 index 3fcaed34bc..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt +++ /dev/null @@ -1,453 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.background - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object BackgroundWorkerPigeonUtils { - - fun createConnectionError(channelName: String): FlutterError { - return FlutterError("channel-error", "Unable to establish connection on channel: '$channelName'.", "") } - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } - fun doubleEquals(a: Double, b: Double): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN()) - } - - fun floatEquals(a: Float, b: Float): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN()) - } - - fun doubleHash(d: Double): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (d == 0.0) 0.0 else d - val bits = java.lang.Double.doubleToLongBits(normalized) - return (bits xor (bits ushr 32)).toInt() - } - - fun floatHash(f: Float): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (f == 0.0f) 0.0f else f - return java.lang.Float.floatToIntBits(normalized) - } - - fun deepEquals(a: Any?, b: Any?): Boolean { - if (a === b) { - return true - } - if (a == null || b == null) { - return false - } - if (a is ByteArray && b is ByteArray) { - return a.contentEquals(b) - } - if (a is IntArray && b is IntArray) { - return a.contentEquals(b) - } - if (a is LongArray && b is LongArray) { - return a.contentEquals(b) - } - if (a is DoubleArray && b is DoubleArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!doubleEquals(a[i], b[i])) return false - } - return true - } - if (a is FloatArray && b is FloatArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!floatEquals(a[i], b[i])) return false - } - return true - } - if (a is Array<*> && b is Array<*>) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!deepEquals(a[i], b[i])) return false - } - return true - } - if (a is List<*> && b is List<*>) { - if (a.size != b.size) return false - val iterA = a.iterator() - val iterB = b.iterator() - while (iterA.hasNext() && iterB.hasNext()) { - if (!deepEquals(iterA.next(), iterB.next())) return false - } - return true - } - if (a is Map<*, *> && b is Map<*, *>) { - if (a.size != b.size) return false - for (entry in a) { - val key = entry.key - var found = false - for (bEntry in b) { - if (deepEquals(key, bEntry.key)) { - if (deepEquals(entry.value, bEntry.value)) { - found = true - break - } else { - return false - } - } - } - if (!found) return false - } - return true - } - if (a is Double && b is Double) { - return doubleEquals(a, b) - } - if (a is Float && b is Float) { - return floatEquals(a, b) - } - return a == b - } - - fun deepHash(value: Any?): Int { - return when (value) { - null -> 0 - is ByteArray -> value.contentHashCode() - is IntArray -> value.contentHashCode() - is LongArray -> value.contentHashCode() - is DoubleArray -> { - var result = 1 - for (item in value) { - result = 31 * result + doubleHash(item) - } - result - } - is FloatArray -> { - var result = 1 - for (item in value) { - result = 31 * result + floatHash(item) - } - result - } - is Array<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is List<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is Map<*, *> -> { - var result = 0 - for (entry in value) { - result += ((deepHash(entry.key) * 31) xor deepHash(entry.value)) - } - result - } - is Double -> doubleHash(value) - is Float -> floatHash(value) - else -> value.hashCode() - } - } - -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -/** Generated class from Pigeon that represents data sent in messages. */ -data class BackgroundWorkerSettings ( - val requiresCharging: Boolean, - val minimumDelaySeconds: Long -) - { - companion object { - fun fromList(pigeonVar_list: List): BackgroundWorkerSettings { - val requiresCharging = pigeonVar_list[0] as Boolean - val minimumDelaySeconds = pigeonVar_list[1] as Long - return BackgroundWorkerSettings(requiresCharging, minimumDelaySeconds) - } - } - fun toList(): List { - return listOf( - requiresCharging, - minimumDelaySeconds, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as BackgroundWorkerSettings - return BackgroundWorkerPigeonUtils.deepEquals(this.requiresCharging, other.requiresCharging) && BackgroundWorkerPigeonUtils.deepEquals(this.minimumDelaySeconds, other.minimumDelaySeconds) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + BackgroundWorkerPigeonUtils.deepHash(this.requiresCharging) - result = 31 * result + BackgroundWorkerPigeonUtils.deepHash(this.minimumDelaySeconds) - return result - } -} -private open class BackgroundWorkerPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as? List)?.let { - BackgroundWorkerSettings.fromList(it) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is BackgroundWorkerSettings -> { - stream.write(129) - writeValue(stream, value.toList()) - } - else -> super.writeValue(stream, value) - } - } -} - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface BackgroundWorkerFgHostApi { - fun enable() - fun saveNotificationMessage(title: String, body: String) - fun configure(settings: BackgroundWorkerSettings) - fun disable() - - companion object { - /** The codec used by BackgroundWorkerFgHostApi. */ - val codec: MessageCodec by lazy { - BackgroundWorkerPigeonCodec() - } - /** Sets up an instance of `BackgroundWorkerFgHostApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: BackgroundWorkerFgHostApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.enable$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.enable() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.saveNotificationMessage$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val titleArg = args[0] as String - val bodyArg = args[1] as String - val wrapped: List = try { - api.saveNotificationMessage(titleArg, bodyArg) - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.configure$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val settingsArg = args[0] as BackgroundWorkerSettings - val wrapped: List = try { - api.configure(settingsArg) - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.disable$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.disable() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface BackgroundWorkerBgHostApi { - fun onInitialized() - fun close() - - companion object { - /** The codec used by BackgroundWorkerBgHostApi. */ - val codec: MessageCodec by lazy { - BackgroundWorkerPigeonCodec() - } - /** Sets up an instance of `BackgroundWorkerBgHostApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: BackgroundWorkerBgHostApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.onInitialized$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.onInitialized() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.close$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.close() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} -/** Generated class from Pigeon that represents Flutter messages that can be called from Kotlin. */ -class BackgroundWorkerFlutterApi(private val binaryMessenger: BinaryMessenger, private val messageChannelSuffix: String = "") { - companion object { - /** The codec used by BackgroundWorkerFlutterApi. */ - val codec: MessageCodec by lazy { - BackgroundWorkerPigeonCodec() - } - } - fun onIosUpload(isRefreshArg: Boolean, maxSecondsArg: Long?, callback: (Result) -> Unit) -{ - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val channelName = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload$separatedMessageChannelSuffix" - val channel = BasicMessageChannel(binaryMessenger, channelName, codec) - channel.send(listOf(isRefreshArg, maxSecondsArg)) { - if (it is List<*>) { - if (it.size > 1) { - callback(Result.failure(FlutterError(it[0] as String, it[1] as String, it[2] as String?))) - } else { - callback(Result.success(Unit)) - } - } else { - callback(Result.failure(BackgroundWorkerPigeonUtils.createConnectionError(channelName))) - } - } - } - fun onAndroidUpload(maxMinutesArg: Long?, callback: (Result) -> Unit) -{ - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val channelName = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onAndroidUpload$separatedMessageChannelSuffix" - val channel = BasicMessageChannel(binaryMessenger, channelName, codec) - channel.send(listOf(maxMinutesArg)) { - if (it is List<*>) { - if (it.size > 1) { - callback(Result.failure(FlutterError(it[0] as String, it[1] as String, it[2] as String?))) - } else { - callback(Result.success(Unit)) - } - } else { - callback(Result.failure(BackgroundWorkerPigeonUtils.createConnectionError(channelName))) - } - } - } - fun cancel(callback: (Result) -> Unit) -{ - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val channelName = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.cancel$separatedMessageChannelSuffix" - val channel = BasicMessageChannel(binaryMessenger, channelName, codec) - channel.send(null) { - if (it is List<*>) { - if (it.size > 1) { - callback(Result.failure(FlutterError(it[0] as String, it[1] as String, it[2] as String?))) - } else { - callback(Result.success(Unit)) - } - } else { - callback(Result.failure(BackgroundWorkerPigeonUtils.createConnectionError(channelName))) - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt deleted file mode 100644 index 4e2e382c2b..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt +++ /dev/null @@ -1,95 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.background - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object BackgroundWorkerLockPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} -private open class BackgroundWorkerLockPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return super.readValueOfType(type, buffer) - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - super.writeValue(stream, value) - } -} - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface BackgroundWorkerLockApi { - fun lock() - fun unlock() - - companion object { - /** The codec used by BackgroundWorkerLockApi. */ - val codec: MessageCodec by lazy { - BackgroundWorkerLockPigeonCodec() - } - /** Sets up an instance of `BackgroundWorkerLockApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: BackgroundWorkerLockApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.lock$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.lock() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerLockPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.unlock$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.unlock() - listOf(null) - } catch (exception: Throwable) { - BackgroundWorkerLockPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt deleted file mode 100644 index aec1f06164..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt +++ /dev/null @@ -1,116 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.connectivity - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object ConnectivityPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -enum class NetworkCapability(val raw: Int) { - CELLULAR(0), - WIFI(1), - VPN(2), - UNMETERED(3); - - companion object { - fun ofRaw(raw: Int): NetworkCapability? { - return values().firstOrNull { it.raw == raw } - } - } -} -private open class ConnectivityPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as Long?)?.let { - NetworkCapability.ofRaw(it.toInt()) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is NetworkCapability -> { - stream.write(129) - writeValue(stream, value.raw.toLong()) - } - else -> super.writeValue(stream, value) - } - } -} - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface ConnectivityApi { - fun getCapabilities(): List - - companion object { - /** The codec used by ConnectivityApi. */ - val codec: MessageCodec by lazy { - ConnectivityPigeonCodec() - } - /** Sets up an instance of `ConnectivityApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: ConnectivityApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val taskQueue = binaryMessenger.makeBackgroundTaskQueue() - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities$separatedMessageChannelSuffix", codec, taskQueue) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.getCapabilities()) - } catch (exception: Throwable) { - ConnectivityPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/core/Network.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/core/Network.g.kt deleted file mode 100644 index c380a0a6a5..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/core/Network.g.kt +++ /dev/null @@ -1,451 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.core - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object NetworkPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } - fun doubleEquals(a: Double, b: Double): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN()) - } - - fun floatEquals(a: Float, b: Float): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN()) - } - - fun doubleHash(d: Double): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (d == 0.0) 0.0 else d - val bits = java.lang.Double.doubleToLongBits(normalized) - return (bits xor (bits ushr 32)).toInt() - } - - fun floatHash(f: Float): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (f == 0.0f) 0.0f else f - return java.lang.Float.floatToIntBits(normalized) - } - - fun deepEquals(a: Any?, b: Any?): Boolean { - if (a === b) { - return true - } - if (a == null || b == null) { - return false - } - if (a is ByteArray && b is ByteArray) { - return a.contentEquals(b) - } - if (a is IntArray && b is IntArray) { - return a.contentEquals(b) - } - if (a is LongArray && b is LongArray) { - return a.contentEquals(b) - } - if (a is DoubleArray && b is DoubleArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!doubleEquals(a[i], b[i])) return false - } - return true - } - if (a is FloatArray && b is FloatArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!floatEquals(a[i], b[i])) return false - } - return true - } - if (a is Array<*> && b is Array<*>) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!deepEquals(a[i], b[i])) return false - } - return true - } - if (a is List<*> && b is List<*>) { - if (a.size != b.size) return false - val iterA = a.iterator() - val iterB = b.iterator() - while (iterA.hasNext() && iterB.hasNext()) { - if (!deepEquals(iterA.next(), iterB.next())) return false - } - return true - } - if (a is Map<*, *> && b is Map<*, *>) { - if (a.size != b.size) return false - for (entry in a) { - val key = entry.key - var found = false - for (bEntry in b) { - if (deepEquals(key, bEntry.key)) { - if (deepEquals(entry.value, bEntry.value)) { - found = true - break - } else { - return false - } - } - } - if (!found) return false - } - return true - } - if (a is Double && b is Double) { - return doubleEquals(a, b) - } - if (a is Float && b is Float) { - return floatEquals(a, b) - } - return a == b - } - - fun deepHash(value: Any?): Int { - return when (value) { - null -> 0 - is ByteArray -> value.contentHashCode() - is IntArray -> value.contentHashCode() - is LongArray -> value.contentHashCode() - is DoubleArray -> { - var result = 1 - for (item in value) { - result = 31 * result + doubleHash(item) - } - result - } - is FloatArray -> { - var result = 1 - for (item in value) { - result = 31 * result + floatHash(item) - } - result - } - is Array<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is List<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is Map<*, *> -> { - var result = 0 - for (entry in value) { - result += ((deepHash(entry.key) * 31) xor deepHash(entry.value)) - } - result - } - is Double -> doubleHash(value) - is Float -> floatHash(value) - else -> value.hashCode() - } - } - -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -/** Generated class from Pigeon that represents data sent in messages. */ -data class ClientCertData ( - val data: ByteArray, - val password: String -) - { - companion object { - fun fromList(pigeonVar_list: List): ClientCertData { - val data = pigeonVar_list[0] as ByteArray - val password = pigeonVar_list[1] as String - return ClientCertData(data, password) - } - } - fun toList(): List { - return listOf( - data, - password, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as ClientCertData - return NetworkPigeonUtils.deepEquals(this.data, other.data) && NetworkPigeonUtils.deepEquals(this.password, other.password) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + NetworkPigeonUtils.deepHash(this.data) - result = 31 * result + NetworkPigeonUtils.deepHash(this.password) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class ClientCertPrompt ( - val title: String, - val message: String, - val cancel: String, - val confirm: String -) - { - companion object { - fun fromList(pigeonVar_list: List): ClientCertPrompt { - val title = pigeonVar_list[0] as String - val message = pigeonVar_list[1] as String - val cancel = pigeonVar_list[2] as String - val confirm = pigeonVar_list[3] as String - return ClientCertPrompt(title, message, cancel, confirm) - } - } - fun toList(): List { - return listOf( - title, - message, - cancel, - confirm, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as ClientCertPrompt - return NetworkPigeonUtils.deepEquals(this.title, other.title) && NetworkPigeonUtils.deepEquals(this.message, other.message) && NetworkPigeonUtils.deepEquals(this.cancel, other.cancel) && NetworkPigeonUtils.deepEquals(this.confirm, other.confirm) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + NetworkPigeonUtils.deepHash(this.title) - result = 31 * result + NetworkPigeonUtils.deepHash(this.message) - result = 31 * result + NetworkPigeonUtils.deepHash(this.cancel) - result = 31 * result + NetworkPigeonUtils.deepHash(this.confirm) - return result - } -} -private open class NetworkPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as? List)?.let { - ClientCertData.fromList(it) - } - } - 130.toByte() -> { - return (readValue(buffer) as? List)?.let { - ClientCertPrompt.fromList(it) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is ClientCertData -> { - stream.write(129) - writeValue(stream, value.toList()) - } - is ClientCertPrompt -> { - stream.write(130) - writeValue(stream, value.toList()) - } - else -> super.writeValue(stream, value) - } - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface NetworkApi { - fun addCertificate(clientData: ClientCertData, callback: (Result) -> Unit) - fun selectCertificate(promptText: ClientCertPrompt, callback: (Result) -> Unit) - fun removeCertificate(callback: (Result) -> Unit) - fun hasCertificate(): Boolean - fun getClientPointer(): Long - fun setRequestHeaders(headers: Map, serverUrls: List, token: String?) - fun getAppGroupId(): String - - companion object { - /** The codec used by NetworkApi. */ - val codec: MessageCodec by lazy { - NetworkPigeonCodec() - } - /** Sets up an instance of `NetworkApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: NetworkApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.addCertificate$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val clientDataArg = args[0] as ClientCertData - api.addCertificate(clientDataArg) { result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(NetworkPigeonUtils.wrapError(error)) - } else { - reply.reply(NetworkPigeonUtils.wrapResult(null)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.selectCertificate$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val promptTextArg = args[0] as ClientCertPrompt - api.selectCertificate(promptTextArg) { result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(NetworkPigeonUtils.wrapError(error)) - } else { - reply.reply(NetworkPigeonUtils.wrapResult(null)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.removeCertificate$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.removeCertificate{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(NetworkPigeonUtils.wrapError(error)) - } else { - reply.reply(NetworkPigeonUtils.wrapResult(null)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.hasCertificate$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.hasCertificate()) - } catch (exception: Throwable) { - NetworkPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.getClientPointer$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.getClientPointer()) - } catch (exception: Throwable) { - NetworkPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.setRequestHeaders$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val headersArg = args[0] as Map - val serverUrlsArg = args[1] as List - val tokenArg = args[2] as String? - val wrapped: List = try { - api.setRequestHeaders(headersArg, serverUrlsArg, tokenArg) - listOf(null) - } catch (exception: Throwable) { - NetworkPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NetworkApi.getAppGroupId$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.getAppGroupId()) - } catch (exception: Throwable) { - NetworkPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImages.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImages.g.kt deleted file mode 100644 index e741ce07e9..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/LocalImages.g.kt +++ /dev/null @@ -1,140 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.images - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object LocalImagesPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() -private open class LocalImagesPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return super.readValueOfType(type, buffer) - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - super.writeValue(stream, value) - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface LocalImageApi { - fun requestImage(assetId: String, requestId: Long, width: Long, height: Long, isVideo: Boolean, preferEncoded: Boolean, callback: (Result?>) -> Unit) - fun cancelRequest(requestId: Long) - fun getThumbhash(thumbhash: String, callback: (Result>) -> Unit) - - companion object { - /** The codec used by LocalImageApi. */ - val codec: MessageCodec by lazy { - LocalImagesPigeonCodec() - } - /** Sets up an instance of `LocalImageApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: LocalImageApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.LocalImageApi.requestImage$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val assetIdArg = args[0] as String - val requestIdArg = args[1] as Long - val widthArg = args[2] as Long - val heightArg = args[3] as Long - val isVideoArg = args[4] as Boolean - val preferEncodedArg = args[5] as Boolean - api.requestImage(assetIdArg, requestIdArg, widthArg, heightArg, isVideoArg, preferEncodedArg) { result: Result?> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(LocalImagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(LocalImagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.LocalImageApi.cancelRequest$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val requestIdArg = args[0] as Long - val wrapped: List = try { - api.cancelRequest(requestIdArg) - listOf(null) - } catch (exception: Throwable) { - LocalImagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.LocalImageApi.getThumbhash$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val thumbhashArg = args[0] as String - api.getThumbhash(thumbhashArg) { result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(LocalImagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(LocalImagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImages.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImages.g.kt deleted file mode 100644 index 2b5f4d2f57..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/images/RemoteImages.g.kt +++ /dev/null @@ -1,123 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.images - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object RemoteImagesPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} -private open class RemoteImagesPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return super.readValueOfType(type, buffer) - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - super.writeValue(stream, value) - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface RemoteImageApi { - fun requestImage(url: String, requestId: Long, preferEncoded: Boolean, callback: (Result?>) -> Unit) - fun cancelRequest(requestId: Long) - fun clearCache(callback: (Result) -> Unit) - - companion object { - /** The codec used by RemoteImageApi. */ - val codec: MessageCodec by lazy { - RemoteImagesPigeonCodec() - } - /** Sets up an instance of `RemoteImageApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: RemoteImageApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.RemoteImageApi.requestImage$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val urlArg = args[0] as String - val requestIdArg = args[1] as Long - val preferEncodedArg = args[2] as Boolean - api.requestImage(urlArg, requestIdArg, preferEncodedArg) { result: Result?> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(RemoteImagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(RemoteImagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.RemoteImageApi.cancelRequest$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val requestIdArg = args[0] as Long - val wrapped: List = try { - api.cancelRequest(requestIdArg) - listOf(null) - } catch (exception: Throwable) { - RemoteImagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.RemoteImageApi.clearCache$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.clearCache{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(RemoteImagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(RemoteImagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/permission/PermissionApi.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/permission/PermissionApi.g.kt deleted file mode 100644 index 5f7bf806b4..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/permission/PermissionApi.g.kt +++ /dev/null @@ -1,169 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.permission - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object PermissionApiPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -enum class PermissionStatus(val raw: Int) { - GRANTED(0), - DENIED(1), - PERMANENTLY_DENIED(2); - - companion object { - fun ofRaw(raw: Int): PermissionStatus? { - return values().firstOrNull { it.raw == raw } - } - } -} -private open class PermissionApiPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as Long?)?.let { - PermissionStatus.ofRaw(it.toInt()) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is PermissionStatus -> { - stream.write(129) - writeValue(stream, value.raw.toLong()) - } - else -> super.writeValue(stream, value) - } - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface PermissionApi { - fun isIgnoringBatteryOptimizations(): PermissionStatus - fun hasManageMediaPermission(): Boolean - fun requestManageMediaPermission(callback: (Result) -> Unit) - fun manageMediaPermission(callback: (Result) -> Unit) - - companion object { - /** The codec used by PermissionApi. */ - val codec: MessageCodec by lazy { - PermissionApiPigeonCodec() - } - /** Sets up an instance of `PermissionApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: PermissionApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.PermissionApi.isIgnoringBatteryOptimizations$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.isIgnoringBatteryOptimizations()) - } catch (exception: Throwable) { - PermissionApiPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.PermissionApi.hasManageMediaPermission$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.hasManageMediaPermission()) - } catch (exception: Throwable) { - PermissionApiPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.PermissionApi.requestManageMediaPermission$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.requestManageMediaPermission{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(PermissionApiPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(PermissionApiPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.PermissionApi.manageMediaPermission$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.manageMediaPermission{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(PermissionApiPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(PermissionApiPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt deleted file mode 100644 index 02f1cb237d..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt +++ /dev/null @@ -1,823 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.sync - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object MessagesPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } - fun doubleEquals(a: Double, b: Double): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN()) - } - - fun floatEquals(a: Float, b: Float): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN()) - } - - fun doubleHash(d: Double): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (d == 0.0) 0.0 else d - val bits = java.lang.Double.doubleToLongBits(normalized) - return (bits xor (bits ushr 32)).toInt() - } - - fun floatHash(f: Float): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (f == 0.0f) 0.0f else f - return java.lang.Float.floatToIntBits(normalized) - } - - fun deepEquals(a: Any?, b: Any?): Boolean { - if (a === b) { - return true - } - if (a == null || b == null) { - return false - } - if (a is ByteArray && b is ByteArray) { - return a.contentEquals(b) - } - if (a is IntArray && b is IntArray) { - return a.contentEquals(b) - } - if (a is LongArray && b is LongArray) { - return a.contentEquals(b) - } - if (a is DoubleArray && b is DoubleArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!doubleEquals(a[i], b[i])) return false - } - return true - } - if (a is FloatArray && b is FloatArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!floatEquals(a[i], b[i])) return false - } - return true - } - if (a is Array<*> && b is Array<*>) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!deepEquals(a[i], b[i])) return false - } - return true - } - if (a is List<*> && b is List<*>) { - if (a.size != b.size) return false - val iterA = a.iterator() - val iterB = b.iterator() - while (iterA.hasNext() && iterB.hasNext()) { - if (!deepEquals(iterA.next(), iterB.next())) return false - } - return true - } - if (a is Map<*, *> && b is Map<*, *>) { - if (a.size != b.size) return false - for (entry in a) { - val key = entry.key - var found = false - for (bEntry in b) { - if (deepEquals(key, bEntry.key)) { - if (deepEquals(entry.value, bEntry.value)) { - found = true - break - } else { - return false - } - } - } - if (!found) return false - } - return true - } - if (a is Double && b is Double) { - return doubleEquals(a, b) - } - if (a is Float && b is Float) { - return floatEquals(a, b) - } - return a == b - } - - fun deepHash(value: Any?): Int { - return when (value) { - null -> 0 - is ByteArray -> value.contentHashCode() - is IntArray -> value.contentHashCode() - is LongArray -> value.contentHashCode() - is DoubleArray -> { - var result = 1 - for (item in value) { - result = 31 * result + doubleHash(item) - } - result - } - is FloatArray -> { - var result = 1 - for (item in value) { - result = 31 * result + floatHash(item) - } - result - } - is Array<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is List<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is Map<*, *> -> { - var result = 0 - for (entry in value) { - result += ((deepHash(entry.key) * 31) xor deepHash(entry.value)) - } - result - } - is Double -> doubleHash(value) - is Float -> floatHash(value) - else -> value.hashCode() - } - } - -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -enum class PlatformAssetPlaybackStyle(val raw: Int) { - UNKNOWN(0), - IMAGE(1), - VIDEO(2), - IMAGE_ANIMATED(3), - LIVE_PHOTO(4), - VIDEO_LOOPING(5); - - companion object { - fun ofRaw(raw: Int): PlatformAssetPlaybackStyle? { - return values().firstOrNull { it.raw == raw } - } - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class PlatformAsset ( - val id: String, - val name: String, - val type: Long, - val createdAt: Long? = null, - val updatedAt: Long? = null, - val width: Long? = null, - val height: Long? = null, - val durationMs: Long, - val orientation: Long, - val isFavorite: Boolean, - val adjustmentTime: Long? = null, - val latitude: Double? = null, - val longitude: Double? = null, - val playbackStyle: PlatformAssetPlaybackStyle -) - { - companion object { - fun fromList(pigeonVar_list: List): PlatformAsset { - val id = pigeonVar_list[0] as String - val name = pigeonVar_list[1] as String - val type = pigeonVar_list[2] as Long - val createdAt = pigeonVar_list[3] as Long? - val updatedAt = pigeonVar_list[4] as Long? - val width = pigeonVar_list[5] as Long? - val height = pigeonVar_list[6] as Long? - val durationMs = pigeonVar_list[7] as Long - val orientation = pigeonVar_list[8] as Long - val isFavorite = pigeonVar_list[9] as Boolean - val adjustmentTime = pigeonVar_list[10] as Long? - val latitude = pigeonVar_list[11] as Double? - val longitude = pigeonVar_list[12] as Double? - val playbackStyle = pigeonVar_list[13] as PlatformAssetPlaybackStyle - return PlatformAsset(id, name, type, createdAt, updatedAt, width, height, durationMs, orientation, isFavorite, adjustmentTime, latitude, longitude, playbackStyle) - } - } - fun toList(): List { - return listOf( - id, - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - orientation, - isFavorite, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as PlatformAsset - return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.type, other.type) && MessagesPigeonUtils.deepEquals(this.createdAt, other.createdAt) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.width, other.width) && MessagesPigeonUtils.deepEquals(this.height, other.height) && MessagesPigeonUtils.deepEquals(this.durationMs, other.durationMs) && MessagesPigeonUtils.deepEquals(this.orientation, other.orientation) && MessagesPigeonUtils.deepEquals(this.isFavorite, other.isFavorite) && MessagesPigeonUtils.deepEquals(this.adjustmentTime, other.adjustmentTime) && MessagesPigeonUtils.deepEquals(this.latitude, other.latitude) && MessagesPigeonUtils.deepEquals(this.longitude, other.longitude) && MessagesPigeonUtils.deepEquals(this.playbackStyle, other.playbackStyle) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.id) - result = 31 * result + MessagesPigeonUtils.deepHash(this.name) - result = 31 * result + MessagesPigeonUtils.deepHash(this.type) - result = 31 * result + MessagesPigeonUtils.deepHash(this.createdAt) - result = 31 * result + MessagesPigeonUtils.deepHash(this.updatedAt) - result = 31 * result + MessagesPigeonUtils.deepHash(this.width) - result = 31 * result + MessagesPigeonUtils.deepHash(this.height) - result = 31 * result + MessagesPigeonUtils.deepHash(this.durationMs) - result = 31 * result + MessagesPigeonUtils.deepHash(this.orientation) - result = 31 * result + MessagesPigeonUtils.deepHash(this.isFavorite) - result = 31 * result + MessagesPigeonUtils.deepHash(this.adjustmentTime) - result = 31 * result + MessagesPigeonUtils.deepHash(this.latitude) - result = 31 * result + MessagesPigeonUtils.deepHash(this.longitude) - result = 31 * result + MessagesPigeonUtils.deepHash(this.playbackStyle) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class PlatformAlbum ( - val id: String, - val name: String, - val updatedAt: Long? = null, - val isCloud: Boolean, - val assetCount: Long -) - { - companion object { - fun fromList(pigeonVar_list: List): PlatformAlbum { - val id = pigeonVar_list[0] as String - val name = pigeonVar_list[1] as String - val updatedAt = pigeonVar_list[2] as Long? - val isCloud = pigeonVar_list[3] as Boolean - val assetCount = pigeonVar_list[4] as Long - return PlatformAlbum(id, name, updatedAt, isCloud, assetCount) - } - } - fun toList(): List { - return listOf( - id, - name, - updatedAt, - isCloud, - assetCount, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as PlatformAlbum - return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.isCloud, other.isCloud) && MessagesPigeonUtils.deepEquals(this.assetCount, other.assetCount) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.id) - result = 31 * result + MessagesPigeonUtils.deepHash(this.name) - result = 31 * result + MessagesPigeonUtils.deepHash(this.updatedAt) - result = 31 * result + MessagesPigeonUtils.deepHash(this.isCloud) - result = 31 * result + MessagesPigeonUtils.deepHash(this.assetCount) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class SyncDelta ( - val hasChanges: Boolean, - val updates: List, - val deletes: List, - val assetAlbums: Map> -) - { - companion object { - fun fromList(pigeonVar_list: List): SyncDelta { - val hasChanges = pigeonVar_list[0] as Boolean - val updates = pigeonVar_list[1] as List - val deletes = pigeonVar_list[2] as List - val assetAlbums = pigeonVar_list[3] as Map> - return SyncDelta(hasChanges, updates, deletes, assetAlbums) - } - } - fun toList(): List { - return listOf( - hasChanges, - updates, - deletes, - assetAlbums, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as SyncDelta - return MessagesPigeonUtils.deepEquals(this.hasChanges, other.hasChanges) && MessagesPigeonUtils.deepEquals(this.updates, other.updates) && MessagesPigeonUtils.deepEquals(this.deletes, other.deletes) && MessagesPigeonUtils.deepEquals(this.assetAlbums, other.assetAlbums) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.hasChanges) - result = 31 * result + MessagesPigeonUtils.deepHash(this.updates) - result = 31 * result + MessagesPigeonUtils.deepHash(this.deletes) - result = 31 * result + MessagesPigeonUtils.deepHash(this.assetAlbums) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class HashResult ( - val assetId: String, - val error: String? = null, - val hash: String? = null -) - { - companion object { - fun fromList(pigeonVar_list: List): HashResult { - val assetId = pigeonVar_list[0] as String - val error = pigeonVar_list[1] as String? - val hash = pigeonVar_list[2] as String? - return HashResult(assetId, error, hash) - } - } - fun toList(): List { - return listOf( - assetId, - error, - hash, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as HashResult - return MessagesPigeonUtils.deepEquals(this.assetId, other.assetId) && MessagesPigeonUtils.deepEquals(this.error, other.error) && MessagesPigeonUtils.deepEquals(this.hash, other.hash) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.assetId) - result = 31 * result + MessagesPigeonUtils.deepHash(this.error) - result = 31 * result + MessagesPigeonUtils.deepHash(this.hash) - return result - } -} - -/** Generated class from Pigeon that represents data sent in messages. */ -data class CloudIdResult ( - val assetId: String, - val error: String? = null, - val cloudId: String? = null -) - { - companion object { - fun fromList(pigeonVar_list: List): CloudIdResult { - val assetId = pigeonVar_list[0] as String - val error = pigeonVar_list[1] as String? - val cloudId = pigeonVar_list[2] as String? - return CloudIdResult(assetId, error, cloudId) - } - } - fun toList(): List { - return listOf( - assetId, - error, - cloudId, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as CloudIdResult - return MessagesPigeonUtils.deepEquals(this.assetId, other.assetId) && MessagesPigeonUtils.deepEquals(this.error, other.error) && MessagesPigeonUtils.deepEquals(this.cloudId, other.cloudId) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + MessagesPigeonUtils.deepHash(this.assetId) - result = 31 * result + MessagesPigeonUtils.deepHash(this.error) - result = 31 * result + MessagesPigeonUtils.deepHash(this.cloudId) - return result - } -} -private open class MessagesPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as Long?)?.let { - PlatformAssetPlaybackStyle.ofRaw(it.toInt()) - } - } - 130.toByte() -> { - return (readValue(buffer) as? List)?.let { - PlatformAsset.fromList(it) - } - } - 131.toByte() -> { - return (readValue(buffer) as? List)?.let { - PlatformAlbum.fromList(it) - } - } - 132.toByte() -> { - return (readValue(buffer) as? List)?.let { - SyncDelta.fromList(it) - } - } - 133.toByte() -> { - return (readValue(buffer) as? List)?.let { - HashResult.fromList(it) - } - } - 134.toByte() -> { - return (readValue(buffer) as? List)?.let { - CloudIdResult.fromList(it) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is PlatformAssetPlaybackStyle -> { - stream.write(129) - writeValue(stream, value.raw.toLong()) - } - is PlatformAsset -> { - stream.write(130) - writeValue(stream, value.toList()) - } - is PlatformAlbum -> { - stream.write(131) - writeValue(stream, value.toList()) - } - is SyncDelta -> { - stream.write(132) - writeValue(stream, value.toList()) - } - is HashResult -> { - stream.write(133) - writeValue(stream, value.toList()) - } - is CloudIdResult -> { - stream.write(134) - writeValue(stream, value.toList()) - } - else -> super.writeValue(stream, value) - } - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface NativeSyncApi { - fun shouldFullSync(callback: (Result) -> Unit) - fun getMediaChanges(callback: (Result) -> Unit) - fun checkpointSync() - fun clearSyncCheckpoint() - fun getAssetIdsForAlbum(albumId: String, callback: (Result>) -> Unit) - fun getAlbums(callback: (Result>) -> Unit) - fun getAssetsCountSince(albumId: String, timestamp: Long): Long - fun getAssetsForAlbum(albumId: String, updatedTimeCond: Long?, callback: (Result>) -> Unit) - fun hashAssets(assetIds: List, allowNetworkAccess: Boolean, callback: (Result>) -> Unit) - fun cancelHashing() - fun cancelSync() - fun getTrashedAssets(): Map> - fun restoreFromTrashById(mediaId: String, type: Long, callback: (Result) -> Unit) - fun getCloudIdForAssetIds(assetIds: List): List - - companion object { - /** The codec used by NativeSyncApi. */ - val codec: MessageCodec by lazy { - MessagesPigeonCodec() - } - /** Sets up an instance of `NativeSyncApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: NativeSyncApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - val taskQueue = binaryMessenger.makeBackgroundTaskQueue() - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.shouldFullSync$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.shouldFullSync{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getMediaChanges$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.getMediaChanges{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.checkpointSync$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.checkpointSync() - listOf(null) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.clearSyncCheckpoint$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.clearSyncCheckpoint() - listOf(null) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetIdsForAlbum$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val albumIdArg = args[0] as String - api.getAssetIdsForAlbum(albumIdArg) { result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAlbums$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.getAlbums{ result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince$separatedMessageChannelSuffix", codec, taskQueue) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val albumIdArg = args[0] as String - val timestampArg = args[1] as Long - val wrapped: List = try { - listOf(api.getAssetsCountSince(albumIdArg, timestampArg)) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsForAlbum$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val albumIdArg = args[0] as String - val updatedTimeCondArg = args[1] as Long? - api.getAssetsForAlbum(albumIdArg, updatedTimeCondArg) { result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets$separatedMessageChannelSuffix", codec, taskQueue) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val assetIdsArg = args[0] as List - val allowNetworkAccessArg = args[1] as Boolean - api.hashAssets(assetIdsArg, allowNetworkAccessArg) { result: Result> -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelHashing$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.cancelHashing() - listOf(null) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelSync$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - api.cancelSync() - listOf(null) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets$separatedMessageChannelSuffix", codec, taskQueue) - if (api != null) { - channel.setMessageHandler { _, reply -> - val wrapped: List = try { - listOf(api.getTrashedAssets()) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.restoreFromTrashById$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val mediaIdArg = args[0] as String - val typeArg = args[1] as Long - api.restoreFromTrashById(mediaIdArg, typeArg) { result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(MessagesPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(MessagesPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds$separatedMessageChannelSuffix", codec, taskQueue) - if (api != null) { - channel.setMessageHandler { message, reply -> - val args = message as List - val assetIdsArg = args[0] as List - val wrapped: List = try { - listOf(api.getCloudIdForAssetIds(assetIdsArg)) - } catch (exception: Throwable) { - MessagesPigeonUtils.wrapError(exception) - } - reply.reply(wrapped) - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/viewintent/ViewIntent.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/viewintent/ViewIntent.g.kt deleted file mode 100644 index 1d5af15cb4..0000000000 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/viewintent/ViewIntent.g.kt +++ /dev/null @@ -1,292 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") - -package app.alextran.immich.viewintent - -import android.util.Log -import io.flutter.plugin.common.BasicMessageChannel -import io.flutter.plugin.common.BinaryMessenger -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MessageCodec -import io.flutter.plugin.common.StandardMethodCodec -import io.flutter.plugin.common.StandardMessageCodec -import java.io.ByteArrayOutputStream -import java.nio.ByteBuffer -private object ViewIntentPigeonUtils { - - fun wrapResult(result: Any?): List { - return listOf(result) - } - - fun wrapError(exception: Throwable): List { - return if (exception is FlutterError) { - listOf( - exception.code, - exception.message, - exception.details - ) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) - ) - } - } - fun doubleEquals(a: Double, b: Double): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN()) - } - - fun floatEquals(a: Float, b: Float): Boolean { - // Normalize -0.0 to 0.0 and handle NaN equality. - return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN()) - } - - fun doubleHash(d: Double): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (d == 0.0) 0.0 else d - val bits = java.lang.Double.doubleToLongBits(normalized) - return (bits xor (bits ushr 32)).toInt() - } - - fun floatHash(f: Float): Int { - // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. - val normalized = if (f == 0.0f) 0.0f else f - return java.lang.Float.floatToIntBits(normalized) - } - - fun deepEquals(a: Any?, b: Any?): Boolean { - if (a === b) { - return true - } - if (a == null || b == null) { - return false - } - if (a is ByteArray && b is ByteArray) { - return a.contentEquals(b) - } - if (a is IntArray && b is IntArray) { - return a.contentEquals(b) - } - if (a is LongArray && b is LongArray) { - return a.contentEquals(b) - } - if (a is DoubleArray && b is DoubleArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!doubleEquals(a[i], b[i])) return false - } - return true - } - if (a is FloatArray && b is FloatArray) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!floatEquals(a[i], b[i])) return false - } - return true - } - if (a is Array<*> && b is Array<*>) { - if (a.size != b.size) return false - for (i in a.indices) { - if (!deepEquals(a[i], b[i])) return false - } - return true - } - if (a is List<*> && b is List<*>) { - if (a.size != b.size) return false - val iterA = a.iterator() - val iterB = b.iterator() - while (iterA.hasNext() && iterB.hasNext()) { - if (!deepEquals(iterA.next(), iterB.next())) return false - } - return true - } - if (a is Map<*, *> && b is Map<*, *>) { - if (a.size != b.size) return false - for (entry in a) { - val key = entry.key - var found = false - for (bEntry in b) { - if (deepEquals(key, bEntry.key)) { - if (deepEquals(entry.value, bEntry.value)) { - found = true - break - } else { - return false - } - } - } - if (!found) return false - } - return true - } - if (a is Double && b is Double) { - return doubleEquals(a, b) - } - if (a is Float && b is Float) { - return floatEquals(a, b) - } - return a == b - } - - fun deepHash(value: Any?): Int { - return when (value) { - null -> 0 - is ByteArray -> value.contentHashCode() - is IntArray -> value.contentHashCode() - is LongArray -> value.contentHashCode() - is DoubleArray -> { - var result = 1 - for (item in value) { - result = 31 * result + doubleHash(item) - } - result - } - is FloatArray -> { - var result = 1 - for (item in value) { - result = 31 * result + floatHash(item) - } - result - } - is Array<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is List<*> -> { - var result = 1 - for (item in value) { - result = 31 * result + deepHash(item) - } - result - } - is Map<*, *> -> { - var result = 0 - for (entry in value) { - result += ((deepHash(entry.key) * 31) xor deepHash(entry.value)) - } - result - } - is Double -> doubleHash(value) - is Float -> floatHash(value) - else -> value.hashCode() - } - } - -} - -/** - * Error class for passing custom error details to Flutter via a thrown PlatformException. - * @property code The error code. - * @property message The error message. - * @property details The error details. Must be a datatype supported by the api codec. - */ -class FlutterError ( - val code: String, - override val message: String? = null, - val details: Any? = null -) : RuntimeException() - -/** Generated class from Pigeon that represents data sent in messages. */ -data class ViewIntentPayload ( - val path: String? = null, - val mimeType: String, - val localAssetId: String? = null -) - { - companion object { - fun fromList(pigeonVar_list: List): ViewIntentPayload { - val path = pigeonVar_list[0] as String? - val mimeType = pigeonVar_list[1] as String - val localAssetId = pigeonVar_list[2] as String? - return ViewIntentPayload(path, mimeType, localAssetId) - } - } - fun toList(): List { - return listOf( - path, - mimeType, - localAssetId, - ) - } - override fun equals(other: Any?): Boolean { - if (other == null || other.javaClass != javaClass) { - return false - } - if (this === other) { - return true - } - val other = other as ViewIntentPayload - return ViewIntentPigeonUtils.deepEquals(this.path, other.path) && ViewIntentPigeonUtils.deepEquals(this.mimeType, other.mimeType) && ViewIntentPigeonUtils.deepEquals(this.localAssetId, other.localAssetId) - } - - override fun hashCode(): Int { - var result = javaClass.hashCode() - result = 31 * result + ViewIntentPigeonUtils.deepHash(this.path) - result = 31 * result + ViewIntentPigeonUtils.deepHash(this.mimeType) - result = 31 * result + ViewIntentPigeonUtils.deepHash(this.localAssetId) - return result - } -} -private open class ViewIntentPigeonCodec : StandardMessageCodec() { - override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { - return when (type) { - 129.toByte() -> { - return (readValue(buffer) as? List)?.let { - ViewIntentPayload.fromList(it) - } - } - else -> super.readValueOfType(type, buffer) - } - } - override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { - when (value) { - is ViewIntentPayload -> { - stream.write(129) - writeValue(stream, value.toList()) - } - else -> super.writeValue(stream, value) - } - } -} - - -/** Generated interface from Pigeon that represents a handler of messages from Flutter. */ -interface ViewIntentHostApi { - fun consumeViewIntent(callback: (Result) -> Unit) - - companion object { - /** The codec used by ViewIntentHostApi. */ - val codec: MessageCodec by lazy { - ViewIntentPigeonCodec() - } - /** Sets up an instance of `ViewIntentHostApi` to handle messages through the `binaryMessenger`. */ - @JvmOverloads - fun setUp(binaryMessenger: BinaryMessenger, api: ViewIntentHostApi?, messageChannelSuffix: String = "") { - val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else "" - run { - val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.ViewIntentHostApi.consumeViewIntent$separatedMessageChannelSuffix", codec) - if (api != null) { - channel.setMessageHandler { _, reply -> - api.consumeViewIntent{ result: Result -> - val error = result.exceptionOrNull() - if (error != null) { - reply.reply(ViewIntentPigeonUtils.wrapError(error)) - } else { - val data = result.getOrNull() - reply.reply(ViewIntentPigeonUtils.wrapResult(data)) - } - } - } - } else { - channel.setMessageHandler(null) - } - } - } - } -} diff --git a/mobile/ios/Runner/Background/BackgroundWorker.g.swift b/mobile/ios/Runner/Background/BackgroundWorker.g.swift deleted file mode 100644 index bd01e953f9..0000000000 --- a/mobile/ios/Runner/Background/BackgroundWorker.g.swift +++ /dev/null @@ -1,418 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func createConnectionError(withChannelName channelName: String) -> PigeonError { - return PigeonError(code: "channel-error", message: "Unable to establish connection on channel: '\(channelName)'.", details: "") -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - -private func doubleEqualsBackgroundWorker(_ lhs: Double, _ rhs: Double) -> Bool { - return (lhs.isNaN && rhs.isNaN) || lhs == rhs -} - -private func doubleHashBackgroundWorker(_ value: Double, _ hasher: inout Hasher) { - if value.isNaN { - hasher.combine(0x7FF8000000000000) - } else { - // Normalize -0.0 to 0.0 - hasher.combine(value == 0 ? 0 : value) - } -} - -func deepEqualsBackgroundWorker(_ lhs: Any?, _ rhs: Any?) -> Bool { - let cleanLhs = nilOrValue(lhs) as Any? - let cleanRhs = nilOrValue(rhs) as Any? - switch (cleanLhs, cleanRhs) { - case (nil, nil): - return true - - case (nil, _), (_, nil): - return false - - case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs: - return true - - case is (Void, Void): - return true - - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !deepEqualsBackgroundWorker(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsArray, let rhsArray) as ([Double], [Double]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !doubleEqualsBackgroundWorker(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): - guard lhsDictionary.count == rhsDictionary.count else { return false } - for (lhsKey, lhsValue) in lhsDictionary { - var found = false - for (rhsKey, rhsValue) in rhsDictionary { - if deepEqualsBackgroundWorker(lhsKey, rhsKey) { - if deepEqualsBackgroundWorker(lhsValue, rhsValue) { - found = true - break - } else { - return false - } - } - } - if !found { return false } - } - return true - - case (let lhs as Double, let rhs as Double): - return doubleEqualsBackgroundWorker(lhs, rhs) - - case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable): - return lhsHashable == rhsHashable - - default: - return false - } -} - -func deepHashBackgroundWorker(value: Any?, hasher: inout Hasher) { - let cleanValue = nilOrValue(value) as Any? - if let cleanValue = cleanValue { - if let doubleValue = cleanValue as? Double { - doubleHashBackgroundWorker(doubleValue, &hasher) - } else if let valueList = cleanValue as? [Any?] { - for item in valueList { - deepHashBackgroundWorker(value: item, hasher: &hasher) - } - } else if let valueList = cleanValue as? [Double] { - for item in valueList { - doubleHashBackgroundWorker(item, &hasher) - } - } else if let valueDict = cleanValue as? [AnyHashable: Any?] { - var result = 0 - for (key, value) in valueDict { - var entryKeyHasher = Hasher() - deepHashBackgroundWorker(value: key, hasher: &entryKeyHasher) - var entryValueHasher = Hasher() - deepHashBackgroundWorker(value: value, hasher: &entryValueHasher) - result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize()) - } - hasher.combine(result) - } else if let hashableValue = cleanValue as? AnyHashable { - hasher.combine(hashableValue) - } else { - hasher.combine(String(describing: cleanValue)) - } - } else { - hasher.combine(0) - } -} - - -/// Generated class from Pigeon that represents data sent in messages. -struct BackgroundWorkerSettings: Hashable { - var requiresCharging: Bool - var minimumDelaySeconds: Int64 - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> BackgroundWorkerSettings? { - let requiresCharging = pigeonVar_list[0] as! Bool - let minimumDelaySeconds = pigeonVar_list[1] as! Int64 - - return BackgroundWorkerSettings( - requiresCharging: requiresCharging, - minimumDelaySeconds: minimumDelaySeconds - ) - } - func toList() -> [Any?] { - return [ - requiresCharging, - minimumDelaySeconds, - ] - } - static func == (lhs: BackgroundWorkerSettings, rhs: BackgroundWorkerSettings) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsBackgroundWorker(lhs.requiresCharging, rhs.requiresCharging) && deepEqualsBackgroundWorker(lhs.minimumDelaySeconds, rhs.minimumDelaySeconds) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("BackgroundWorkerSettings") - deepHashBackgroundWorker(value: requiresCharging, hasher: &hasher) - deepHashBackgroundWorker(value: minimumDelaySeconds, hasher: &hasher) - } -} - -private class BackgroundWorkerPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - return BackgroundWorkerSettings.fromList(self.readValue() as! [Any?]) - default: - return super.readValue(ofType: type) - } - } -} - -private class BackgroundWorkerPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? BackgroundWorkerSettings { - super.writeByte(129) - super.writeValue(value.toList()) - } else { - super.writeValue(value) - } - } -} - -private class BackgroundWorkerPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return BackgroundWorkerPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return BackgroundWorkerPigeonCodecWriter(data: data) - } -} - -class BackgroundWorkerPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = BackgroundWorkerPigeonCodec(readerWriter: BackgroundWorkerPigeonCodecReaderWriter()) -} - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol BackgroundWorkerFgHostApi { - func enable() throws - func saveNotificationMessage(title: String, body: String) throws - func configure(settings: BackgroundWorkerSettings) throws - func disable() throws -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class BackgroundWorkerFgHostApiSetup { - static var codec: FlutterStandardMessageCodec { BackgroundWorkerPigeonCodec.shared } - /// Sets up an instance of `BackgroundWorkerFgHostApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: BackgroundWorkerFgHostApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let enableChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.enable\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - enableChannel.setMessageHandler { _, reply in - do { - try api.enable() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - enableChannel.setMessageHandler(nil) - } - let saveNotificationMessageChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.saveNotificationMessage\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - saveNotificationMessageChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let titleArg = args[0] as! String - let bodyArg = args[1] as! String - do { - try api.saveNotificationMessage(title: titleArg, body: bodyArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - saveNotificationMessageChannel.setMessageHandler(nil) - } - let configureChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.configure\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - configureChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let settingsArg = args[0] as! BackgroundWorkerSettings - do { - try api.configure(settings: settingsArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - configureChannel.setMessageHandler(nil) - } - let disableChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.disable\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - disableChannel.setMessageHandler { _, reply in - do { - try api.disable() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - disableChannel.setMessageHandler(nil) - } - } -} -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol BackgroundWorkerBgHostApi { - func onInitialized() throws - func close() throws -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class BackgroundWorkerBgHostApiSetup { - static var codec: FlutterStandardMessageCodec { BackgroundWorkerPigeonCodec.shared } - /// Sets up an instance of `BackgroundWorkerBgHostApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: BackgroundWorkerBgHostApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let onInitializedChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.onInitialized\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - onInitializedChannel.setMessageHandler { _, reply in - do { - try api.onInitialized() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - onInitializedChannel.setMessageHandler(nil) - } - let closeChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.close\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - closeChannel.setMessageHandler { _, reply in - do { - try api.close() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - closeChannel.setMessageHandler(nil) - } - } -} -/// Generated protocol from Pigeon that represents Flutter messages that can be called from Swift. -protocol BackgroundWorkerFlutterApiProtocol { - func onIosUpload(isRefresh isRefreshArg: Bool, maxSeconds maxSecondsArg: Int64?, completion: @escaping (Result) -> Void) - func onAndroidUpload(maxMinutes maxMinutesArg: Int64?, completion: @escaping (Result) -> Void) - func cancel(completion: @escaping (Result) -> Void) -} -class BackgroundWorkerFlutterApi: BackgroundWorkerFlutterApiProtocol { - private let binaryMessenger: FlutterBinaryMessenger - private let messageChannelSuffix: String - init(binaryMessenger: FlutterBinaryMessenger, messageChannelSuffix: String = "") { - self.binaryMessenger = binaryMessenger - self.messageChannelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - } - var codec: BackgroundWorkerPigeonCodec { - return BackgroundWorkerPigeonCodec.shared - } - func onIosUpload(isRefresh isRefreshArg: Bool, maxSeconds maxSecondsArg: Int64?, completion: @escaping (Result) -> Void) { - let channelName: String = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload\(messageChannelSuffix)" - let channel = FlutterBasicMessageChannel(name: channelName, binaryMessenger: binaryMessenger, codec: codec) - channel.sendMessage([isRefreshArg, maxSecondsArg] as [Any?]) { response in - guard let listResponse = response as? [Any?] else { - completion(.failure(createConnectionError(withChannelName: channelName))) - return - } - if listResponse.count > 1 { - let code: String = listResponse[0] as! String - let message: String? = nilOrValue(listResponse[1]) - let details: String? = nilOrValue(listResponse[2]) - completion(.failure(PigeonError(code: code, message: message, details: details))) - } else { - completion(.success(())) - } - } - } - func onAndroidUpload(maxMinutes maxMinutesArg: Int64?, completion: @escaping (Result) -> Void) { - let channelName: String = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onAndroidUpload\(messageChannelSuffix)" - let channel = FlutterBasicMessageChannel(name: channelName, binaryMessenger: binaryMessenger, codec: codec) - channel.sendMessage([maxMinutesArg] as [Any?]) { response in - guard let listResponse = response as? [Any?] else { - completion(.failure(createConnectionError(withChannelName: channelName))) - return - } - if listResponse.count > 1 { - let code: String = listResponse[0] as! String - let message: String? = nilOrValue(listResponse[1]) - let details: String? = nilOrValue(listResponse[2]) - completion(.failure(PigeonError(code: code, message: message, details: details))) - } else { - completion(.success(())) - } - } - } - func cancel(completion: @escaping (Result) -> Void) { - let channelName: String = "dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.cancel\(messageChannelSuffix)" - let channel = FlutterBasicMessageChannel(name: channelName, binaryMessenger: binaryMessenger, codec: codec) - channel.sendMessage(nil) { response in - guard let listResponse = response as? [Any?] else { - completion(.failure(createConnectionError(withChannelName: channelName))) - return - } - if listResponse.count > 1 { - let code: String = listResponse[0] as! String - let message: String? = nilOrValue(listResponse[1]) - let details: String? = nilOrValue(listResponse[2]) - completion(.failure(PigeonError(code: code, message: message, details: details))) - } else { - completion(.success(())) - } - } - } -} diff --git a/mobile/ios/Runner/Connectivity/Connectivity.g.swift b/mobile/ios/Runner/Connectivity/Connectivity.g.swift deleted file mode 100644 index c7aff63e10..0000000000 --- a/mobile/ios/Runner/Connectivity/Connectivity.g.swift +++ /dev/null @@ -1,129 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - - -enum NetworkCapability: Int { - case cellular = 0 - case wifi = 1 - case vpn = 2 - case unmetered = 3 -} - -private class ConnectivityPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?) - if let enumResultAsInt = enumResultAsInt { - return NetworkCapability(rawValue: enumResultAsInt) - } - return nil - default: - return super.readValue(ofType: type) - } - } -} - -private class ConnectivityPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? NetworkCapability { - super.writeByte(129) - super.writeValue(value.rawValue) - } else { - super.writeValue(value) - } - } -} - -private class ConnectivityPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return ConnectivityPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return ConnectivityPigeonCodecWriter(data: data) - } -} - -class ConnectivityPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = ConnectivityPigeonCodec(readerWriter: ConnectivityPigeonCodecReaderWriter()) -} - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol ConnectivityApi { - func getCapabilities() throws -> [NetworkCapability] -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class ConnectivityApiSetup { - static var codec: FlutterStandardMessageCodec { ConnectivityPigeonCodec.shared } - /// Sets up an instance of `ConnectivityApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: ConnectivityApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - #if os(iOS) - let taskQueue = binaryMessenger.makeBackgroundTaskQueue?() - #else - let taskQueue: FlutterTaskQueue? = nil - #endif - let getCapabilitiesChannel = taskQueue == nil - ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) - if let api = api { - getCapabilitiesChannel.setMessageHandler { _, reply in - do { - let result = try api.getCapabilities() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getCapabilitiesChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Core/Network.g.swift b/mobile/ios/Runner/Core/Network.g.swift deleted file mode 100644 index 265923d165..0000000000 --- a/mobile/ios/Runner/Core/Network.g.swift +++ /dev/null @@ -1,406 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - -private func doubleEqualsNetwork(_ lhs: Double, _ rhs: Double) -> Bool { - return (lhs.isNaN && rhs.isNaN) || lhs == rhs -} - -private func doubleHashNetwork(_ value: Double, _ hasher: inout Hasher) { - if value.isNaN { - hasher.combine(0x7FF8000000000000) - } else { - // Normalize -0.0 to 0.0 - hasher.combine(value == 0 ? 0 : value) - } -} - -func deepEqualsNetwork(_ lhs: Any?, _ rhs: Any?) -> Bool { - let cleanLhs = nilOrValue(lhs) as Any? - let cleanRhs = nilOrValue(rhs) as Any? - switch (cleanLhs, cleanRhs) { - case (nil, nil): - return true - - case (nil, _), (_, nil): - return false - - case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs: - return true - - case is (Void, Void): - return true - - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !deepEqualsNetwork(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsArray, let rhsArray) as ([Double], [Double]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !doubleEqualsNetwork(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): - guard lhsDictionary.count == rhsDictionary.count else { return false } - for (lhsKey, lhsValue) in lhsDictionary { - var found = false - for (rhsKey, rhsValue) in rhsDictionary { - if deepEqualsNetwork(lhsKey, rhsKey) { - if deepEqualsNetwork(lhsValue, rhsValue) { - found = true - break - } else { - return false - } - } - } - if !found { return false } - } - return true - - case (let lhs as Double, let rhs as Double): - return doubleEqualsNetwork(lhs, rhs) - - case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable): - return lhsHashable == rhsHashable - - default: - return false - } -} - -func deepHashNetwork(value: Any?, hasher: inout Hasher) { - let cleanValue = nilOrValue(value) as Any? - if let cleanValue = cleanValue { - if let doubleValue = cleanValue as? Double { - doubleHashNetwork(doubleValue, &hasher) - } else if let valueList = cleanValue as? [Any?] { - for item in valueList { - deepHashNetwork(value: item, hasher: &hasher) - } - } else if let valueList = cleanValue as? [Double] { - for item in valueList { - doubleHashNetwork(item, &hasher) - } - } else if let valueDict = cleanValue as? [AnyHashable: Any?] { - var result = 0 - for (key, value) in valueDict { - var entryKeyHasher = Hasher() - deepHashNetwork(value: key, hasher: &entryKeyHasher) - var entryValueHasher = Hasher() - deepHashNetwork(value: value, hasher: &entryValueHasher) - result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize()) - } - hasher.combine(result) - } else if let hashableValue = cleanValue as? AnyHashable { - hasher.combine(hashableValue) - } else { - hasher.combine(String(describing: cleanValue)) - } - } else { - hasher.combine(0) - } -} - - -/// Generated class from Pigeon that represents data sent in messages. -struct ClientCertData: Hashable { - var data: FlutterStandardTypedData - var password: String - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> ClientCertData? { - let data = pigeonVar_list[0] as! FlutterStandardTypedData - let password = pigeonVar_list[1] as! String - - return ClientCertData( - data: data, - password: password - ) - } - func toList() -> [Any?] { - return [ - data, - password, - ] - } - static func == (lhs: ClientCertData, rhs: ClientCertData) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsNetwork(lhs.data, rhs.data) && deepEqualsNetwork(lhs.password, rhs.password) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("ClientCertData") - deepHashNetwork(value: data, hasher: &hasher) - deepHashNetwork(value: password, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct ClientCertPrompt: Hashable { - var title: String - var message: String - var cancel: String - var confirm: String - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> ClientCertPrompt? { - let title = pigeonVar_list[0] as! String - let message = pigeonVar_list[1] as! String - let cancel = pigeonVar_list[2] as! String - let confirm = pigeonVar_list[3] as! String - - return ClientCertPrompt( - title: title, - message: message, - cancel: cancel, - confirm: confirm - ) - } - func toList() -> [Any?] { - return [ - title, - message, - cancel, - confirm, - ] - } - static func == (lhs: ClientCertPrompt, rhs: ClientCertPrompt) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsNetwork(lhs.title, rhs.title) && deepEqualsNetwork(lhs.message, rhs.message) && deepEqualsNetwork(lhs.cancel, rhs.cancel) && deepEqualsNetwork(lhs.confirm, rhs.confirm) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("ClientCertPrompt") - deepHashNetwork(value: title, hasher: &hasher) - deepHashNetwork(value: message, hasher: &hasher) - deepHashNetwork(value: cancel, hasher: &hasher) - deepHashNetwork(value: confirm, hasher: &hasher) - } -} - -private class NetworkPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - return ClientCertData.fromList(self.readValue() as! [Any?]) - case 130: - return ClientCertPrompt.fromList(self.readValue() as! [Any?]) - default: - return super.readValue(ofType: type) - } - } -} - -private class NetworkPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? ClientCertData { - super.writeByte(129) - super.writeValue(value.toList()) - } else if let value = value as? ClientCertPrompt { - super.writeByte(130) - super.writeValue(value.toList()) - } else { - super.writeValue(value) - } - } -} - -private class NetworkPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return NetworkPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return NetworkPigeonCodecWriter(data: data) - } -} - -class NetworkPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = NetworkPigeonCodec(readerWriter: NetworkPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol NetworkApi { - func addCertificate(clientData: ClientCertData, completion: @escaping (Result) -> Void) - func selectCertificate(promptText: ClientCertPrompt, completion: @escaping (Result) -> Void) - func removeCertificate(completion: @escaping (Result) -> Void) - func hasCertificate() throws -> Bool - func getClientPointer() throws -> Int64 - func setRequestHeaders(headers: [String: String], serverUrls: [String], token: String?) throws - func getAppGroupId() throws -> String -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class NetworkApiSetup { - static var codec: FlutterStandardMessageCodec { NetworkPigeonCodec.shared } - /// Sets up an instance of `NetworkApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: NetworkApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let addCertificateChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.addCertificate\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - addCertificateChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let clientDataArg = args[0] as! ClientCertData - api.addCertificate(clientData: clientDataArg) { result in - switch result { - case .success: - reply(wrapResult(nil)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - addCertificateChannel.setMessageHandler(nil) - } - let selectCertificateChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.selectCertificate\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - selectCertificateChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let promptTextArg = args[0] as! ClientCertPrompt - api.selectCertificate(promptText: promptTextArg) { result in - switch result { - case .success: - reply(wrapResult(nil)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - selectCertificateChannel.setMessageHandler(nil) - } - let removeCertificateChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.removeCertificate\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - removeCertificateChannel.setMessageHandler { _, reply in - api.removeCertificate { result in - switch result { - case .success: - reply(wrapResult(nil)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - removeCertificateChannel.setMessageHandler(nil) - } - let hasCertificateChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.hasCertificate\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - hasCertificateChannel.setMessageHandler { _, reply in - do { - let result = try api.hasCertificate() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - hasCertificateChannel.setMessageHandler(nil) - } - let getClientPointerChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.getClientPointer\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getClientPointerChannel.setMessageHandler { _, reply in - do { - let result = try api.getClientPointer() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getClientPointerChannel.setMessageHandler(nil) - } - let setRequestHeadersChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.setRequestHeaders\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - setRequestHeadersChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let headersArg = args[0] as! [String: String] - let serverUrlsArg = args[1] as! [String] - let tokenArg: String? = nilOrValue(args[2]) - do { - try api.setRequestHeaders(headers: headersArg, serverUrls: serverUrlsArg, token: tokenArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - setRequestHeadersChannel.setMessageHandler(nil) - } - let getAppGroupIdChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NetworkApi.getAppGroupId\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getAppGroupIdChannel.setMessageHandler { _, reply in - do { - let result = try api.getAppGroupId() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getAppGroupIdChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Images/LocalImages.g.swift b/mobile/ios/Runner/Images/LocalImages.g.swift deleted file mode 100644 index b9324260be..0000000000 --- a/mobile/ios/Runner/Images/LocalImages.g.swift +++ /dev/null @@ -1,139 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - - -private class LocalImagesPigeonCodecReader: FlutterStandardReader { -} - -private class LocalImagesPigeonCodecWriter: FlutterStandardWriter { -} - -private class LocalImagesPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return LocalImagesPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return LocalImagesPigeonCodecWriter(data: data) - } -} - -class LocalImagesPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = LocalImagesPigeonCodec(readerWriter: LocalImagesPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol LocalImageApi { - func requestImage(assetId: String, requestId: Int64, width: Int64, height: Int64, isVideo: Bool, preferEncoded: Bool, completion: @escaping (Result<[String: Int64]?, Error>) -> Void) - func cancelRequest(requestId: Int64) throws - func getThumbhash(thumbhash: String, completion: @escaping (Result<[String: Int64], Error>) -> Void) -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class LocalImageApiSetup { - static var codec: FlutterStandardMessageCodec { LocalImagesPigeonCodec.shared } - /// Sets up an instance of `LocalImageApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: LocalImageApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let requestImageChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.LocalImageApi.requestImage\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - requestImageChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let assetIdArg = args[0] as! String - let requestIdArg = args[1] as! Int64 - let widthArg = args[2] as! Int64 - let heightArg = args[3] as! Int64 - let isVideoArg = args[4] as! Bool - let preferEncodedArg = args[5] as! Bool - api.requestImage(assetId: assetIdArg, requestId: requestIdArg, width: widthArg, height: heightArg, isVideo: isVideoArg, preferEncoded: preferEncodedArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - requestImageChannel.setMessageHandler(nil) - } - let cancelRequestChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.LocalImageApi.cancelRequest\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - cancelRequestChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let requestIdArg = args[0] as! Int64 - do { - try api.cancelRequest(requestId: requestIdArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - cancelRequestChannel.setMessageHandler(nil) - } - let getThumbhashChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.LocalImageApi.getThumbhash\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getThumbhashChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let thumbhashArg = args[0] as! String - api.getThumbhash(thumbhash: thumbhashArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getThumbhashChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Images/RemoteImages.g.swift b/mobile/ios/Runner/Images/RemoteImages.g.swift deleted file mode 100644 index 12eaaeec60..0000000000 --- a/mobile/ios/Runner/Images/RemoteImages.g.swift +++ /dev/null @@ -1,134 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - - -private class RemoteImagesPigeonCodecReader: FlutterStandardReader { -} - -private class RemoteImagesPigeonCodecWriter: FlutterStandardWriter { -} - -private class RemoteImagesPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return RemoteImagesPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return RemoteImagesPigeonCodecWriter(data: data) - } -} - -class RemoteImagesPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = RemoteImagesPigeonCodec(readerWriter: RemoteImagesPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol RemoteImageApi { - func requestImage(url: String, requestId: Int64, preferEncoded: Bool, completion: @escaping (Result<[String: Int64]?, Error>) -> Void) - func cancelRequest(requestId: Int64) throws - func clearCache(completion: @escaping (Result) -> Void) -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class RemoteImageApiSetup { - static var codec: FlutterStandardMessageCodec { RemoteImagesPigeonCodec.shared } - /// Sets up an instance of `RemoteImageApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: RemoteImageApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let requestImageChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.RemoteImageApi.requestImage\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - requestImageChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let urlArg = args[0] as! String - let requestIdArg = args[1] as! Int64 - let preferEncodedArg = args[2] as! Bool - api.requestImage(url: urlArg, requestId: requestIdArg, preferEncoded: preferEncodedArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - requestImageChannel.setMessageHandler(nil) - } - let cancelRequestChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.RemoteImageApi.cancelRequest\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - cancelRequestChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let requestIdArg = args[0] as! Int64 - do { - try api.cancelRequest(requestId: requestIdArg) - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - cancelRequestChannel.setMessageHandler(nil) - } - let clearCacheChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.RemoteImageApi.clearCache\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - clearCacheChannel.setMessageHandler { _, reply in - api.clearCache { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - clearCacheChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Permission/PermissionApi.g.swift b/mobile/ios/Runner/Permission/PermissionApi.g.swift deleted file mode 100644 index b9c116f0c5..0000000000 --- a/mobile/ios/Runner/Permission/PermissionApi.g.swift +++ /dev/null @@ -1,168 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - - -enum PermissionStatus: Int { - case granted = 0 - case denied = 1 - case permanentlyDenied = 2 -} - -private class PermissionApiPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?) - if let enumResultAsInt = enumResultAsInt { - return PermissionStatus(rawValue: enumResultAsInt) - } - return nil - default: - return super.readValue(ofType: type) - } - } -} - -private class PermissionApiPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? PermissionStatus { - super.writeByte(129) - super.writeValue(value.rawValue) - } else { - super.writeValue(value) - } - } -} - -private class PermissionApiPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return PermissionApiPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return PermissionApiPigeonCodecWriter(data: data) - } -} - -class PermissionApiPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = PermissionApiPigeonCodec(readerWriter: PermissionApiPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol PermissionApi { - func isIgnoringBatteryOptimizations() throws -> PermissionStatus - func hasManageMediaPermission() throws -> Bool - func requestManageMediaPermission(completion: @escaping (Result) -> Void) - func manageMediaPermission(completion: @escaping (Result) -> Void) -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class PermissionApiSetup { - static var codec: FlutterStandardMessageCodec { PermissionApiPigeonCodec.shared } - /// Sets up an instance of `PermissionApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: PermissionApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - let isIgnoringBatteryOptimizationsChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.PermissionApi.isIgnoringBatteryOptimizations\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - isIgnoringBatteryOptimizationsChannel.setMessageHandler { _, reply in - do { - let result = try api.isIgnoringBatteryOptimizations() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - isIgnoringBatteryOptimizationsChannel.setMessageHandler(nil) - } - let hasManageMediaPermissionChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.PermissionApi.hasManageMediaPermission\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - hasManageMediaPermissionChannel.setMessageHandler { _, reply in - do { - let result = try api.hasManageMediaPermission() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - hasManageMediaPermissionChannel.setMessageHandler(nil) - } - let requestManageMediaPermissionChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.PermissionApi.requestManageMediaPermission\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - requestManageMediaPermissionChannel.setMessageHandler { _, reply in - api.requestManageMediaPermission { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - requestManageMediaPermissionChannel.setMessageHandler(nil) - } - let manageMediaPermissionChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.PermissionApi.manageMediaPermission\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - manageMediaPermissionChannel.setMessageHandler { _, reply in - api.manageMediaPermission { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - manageMediaPermissionChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/ios/Runner/Sync/Messages.g.swift b/mobile/ios/Runner/Sync/Messages.g.swift deleted file mode 100644 index a752785c5b..0000000000 --- a/mobile/ios/Runner/Sync/Messages.g.swift +++ /dev/null @@ -1,777 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -import Foundation - -#if os(iOS) - import Flutter -#elseif os(macOS) - import FlutterMacOS -#else - #error("Unsupported platform.") -#endif - -/// Error class for passing custom error details to Dart side. -final class PigeonError: Error { - let code: String - let message: String? - let details: Sendable? - - init(code: String, message: String?, details: Sendable?) { - self.code = code - self.message = message - self.details = details - } - - var localizedDescription: String { - return - "PigeonError(code: \(code), message: \(message ?? ""), details: \(details ?? "")" - } -} - -private func wrapResult(_ result: Any?) -> [Any?] { - return [result] -} - -private func wrapError(_ error: Any) -> [Any?] { - if let pigeonError = error as? PigeonError { - return [ - pigeonError.code, - pigeonError.message, - pigeonError.details, - ] - } - if let flutterError = error as? FlutterError { - return [ - flutterError.code, - flutterError.message, - flutterError.details, - ] - } - return [ - "\(error)", - "\(Swift.type(of: error))", - "Stacktrace: \(Thread.callStackSymbols)", - ] -} - -private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil -} - -private func nilOrValue(_ value: Any?) -> T? { - if value is NSNull { return nil } - return value as! T? -} - -private func doubleEqualsMessages(_ lhs: Double, _ rhs: Double) -> Bool { - return (lhs.isNaN && rhs.isNaN) || lhs == rhs -} - -private func doubleHashMessages(_ value: Double, _ hasher: inout Hasher) { - if value.isNaN { - hasher.combine(0x7FF8000000000000) - } else { - // Normalize -0.0 to 0.0 - hasher.combine(value == 0 ? 0 : value) - } -} - -func deepEqualsMessages(_ lhs: Any?, _ rhs: Any?) -> Bool { - let cleanLhs = nilOrValue(lhs) as Any? - let cleanRhs = nilOrValue(rhs) as Any? - switch (cleanLhs, cleanRhs) { - case (nil, nil): - return true - - case (nil, _), (_, nil): - return false - - case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs: - return true - - case is (Void, Void): - return true - - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !deepEqualsMessages(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsArray, let rhsArray) as ([Double], [Double]): - guard lhsArray.count == rhsArray.count else { return false } - for (index, element) in lhsArray.enumerated() { - if !doubleEqualsMessages(element, rhsArray[index]) { - return false - } - } - return true - - case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): - guard lhsDictionary.count == rhsDictionary.count else { return false } - for (lhsKey, lhsValue) in lhsDictionary { - var found = false - for (rhsKey, rhsValue) in rhsDictionary { - if deepEqualsMessages(lhsKey, rhsKey) { - if deepEqualsMessages(lhsValue, rhsValue) { - found = true - break - } else { - return false - } - } - } - if !found { return false } - } - return true - - case (let lhs as Double, let rhs as Double): - return doubleEqualsMessages(lhs, rhs) - - case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable): - return lhsHashable == rhsHashable - - default: - return false - } -} - -func deepHashMessages(value: Any?, hasher: inout Hasher) { - let cleanValue = nilOrValue(value) as Any? - if let cleanValue = cleanValue { - if let doubleValue = cleanValue as? Double { - doubleHashMessages(doubleValue, &hasher) - } else if let valueList = cleanValue as? [Any?] { - for item in valueList { - deepHashMessages(value: item, hasher: &hasher) - } - } else if let valueList = cleanValue as? [Double] { - for item in valueList { - doubleHashMessages(item, &hasher) - } - } else if let valueDict = cleanValue as? [AnyHashable: Any?] { - var result = 0 - for (key, value) in valueDict { - var entryKeyHasher = Hasher() - deepHashMessages(value: key, hasher: &entryKeyHasher) - var entryValueHasher = Hasher() - deepHashMessages(value: value, hasher: &entryValueHasher) - result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize()) - } - hasher.combine(result) - } else if let hashableValue = cleanValue as? AnyHashable { - hasher.combine(hashableValue) - } else { - hasher.combine(String(describing: cleanValue)) - } - } else { - hasher.combine(0) - } -} - - -enum PlatformAssetPlaybackStyle: Int { - case unknown = 0 - case image = 1 - case video = 2 - case imageAnimated = 3 - case livePhoto = 4 - case videoLooping = 5 -} - -/// Generated class from Pigeon that represents data sent in messages. -struct PlatformAsset: Hashable { - var id: String - var name: String - var type: Int64 - var createdAt: Int64? = nil - var updatedAt: Int64? = nil - var width: Int64? = nil - var height: Int64? = nil - var durationMs: Int64 - var orientation: Int64 - var isFavorite: Bool - var adjustmentTime: Int64? = nil - var latitude: Double? = nil - var longitude: Double? = nil - var playbackStyle: PlatformAssetPlaybackStyle - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> PlatformAsset? { - let id = pigeonVar_list[0] as! String - let name = pigeonVar_list[1] as! String - let type = pigeonVar_list[2] as! Int64 - let createdAt: Int64? = nilOrValue(pigeonVar_list[3]) - let updatedAt: Int64? = nilOrValue(pigeonVar_list[4]) - let width: Int64? = nilOrValue(pigeonVar_list[5]) - let height: Int64? = nilOrValue(pigeonVar_list[6]) - let durationMs = pigeonVar_list[7] as! Int64 - let orientation = pigeonVar_list[8] as! Int64 - let isFavorite = pigeonVar_list[9] as! Bool - let adjustmentTime: Int64? = nilOrValue(pigeonVar_list[10]) - let latitude: Double? = nilOrValue(pigeonVar_list[11]) - let longitude: Double? = nilOrValue(pigeonVar_list[12]) - let playbackStyle = pigeonVar_list[13] as! PlatformAssetPlaybackStyle - - return PlatformAsset( - id: id, - name: name, - type: type, - createdAt: createdAt, - updatedAt: updatedAt, - width: width, - height: height, - durationMs: durationMs, - orientation: orientation, - isFavorite: isFavorite, - adjustmentTime: adjustmentTime, - latitude: latitude, - longitude: longitude, - playbackStyle: playbackStyle - ) - } - func toList() -> [Any?] { - return [ - id, - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - orientation, - isFavorite, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ] - } - static func == (lhs: PlatformAsset, rhs: PlatformAsset) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.type, rhs.type) && deepEqualsMessages(lhs.createdAt, rhs.createdAt) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.width, rhs.width) && deepEqualsMessages(lhs.height, rhs.height) && deepEqualsMessages(lhs.durationMs, rhs.durationMs) && deepEqualsMessages(lhs.orientation, rhs.orientation) && deepEqualsMessages(lhs.isFavorite, rhs.isFavorite) && deepEqualsMessages(lhs.adjustmentTime, rhs.adjustmentTime) && deepEqualsMessages(lhs.latitude, rhs.latitude) && deepEqualsMessages(lhs.longitude, rhs.longitude) && deepEqualsMessages(lhs.playbackStyle, rhs.playbackStyle) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("PlatformAsset") - deepHashMessages(value: id, hasher: &hasher) - deepHashMessages(value: name, hasher: &hasher) - deepHashMessages(value: type, hasher: &hasher) - deepHashMessages(value: createdAt, hasher: &hasher) - deepHashMessages(value: updatedAt, hasher: &hasher) - deepHashMessages(value: width, hasher: &hasher) - deepHashMessages(value: height, hasher: &hasher) - deepHashMessages(value: durationMs, hasher: &hasher) - deepHashMessages(value: orientation, hasher: &hasher) - deepHashMessages(value: isFavorite, hasher: &hasher) - deepHashMessages(value: adjustmentTime, hasher: &hasher) - deepHashMessages(value: latitude, hasher: &hasher) - deepHashMessages(value: longitude, hasher: &hasher) - deepHashMessages(value: playbackStyle, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct PlatformAlbum: Hashable { - var id: String - var name: String - var updatedAt: Int64? = nil - var isCloud: Bool - var assetCount: Int64 - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> PlatformAlbum? { - let id = pigeonVar_list[0] as! String - let name = pigeonVar_list[1] as! String - let updatedAt: Int64? = nilOrValue(pigeonVar_list[2]) - let isCloud = pigeonVar_list[3] as! Bool - let assetCount = pigeonVar_list[4] as! Int64 - - return PlatformAlbum( - id: id, - name: name, - updatedAt: updatedAt, - isCloud: isCloud, - assetCount: assetCount - ) - } - func toList() -> [Any?] { - return [ - id, - name, - updatedAt, - isCloud, - assetCount, - ] - } - static func == (lhs: PlatformAlbum, rhs: PlatformAlbum) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.isCloud, rhs.isCloud) && deepEqualsMessages(lhs.assetCount, rhs.assetCount) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("PlatformAlbum") - deepHashMessages(value: id, hasher: &hasher) - deepHashMessages(value: name, hasher: &hasher) - deepHashMessages(value: updatedAt, hasher: &hasher) - deepHashMessages(value: isCloud, hasher: &hasher) - deepHashMessages(value: assetCount, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct SyncDelta: Hashable { - var hasChanges: Bool - var updates: [PlatformAsset] - var deletes: [String] - var assetAlbums: [String: [String]] - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> SyncDelta? { - let hasChanges = pigeonVar_list[0] as! Bool - let updates = pigeonVar_list[1] as! [PlatformAsset] - let deletes = pigeonVar_list[2] as! [String] - let assetAlbums = pigeonVar_list[3] as! [String: [String]] - - return SyncDelta( - hasChanges: hasChanges, - updates: updates, - deletes: deletes, - assetAlbums: assetAlbums - ) - } - func toList() -> [Any?] { - return [ - hasChanges, - updates, - deletes, - assetAlbums, - ] - } - static func == (lhs: SyncDelta, rhs: SyncDelta) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.hasChanges, rhs.hasChanges) && deepEqualsMessages(lhs.updates, rhs.updates) && deepEqualsMessages(lhs.deletes, rhs.deletes) && deepEqualsMessages(lhs.assetAlbums, rhs.assetAlbums) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("SyncDelta") - deepHashMessages(value: hasChanges, hasher: &hasher) - deepHashMessages(value: updates, hasher: &hasher) - deepHashMessages(value: deletes, hasher: &hasher) - deepHashMessages(value: assetAlbums, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct HashResult: Hashable { - var assetId: String - var error: String? = nil - var hash: String? = nil - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> HashResult? { - let assetId = pigeonVar_list[0] as! String - let error: String? = nilOrValue(pigeonVar_list[1]) - let hash: String? = nilOrValue(pigeonVar_list[2]) - - return HashResult( - assetId: assetId, - error: error, - hash: hash - ) - } - func toList() -> [Any?] { - return [ - assetId, - error, - hash, - ] - } - static func == (lhs: HashResult, rhs: HashResult) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.assetId, rhs.assetId) && deepEqualsMessages(lhs.error, rhs.error) && deepEqualsMessages(lhs.hash, rhs.hash) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("HashResult") - deepHashMessages(value: assetId, hasher: &hasher) - deepHashMessages(value: error, hasher: &hasher) - deepHashMessages(value: hash, hasher: &hasher) - } -} - -/// Generated class from Pigeon that represents data sent in messages. -struct CloudIdResult: Hashable { - var assetId: String - var error: String? = nil - var cloudId: String? = nil - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> CloudIdResult? { - let assetId = pigeonVar_list[0] as! String - let error: String? = nilOrValue(pigeonVar_list[1]) - let cloudId: String? = nilOrValue(pigeonVar_list[2]) - - return CloudIdResult( - assetId: assetId, - error: error, - cloudId: cloudId - ) - } - func toList() -> [Any?] { - return [ - assetId, - error, - cloudId, - ] - } - static func == (lhs: CloudIdResult, rhs: CloudIdResult) -> Bool { - if Swift.type(of: lhs) != Swift.type(of: rhs) { - return false - } - return deepEqualsMessages(lhs.assetId, rhs.assetId) && deepEqualsMessages(lhs.error, rhs.error) && deepEqualsMessages(lhs.cloudId, rhs.cloudId) - } - - func hash(into hasher: inout Hasher) { - hasher.combine("CloudIdResult") - deepHashMessages(value: assetId, hasher: &hasher) - deepHashMessages(value: error, hasher: &hasher) - deepHashMessages(value: cloudId, hasher: &hasher) - } -} - -private class MessagesPigeonCodecReader: FlutterStandardReader { - override func readValue(ofType type: UInt8) -> Any? { - switch type { - case 129: - let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?) - if let enumResultAsInt = enumResultAsInt { - return PlatformAssetPlaybackStyle(rawValue: enumResultAsInt) - } - return nil - case 130: - return PlatformAsset.fromList(self.readValue() as! [Any?]) - case 131: - return PlatformAlbum.fromList(self.readValue() as! [Any?]) - case 132: - return SyncDelta.fromList(self.readValue() as! [Any?]) - case 133: - return HashResult.fromList(self.readValue() as! [Any?]) - case 134: - return CloudIdResult.fromList(self.readValue() as! [Any?]) - default: - return super.readValue(ofType: type) - } - } -} - -private class MessagesPigeonCodecWriter: FlutterStandardWriter { - override func writeValue(_ value: Any) { - if let value = value as? PlatformAssetPlaybackStyle { - super.writeByte(129) - super.writeValue(value.rawValue) - } else if let value = value as? PlatformAsset { - super.writeByte(130) - super.writeValue(value.toList()) - } else if let value = value as? PlatformAlbum { - super.writeByte(131) - super.writeValue(value.toList()) - } else if let value = value as? SyncDelta { - super.writeByte(132) - super.writeValue(value.toList()) - } else if let value = value as? HashResult { - super.writeByte(133) - super.writeValue(value.toList()) - } else if let value = value as? CloudIdResult { - super.writeByte(134) - super.writeValue(value.toList()) - } else { - super.writeValue(value) - } - } -} - -private class MessagesPigeonCodecReaderWriter: FlutterStandardReaderWriter { - override func reader(with data: Data) -> FlutterStandardReader { - return MessagesPigeonCodecReader(data: data) - } - - override func writer(with data: NSMutableData) -> FlutterStandardWriter { - return MessagesPigeonCodecWriter(data: data) - } -} - -class MessagesPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable { - static let shared = MessagesPigeonCodec(readerWriter: MessagesPigeonCodecReaderWriter()) -} - - -/// Generated protocol from Pigeon that represents a handler of messages from Flutter. -protocol NativeSyncApi { - func shouldFullSync(completion: @escaping (Result) -> Void) - func getMediaChanges(completion: @escaping (Result) -> Void) - func checkpointSync() throws - func clearSyncCheckpoint() throws - func getAssetIdsForAlbum(albumId: String, completion: @escaping (Result<[String], Error>) -> Void) - func getAlbums(completion: @escaping (Result<[PlatformAlbum], Error>) -> Void) - func getAssetsCountSince(albumId: String, timestamp: Int64) throws -> Int64 - func getAssetsForAlbum(albumId: String, updatedTimeCond: Int64?, completion: @escaping (Result<[PlatformAsset], Error>) -> Void) - func hashAssets(assetIds: [String], allowNetworkAccess: Bool, completion: @escaping (Result<[HashResult], Error>) -> Void) - func cancelHashing() throws - func cancelSync() throws - func getTrashedAssets() throws -> [String: [PlatformAsset]] - func restoreFromTrashById(mediaId: String, type: Int64, completion: @escaping (Result) -> Void) - func getCloudIdForAssetIds(assetIds: [String]) throws -> [CloudIdResult] -} - -/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. -class NativeSyncApiSetup { - static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared } - /// Sets up an instance of `NativeSyncApi` to handle messages through the `binaryMessenger`. - static func setUp(binaryMessenger: FlutterBinaryMessenger, api: NativeSyncApi?, messageChannelSuffix: String = "") { - let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : "" - #if os(iOS) - let taskQueue = binaryMessenger.makeBackgroundTaskQueue?() - #else - let taskQueue: FlutterTaskQueue? = nil - #endif - let shouldFullSyncChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.shouldFullSync\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - shouldFullSyncChannel.setMessageHandler { _, reply in - api.shouldFullSync { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - shouldFullSyncChannel.setMessageHandler(nil) - } - let getMediaChangesChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getMediaChanges\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getMediaChangesChannel.setMessageHandler { _, reply in - api.getMediaChanges { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getMediaChangesChannel.setMessageHandler(nil) - } - let checkpointSyncChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.checkpointSync\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - checkpointSyncChannel.setMessageHandler { _, reply in - do { - try api.checkpointSync() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - checkpointSyncChannel.setMessageHandler(nil) - } - let clearSyncCheckpointChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.clearSyncCheckpoint\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - clearSyncCheckpointChannel.setMessageHandler { _, reply in - do { - try api.clearSyncCheckpoint() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - clearSyncCheckpointChannel.setMessageHandler(nil) - } - let getAssetIdsForAlbumChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetIdsForAlbum\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getAssetIdsForAlbumChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let albumIdArg = args[0] as! String - api.getAssetIdsForAlbum(albumId: albumIdArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getAssetIdsForAlbumChannel.setMessageHandler(nil) - } - let getAlbumsChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAlbums\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getAlbumsChannel.setMessageHandler { _, reply in - api.getAlbums { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getAlbumsChannel.setMessageHandler(nil) - } - let getAssetsCountSinceChannel = taskQueue == nil - ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) - if let api = api { - getAssetsCountSinceChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let albumIdArg = args[0] as! String - let timestampArg = args[1] as! Int64 - do { - let result = try api.getAssetsCountSince(albumId: albumIdArg, timestamp: timestampArg) - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getAssetsCountSinceChannel.setMessageHandler(nil) - } - let getAssetsForAlbumChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsForAlbum\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - getAssetsForAlbumChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let albumIdArg = args[0] as! String - let updatedTimeCondArg: Int64? = nilOrValue(args[1]) - api.getAssetsForAlbum(albumId: albumIdArg, updatedTimeCond: updatedTimeCondArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - getAssetsForAlbumChannel.setMessageHandler(nil) - } - let hashAssetsChannel = taskQueue == nil - ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) - if let api = api { - hashAssetsChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let assetIdsArg = args[0] as! [String] - let allowNetworkAccessArg = args[1] as! Bool - api.hashAssets(assetIds: assetIdsArg, allowNetworkAccess: allowNetworkAccessArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - hashAssetsChannel.setMessageHandler(nil) - } - let cancelHashingChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelHashing\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - cancelHashingChannel.setMessageHandler { _, reply in - do { - try api.cancelHashing() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - cancelHashingChannel.setMessageHandler(nil) - } - let cancelSyncChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelSync\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - cancelSyncChannel.setMessageHandler { _, reply in - do { - try api.cancelSync() - reply(wrapResult(nil)) - } catch { - reply(wrapError(error)) - } - } - } else { - cancelSyncChannel.setMessageHandler(nil) - } - let getTrashedAssetsChannel = taskQueue == nil - ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) - if let api = api { - getTrashedAssetsChannel.setMessageHandler { _, reply in - do { - let result = try api.getTrashedAssets() - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getTrashedAssetsChannel.setMessageHandler(nil) - } - let restoreFromTrashByIdChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.restoreFromTrashById\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - if let api = api { - restoreFromTrashByIdChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let mediaIdArg = args[0] as! String - let typeArg = args[1] as! Int64 - api.restoreFromTrashById(mediaId: mediaIdArg, type: typeArg) { result in - switch result { - case .success(let res): - reply(wrapResult(res)) - case .failure(let error): - reply(wrapError(error)) - } - } - } - } else { - restoreFromTrashByIdChannel.setMessageHandler(nil) - } - let getCloudIdForAssetIdsChannel = taskQueue == nil - ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) - : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) - if let api = api { - getCloudIdForAssetIdsChannel.setMessageHandler { message, reply in - let args = message as! [Any?] - let assetIdsArg = args[0] as! [String] - do { - let result = try api.getCloudIdForAssetIds(assetIds: assetIdsArg) - reply(wrapResult(result)) - } catch { - reply(wrapError(error)) - } - } - } else { - getCloudIdForAssetIdsChannel.setMessageHandler(nil) - } - } -} diff --git a/mobile/lib/platform/background_worker_api.g.dart b/mobile/lib/platform/background_worker_api.g.dart deleted file mode 100644 index 34f4c41b48..0000000000 --- a/mobile/lib/platform/background_worker_api.g.dart +++ /dev/null @@ -1,365 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} - -bool _deepEquals(Object? a, Object? b) { - if (identical(a, b)) { - return true; - } - if (a is double && b is double) { - if (a.isNaN && b.isNaN) { - return true; - } - return a == b; - } - if (a is List && b is List) { - return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - if (a.length != b.length) { - return false; - } - for (final MapEntry entryA in a.entries) { - bool found = false; - for (final MapEntry entryB in b.entries) { - if (_deepEquals(entryA.key, entryB.key)) { - if (_deepEquals(entryA.value, entryB.value)) { - found = true; - break; - } else { - return false; - } - } - } - if (!found) { - return false; - } - } - return true; - } - return a == b; -} - -int _deepHash(Object? value) { - if (value is List) { - return Object.hashAll(value.map(_deepHash)); - } - if (value is Map) { - int result = 0; - for (final MapEntry entry in value.entries) { - result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); - } - return result; - } - if (value is double && value.isNaN) { - // Normalize NaN to a consistent hash. - return 0x7FF8000000000000.hashCode; - } - if (value is double && value == 0.0) { - // Normalize -0.0 to 0.0 so they have the same hash code. - return 0.0.hashCode; - } - return value.hashCode; -} - -class BackgroundWorkerSettings { - BackgroundWorkerSettings({required this.requiresCharging, required this.minimumDelaySeconds}); - - bool requiresCharging; - - int minimumDelaySeconds; - - List _toList() { - return [requiresCharging, minimumDelaySeconds]; - } - - Object encode() { - return _toList(); - } - - static BackgroundWorkerSettings decode(Object result) { - result as List; - return BackgroundWorkerSettings(requiresCharging: result[0]! as bool, minimumDelaySeconds: result[1]! as int); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! BackgroundWorkerSettings || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(requiresCharging, other.requiresCharging) && - _deepEquals(minimumDelaySeconds, other.minimumDelaySeconds); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is BackgroundWorkerSettings) { - buffer.putUint8(129); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - return BackgroundWorkerSettings.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -class BackgroundWorkerFgHostApi { - /// Constructor for [BackgroundWorkerFgHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - BackgroundWorkerFgHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future enable() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.enable$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future saveNotificationMessage(String title, String body) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.saveNotificationMessage$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([title, body]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future configure(BackgroundWorkerSettings settings) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.configure$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([settings]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future disable() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.disable$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } -} - -class BackgroundWorkerBgHostApi { - /// Constructor for [BackgroundWorkerBgHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - BackgroundWorkerBgHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future onInitialized() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.onInitialized$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future close() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.close$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } -} - -abstract class BackgroundWorkerFlutterApi { - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - Future onIosUpload(bool isRefresh, int? maxSeconds); - - Future onAndroidUpload(int? maxMinutes); - - Future cancel(); - - static void setUp( - BackgroundWorkerFlutterApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - final List args = message! as List; - final bool arg_isRefresh = args[0]! as bool; - final int? arg_maxSeconds = args[1] as int?; - try { - await api.onIosUpload(arg_isRefresh, arg_maxSeconds); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString()), - ); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onAndroidUpload$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - final List args = message! as List; - final int? arg_maxMinutes = args[0] as int?; - try { - await api.onAndroidUpload(arg_maxMinutes); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString()), - ); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.cancel$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - await api.cancel(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString()), - ); - } - }); - } - } - } -} diff --git a/mobile/lib/platform/background_worker_lock_api.g.dart b/mobile/lib/platform/background_worker_lock_api.g.dart deleted file mode 100644 index c7836c4c69..0000000000 --- a/mobile/lib/platform/background_worker_lock_api.g.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - default: - return super.readValueOfType(type, buffer); - } - } -} - -class BackgroundWorkerLockApi { - /// Constructor for [BackgroundWorkerLockApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - BackgroundWorkerLockApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future lock() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.lock$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future unlock() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.unlock$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } -} diff --git a/mobile/lib/platform/connectivity_api.g.dart b/mobile/lib/platform/connectivity_api.g.dart deleted file mode 100644 index 8cf8979532..0000000000 --- a/mobile/lib/platform/connectivity_api.g.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -enum NetworkCapability { cellular, wifi, vpn, unmetered } - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is NetworkCapability) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : NetworkCapability.values[value]; - default: - return super.readValueOfType(type, buffer); - } - } -} - -class ConnectivityApi { - /// Constructor for [ConnectivityApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - ConnectivityApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future> getCapabilities() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } -} diff --git a/mobile/lib/platform/local_image_api.g.dart b/mobile/lib/platform/local_image_api.g.dart deleted file mode 100644 index fbd0876735..0000000000 --- a/mobile/lib/platform/local_image_api.g.dart +++ /dev/null @@ -1,128 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - default: - return super.readValueOfType(type, buffer); - } - } -} - -class LocalImageApi { - /// Constructor for [LocalImageApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - LocalImageApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future?> requestImage( - String assetId, { - required int requestId, - required int width, - required int height, - required bool isVideo, - required bool preferEncoded, - }) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.LocalImageApi.requestImage$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([ - assetId, - requestId, - width, - height, - isVideo, - preferEncoded, - ]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: true, - ); - return (pigeonVar_replyValue as Map?)?.cast(); - } - - Future cancelRequest(int requestId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.LocalImageApi.cancelRequest$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([requestId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future> getThumbhash(String thumbhash) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.LocalImageApi.getThumbhash$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([thumbhash]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as Map).cast(); - } -} diff --git a/mobile/lib/platform/native_sync_api.g.dart b/mobile/lib/platform/native_sync_api.g.dart deleted file mode 100644 index bd979af87b..0000000000 --- a/mobile/lib/platform/native_sync_api.g.dart +++ /dev/null @@ -1,708 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -bool _deepEquals(Object? a, Object? b) { - if (identical(a, b)) { - return true; - } - if (a is double && b is double) { - if (a.isNaN && b.isNaN) { - return true; - } - return a == b; - } - if (a is List && b is List) { - return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - if (a.length != b.length) { - return false; - } - for (final MapEntry entryA in a.entries) { - bool found = false; - for (final MapEntry entryB in b.entries) { - if (_deepEquals(entryA.key, entryB.key)) { - if (_deepEquals(entryA.value, entryB.value)) { - found = true; - break; - } else { - return false; - } - } - } - if (!found) { - return false; - } - } - return true; - } - return a == b; -} - -int _deepHash(Object? value) { - if (value is List) { - return Object.hashAll(value.map(_deepHash)); - } - if (value is Map) { - int result = 0; - for (final MapEntry entry in value.entries) { - result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); - } - return result; - } - if (value is double && value.isNaN) { - // Normalize NaN to a consistent hash. - return 0x7FF8000000000000.hashCode; - } - if (value is double && value == 0.0) { - // Normalize -0.0 to 0.0 so they have the same hash code. - return 0.0.hashCode; - } - return value.hashCode; -} - -enum PlatformAssetPlaybackStyle { unknown, image, video, imageAnimated, livePhoto, videoLooping } - -class PlatformAsset { - PlatformAsset({ - required this.id, - required this.name, - required this.type, - this.createdAt, - this.updatedAt, - this.width, - this.height, - required this.durationMs, - required this.orientation, - required this.isFavorite, - this.adjustmentTime, - this.latitude, - this.longitude, - required this.playbackStyle, - }); - - String id; - - String name; - - int type; - - int? createdAt; - - int? updatedAt; - - int? width; - - int? height; - - int durationMs; - - int orientation; - - bool isFavorite; - - int? adjustmentTime; - - double? latitude; - - double? longitude; - - PlatformAssetPlaybackStyle playbackStyle; - - List _toList() { - return [ - id, - name, - type, - createdAt, - updatedAt, - width, - height, - durationMs, - orientation, - isFavorite, - adjustmentTime, - latitude, - longitude, - playbackStyle, - ]; - } - - Object encode() { - return _toList(); - } - - static PlatformAsset decode(Object result) { - result as List; - return PlatformAsset( - id: result[0]! as String, - name: result[1]! as String, - type: result[2]! as int, - createdAt: result[3] as int?, - updatedAt: result[4] as int?, - width: result[5] as int?, - height: result[6] as int?, - durationMs: result[7]! as int, - orientation: result[8]! as int, - isFavorite: result[9]! as bool, - adjustmentTime: result[10] as int?, - latitude: result[11] as double?, - longitude: result[12] as double?, - playbackStyle: result[13]! as PlatformAssetPlaybackStyle, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformAsset || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(id, other.id) && - _deepEquals(name, other.name) && - _deepEquals(type, other.type) && - _deepEquals(createdAt, other.createdAt) && - _deepEquals(updatedAt, other.updatedAt) && - _deepEquals(width, other.width) && - _deepEquals(height, other.height) && - _deepEquals(durationMs, other.durationMs) && - _deepEquals(orientation, other.orientation) && - _deepEquals(isFavorite, other.isFavorite) && - _deepEquals(adjustmentTime, other.adjustmentTime) && - _deepEquals(latitude, other.latitude) && - _deepEquals(longitude, other.longitude) && - _deepEquals(playbackStyle, other.playbackStyle); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class PlatformAlbum { - PlatformAlbum({ - required this.id, - required this.name, - this.updatedAt, - required this.isCloud, - required this.assetCount, - }); - - String id; - - String name; - - int? updatedAt; - - bool isCloud; - - int assetCount; - - List _toList() { - return [id, name, updatedAt, isCloud, assetCount]; - } - - Object encode() { - return _toList(); - } - - static PlatformAlbum decode(Object result) { - result as List; - return PlatformAlbum( - id: result[0]! as String, - name: result[1]! as String, - updatedAt: result[2] as int?, - isCloud: result[3]! as bool, - assetCount: result[4]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformAlbum || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(id, other.id) && - _deepEquals(name, other.name) && - _deepEquals(updatedAt, other.updatedAt) && - _deepEquals(isCloud, other.isCloud) && - _deepEquals(assetCount, other.assetCount); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class SyncDelta { - SyncDelta({required this.hasChanges, required this.updates, required this.deletes, required this.assetAlbums}); - - bool hasChanges; - - List updates; - - List deletes; - - Map> assetAlbums; - - List _toList() { - return [hasChanges, updates, deletes, assetAlbums]; - } - - Object encode() { - return _toList(); - } - - static SyncDelta decode(Object result) { - result as List; - return SyncDelta( - hasChanges: result[0]! as bool, - updates: (result[1]! as List).cast(), - deletes: (result[2]! as List).cast(), - assetAlbums: (result[3]! as Map).cast>(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! SyncDelta || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(hasChanges, other.hasChanges) && - _deepEquals(updates, other.updates) && - _deepEquals(deletes, other.deletes) && - _deepEquals(assetAlbums, other.assetAlbums); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class HashResult { - HashResult({required this.assetId, this.error, this.hash}); - - String assetId; - - String? error; - - String? hash; - - List _toList() { - return [assetId, error, hash]; - } - - Object encode() { - return _toList(); - } - - static HashResult decode(Object result) { - result as List; - return HashResult(assetId: result[0]! as String, error: result[1] as String?, hash: result[2] as String?); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! HashResult || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(assetId, other.assetId) && _deepEquals(error, other.error) && _deepEquals(hash, other.hash); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class CloudIdResult { - CloudIdResult({required this.assetId, this.error, this.cloudId}); - - String assetId; - - String? error; - - String? cloudId; - - List _toList() { - return [assetId, error, cloudId]; - } - - Object encode() { - return _toList(); - } - - static CloudIdResult decode(Object result) { - result as List; - return CloudIdResult(assetId: result[0]! as String, error: result[1] as String?, cloudId: result[2] as String?); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! CloudIdResult || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(assetId, other.assetId) && - _deepEquals(error, other.error) && - _deepEquals(cloudId, other.cloudId); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is PlatformAssetPlaybackStyle) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else if (value is PlatformAsset) { - buffer.putUint8(130); - writeValue(buffer, value.encode()); - } else if (value is PlatformAlbum) { - buffer.putUint8(131); - writeValue(buffer, value.encode()); - } else if (value is SyncDelta) { - buffer.putUint8(132); - writeValue(buffer, value.encode()); - } else if (value is HashResult) { - buffer.putUint8(133); - writeValue(buffer, value.encode()); - } else if (value is CloudIdResult) { - buffer.putUint8(134); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformAssetPlaybackStyle.values[value]; - case 130: - return PlatformAsset.decode(readValue(buffer)!); - case 131: - return PlatformAlbum.decode(readValue(buffer)!); - case 132: - return SyncDelta.decode(readValue(buffer)!); - case 133: - return HashResult.decode(readValue(buffer)!); - case 134: - return CloudIdResult.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -class NativeSyncApi { - /// Constructor for [NativeSyncApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - NativeSyncApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future shouldFullSync() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.shouldFullSync$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future getMediaChanges() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getMediaChanges$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as SyncDelta; - } - - Future checkpointSync() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.checkpointSync$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future clearSyncCheckpoint() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.clearSyncCheckpoint$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future> getAssetIdsForAlbum(String albumId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetIdsForAlbum$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([albumId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } - - Future> getAlbums() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAlbums$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } - - Future getAssetsCountSince(String albumId, int timestamp) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([albumId, timestamp]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as int; - } - - Future> getAssetsForAlbum(String albumId, {int? updatedTimeCond}) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsForAlbum$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([albumId, updatedTimeCond]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } - - Future> hashAssets(List assetIds, {bool allowNetworkAccess = false}) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([assetIds, allowNetworkAccess]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } - - Future cancelHashing() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelHashing$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future cancelSync() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelSync$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future>> getTrashedAssets() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as Map).cast>(); - } - - Future restoreFromTrashById(String mediaId, int type) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.restoreFromTrashById$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([mediaId, type]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future> getCloudIdForAssetIds(List assetIds) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([assetIds]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return (pigeonVar_replyValue! as List).cast(); - } -} diff --git a/mobile/lib/platform/network_api.g.dart b/mobile/lib/platform/network_api.g.dart deleted file mode 100644 index 6258060bfb..0000000000 --- a/mobile/lib/platform/network_api.g.dart +++ /dev/null @@ -1,331 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -bool _deepEquals(Object? a, Object? b) { - if (identical(a, b)) { - return true; - } - if (a is double && b is double) { - if (a.isNaN && b.isNaN) { - return true; - } - return a == b; - } - if (a is List && b is List) { - return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - if (a.length != b.length) { - return false; - } - for (final MapEntry entryA in a.entries) { - bool found = false; - for (final MapEntry entryB in b.entries) { - if (_deepEquals(entryA.key, entryB.key)) { - if (_deepEquals(entryA.value, entryB.value)) { - found = true; - break; - } else { - return false; - } - } - } - if (!found) { - return false; - } - } - return true; - } - return a == b; -} - -int _deepHash(Object? value) { - if (value is List) { - return Object.hashAll(value.map(_deepHash)); - } - if (value is Map) { - int result = 0; - for (final MapEntry entry in value.entries) { - result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); - } - return result; - } - if (value is double && value.isNaN) { - // Normalize NaN to a consistent hash. - return 0x7FF8000000000000.hashCode; - } - if (value is double && value == 0.0) { - // Normalize -0.0 to 0.0 so they have the same hash code. - return 0.0.hashCode; - } - return value.hashCode; -} - -class ClientCertData { - ClientCertData({required this.data, required this.password}); - - Uint8List data; - - String password; - - List _toList() { - return [data, password]; - } - - Object encode() { - return _toList(); - } - - static ClientCertData decode(Object result) { - result as List; - return ClientCertData(data: result[0]! as Uint8List, password: result[1]! as String); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! ClientCertData || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(data, other.data) && _deepEquals(password, other.password); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class ClientCertPrompt { - ClientCertPrompt({required this.title, required this.message, required this.cancel, required this.confirm}); - - String title; - - String message; - - String cancel; - - String confirm; - - List _toList() { - return [title, message, cancel, confirm]; - } - - Object encode() { - return _toList(); - } - - static ClientCertPrompt decode(Object result) { - result as List; - return ClientCertPrompt( - title: result[0]! as String, - message: result[1]! as String, - cancel: result[2]! as String, - confirm: result[3]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! ClientCertPrompt || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(title, other.title) && - _deepEquals(message, other.message) && - _deepEquals(cancel, other.cancel) && - _deepEquals(confirm, other.confirm); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is ClientCertData) { - buffer.putUint8(129); - writeValue(buffer, value.encode()); - } else if (value is ClientCertPrompt) { - buffer.putUint8(130); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - return ClientCertData.decode(readValue(buffer)!); - case 130: - return ClientCertPrompt.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -class NetworkApi { - /// Constructor for [NetworkApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - NetworkApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future addCertificate(ClientCertData clientData) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.addCertificate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([clientData]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future selectCertificate(ClientCertPrompt promptText) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.selectCertificate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([promptText]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future removeCertificate() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.removeCertificate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future hasCertificate() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.hasCertificate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future getClientPointer() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.getClientPointer$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as int; - } - - Future setRequestHeaders(Map headers, List serverUrls, String? token) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.setRequestHeaders$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([headers, serverUrls, token]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future getAppGroupId() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.NetworkApi.getAppGroupId$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as String; - } -} diff --git a/mobile/lib/platform/permission_api.g.dart b/mobile/lib/platform/permission_api.g.dart deleted file mode 100644 index 7b85d611d2..0000000000 --- a/mobile/lib/platform/permission_api.g.dart +++ /dev/null @@ -1,146 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -enum PermissionStatus { granted, denied, permanentlyDenied } - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is PermissionStatus) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : PermissionStatus.values[value]; - default: - return super.readValueOfType(type, buffer); - } - } -} - -class PermissionApi { - /// Constructor for [PermissionApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - PermissionApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future isIgnoringBatteryOptimizations() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.PermissionApi.isIgnoringBatteryOptimizations$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as PermissionStatus; - } - - Future hasManageMediaPermission() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.PermissionApi.hasManageMediaPermission$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future requestManageMediaPermission() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.PermissionApi.requestManageMediaPermission$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } - - Future manageMediaPermission() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.PermissionApi.manageMediaPermission$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as bool; - } -} diff --git a/mobile/lib/platform/remote_image_api.g.dart b/mobile/lib/platform/remote_image_api.g.dart deleted file mode 100644 index 5239cb3e45..0000000000 --- a/mobile/lib/platform/remote_image_api.g.dart +++ /dev/null @@ -1,114 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - default: - return super.readValueOfType(type, buffer); - } - } -} - -class RemoteImageApi { - /// Constructor for [RemoteImageApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - RemoteImageApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future?> requestImage(String url, {required int requestId, required bool preferEncoded}) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.requestImage$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([url, requestId, preferEncoded]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: true, - ); - return (pigeonVar_replyValue as Map?)?.cast(); - } - - Future cancelRequest(int requestId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.cancelRequest$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([requestId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); - } - - Future clearCache() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.clearCache$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: false, - ); - return pigeonVar_replyValue! as int; - } -} diff --git a/mobile/lib/platform/thumbnail_api.g.dart b/mobile/lib/platform/thumbnail_api.g.dart deleted file mode 100644 index 53d7b10fc3..0000000000 --- a/mobile/lib/platform/thumbnail_api.g.dart +++ /dev/null @@ -1,142 +0,0 @@ -// Autogenerated from Pigeon (v26.0.2), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; - -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; -import 'package:flutter/services.dart'; - -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - default: - return super.readValueOfType(type, buffer); - } - } -} - -class ThumbnailApi { - /// Constructor for [ThumbnailApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - ThumbnailApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future> requestImage( - String assetId, { - required int requestId, - required int width, - required int height, - required bool isVideo, - }) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ThumbnailApi.requestImage$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([ - assetId, - requestId, - width, - height, - isVideo, - ]); - final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as Map?)!.cast(); - } - } - - Future cancelImageRequest(int requestId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ThumbnailApi.cancelImageRequest$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([requestId]); - final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - Future> getThumbhash(String thumbhash) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ThumbnailApi.getThumbhash$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([thumbhash]); - final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as Map?)!.cast(); - } - } -} diff --git a/mobile/lib/platform/view_intent_api.g.dart b/mobile/lib/platform/view_intent_api.g.dart deleted file mode 100644 index d457c249de..0000000000 --- a/mobile/lib/platform/view_intent_api.g.dart +++ /dev/null @@ -1,191 +0,0 @@ -// Autogenerated from Pigeon (v26.3.4), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: unused_import, unused_shown_name -// ignore_for_file: type=lint - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List; - -import 'package:flutter/services.dart'; -import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; - -Object? _extractReplyValueOrThrow(List? replyList, String channelName, {required bool isNullValid}) { - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); - } else if (replyList.length > 1) { - throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]); - } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } - return replyList.firstOrNull; -} - -bool _deepEquals(Object? a, Object? b) { - if (identical(a, b)) { - return true; - } - if (a is double && b is double) { - if (a.isNaN && b.isNaN) { - return true; - } - return a == b; - } - if (a is List && b is List) { - return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - if (a.length != b.length) { - return false; - } - for (final MapEntry entryA in a.entries) { - bool found = false; - for (final MapEntry entryB in b.entries) { - if (_deepEquals(entryA.key, entryB.key)) { - if (_deepEquals(entryA.value, entryB.value)) { - found = true; - break; - } else { - return false; - } - } - } - if (!found) { - return false; - } - } - return true; - } - return a == b; -} - -int _deepHash(Object? value) { - if (value is List) { - return Object.hashAll(value.map(_deepHash)); - } - if (value is Map) { - int result = 0; - for (final MapEntry entry in value.entries) { - result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); - } - return result; - } - if (value is double && value.isNaN) { - // Normalize NaN to a consistent hash. - return 0x7FF8000000000000.hashCode; - } - if (value is double && value == 0.0) { - // Normalize -0.0 to 0.0 so they have the same hash code. - return 0.0.hashCode; - } - return value.hashCode; -} - -class ViewIntentPayload { - ViewIntentPayload({this.path, required this.mimeType, this.localAssetId}); - - String? path; - - String mimeType; - - String? localAssetId; - - List _toList() { - return [path, mimeType, localAssetId]; - } - - Object encode() { - return _toList(); - } - - static ViewIntentPayload decode(Object result) { - result as List; - return ViewIntentPayload( - path: result[0] as String?, - mimeType: result[1]! as String, - localAssetId: result[2] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! ViewIntentPayload || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(path, other.path) && - _deepEquals(mimeType, other.mimeType) && - _deepEquals(localAssetId, other.localAssetId); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => _deepHash([runtimeType, ..._toList()]); -} - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is ViewIntentPayload) { - buffer.putUint8(129); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - return ViewIntentPayload.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -class ViewIntentHostApi { - /// Constructor for [ViewIntentHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - ViewIntentHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future consumeViewIntent() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.immich_mobile.ViewIntentHostApi.consumeViewIntent$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - - final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( - pigeonVar_replyList, - pigeonVar_channelName, - isNullValid: true, - ); - return pigeonVar_replyValue as ViewIntentPayload?; - } -} From 858aeadce8097ff66bee9a53ebe03d982db8b0ba Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Thu, 30 Jul 2026 12:15:35 -0700 Subject: [PATCH 23/69] chore(mobile): Apply stricter linting rules for Flutter and known issues (#30373) --- mobile/analysis_options.yaml | 13 ++++++++++++- mobile/bin/generate_keys.dart | 2 +- .../repositories/storage.repository.dart | 2 ++ .../backup/drift_backup_album_selection.page.dart | 2 +- .../lib/pages/backup/drift_upload_detail.page.dart | 2 +- mobile/lib/pages/common/app_log_detail.page.dart | 4 ++-- mobile/lib/pages/common/large_leading_tile.dart | 2 +- .../presentation/pages/drift_activities.page.dart | 2 +- .../lib/presentation/pages/drift_library.page.dart | 2 +- .../lib/presentation/pages/drift_memory.page.dart | 2 +- .../pages/drift_partner_detail.page.dart | 2 +- .../presentation/pages/drift_slideshow.page.dart | 2 +- .../pages/profile/profile_picture_crop.page.dart | 2 +- .../pages/search/drift_search.page.dart | 4 ++-- .../widgets/album/album_selector.widget.dart | 4 ++-- .../lib/presentation/widgets/album/album_tile.dart | 2 +- .../widgets/asset_viewer/video_viewer.widget.dart | 1 + .../images/local_album_thumbnail.widget.dart | 2 +- .../widgets/images/thumbnail_tile.widget.dart | 2 +- .../widgets/memory/memory_card.widget.dart | 4 ++-- mobile/lib/services/download.service.dart | 2 ++ mobile/lib/services/foreground_upload.service.dart | 1 + mobile/lib/services/view_intent.service.dart | 1 + mobile/lib/widgets/common/tag_picker.dart | 4 ++-- .../widgets/map/map_settings/map_theme_picker.dart | 2 +- .../beta_sync_settings/sync_status_and_actions.dart | 2 ++ .../widgets/settings/free_up_space_settings.dart | 2 +- .../preference_settings/primary_color_setting.dart | 2 +- mobile/test/services/view_intent_service_test.dart | 8 +++----- 29 files changed, 50 insertions(+), 32 deletions(-) diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml index 1a7b463913..b9f18d0d81 100644 --- a/mobile/analysis_options.yaml +++ b/mobile/analysis_options.yaml @@ -29,7 +29,6 @@ linter: # Formatting avoid_print: true unawaited_futures: true - use_build_context_synchronously: false require_trailing_commas: true unrelated_type_equality_checks: true prefer_const_constructors: true @@ -51,6 +50,18 @@ linter: avoid_multiple_declarations_per_line: true unnecessary_breaks: true + # Known issues + avoid_slow_async_io: true + avoid_type_to_string: true + + # Flutter specific + use_build_context_synchronously: false + sized_box_for_whitespace: true + use_colored_box: true + use_decorated_box: true + avoid_unnecessary_containers: true + use_full_hex_values_for_flutter_colors: true + # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options analyzer: diff --git a/mobile/bin/generate_keys.dart b/mobile/bin/generate_keys.dart index a4cf562bcb..1ce643be12 100644 --- a/mobile/bin/generate_keys.dart +++ b/mobile/bin/generate_keys.dart @@ -1,4 +1,4 @@ -// ignore_for_file: avoid_print +// ignore_for_file: avoid_slow_async_io, avoid_print import 'dart:convert'; import 'dart:io'; diff --git a/mobile/lib/infrastructure/repositories/storage.repository.dart b/mobile/lib/infrastructure/repositories/storage.repository.dart index 3a63812485..9500190abc 100644 --- a/mobile/lib/infrastructure/repositories/storage.repository.dart +++ b/mobile/lib/infrastructure/repositories/storage.repository.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_slow_async_io + import 'dart:io'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; diff --git a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart index 9f60a4e193..6589741aab 100644 --- a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart +++ b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart @@ -286,7 +286,7 @@ class _DriftBackupAlbumSelectionPageState extends ConsumerState { SizedBox( width: 48, height: 48, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.outline.withValues(alpha: 0.1), borderRadius: const BorderRadius.all(Radius.circular(8)), diff --git a/mobile/lib/pages/common/app_log_detail.page.dart b/mobile/lib/pages/common/app_log_detail.page.dart index 274231a729..ab7668f845 100644 --- a/mobile/lib/pages/common/app_log_detail.page.dart +++ b/mobile/lib/pages/common/app_log_detail.page.dart @@ -48,7 +48,7 @@ class AppLogDetailPage extends HookConsumerWidget { ), ], ), - Container( + DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.surfaceContainerHigh, borderRadius: const BorderRadius.all(Radius.circular(15.0)), @@ -79,7 +79,7 @@ class AppLogDetailPage extends HookConsumerWidget { style: TextStyle(fontSize: 12.0, color: context.primaryColor, fontWeight: FontWeight.bold), ), ), - Container( + DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.surfaceContainerHigh, borderRadius: const BorderRadius.all(Radius.circular(15.0)), diff --git a/mobile/lib/pages/common/large_leading_tile.dart b/mobile/lib/pages/common/large_leading_tile.dart index 4563834473..58528008ca 100644 --- a/mobile/lib/pages/common/large_leading_tile.dart +++ b/mobile/lib/pages/common/large_leading_tile.dart @@ -34,7 +34,7 @@ class LargeLeadingTile extends StatelessWidget { return InkWell( borderRadius: BorderRadius.circular(borderRadius), onTap: disabled ? null : onTap, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: selected ? selectedTileColor ?? Theme.of(context).primaryColor.withAlpha(30) diff --git a/mobile/lib/presentation/pages/drift_activities.page.dart b/mobile/lib/presentation/pages/drift_activities.page.dart index a52f1d7358..59c9a8a1e1 100644 --- a/mobile/lib/presentation/pages/drift_activities.page.dart +++ b/mobile/lib/presentation/pages/drift_activities.page.dart @@ -71,7 +71,7 @@ class DriftActivitiesPage extends HookConsumerWidget { ), Align( alignment: Alignment.bottomCenter, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: context.scaffoldBackgroundColor, border: Border(top: BorderSide(color: context.colorScheme.secondaryContainer, width: 1)), diff --git a/mobile/lib/presentation/pages/drift_library.page.dart b/mobile/lib/presentation/pages/drift_library.page.dart index 190ad3af6a..b2b4d250f1 100644 --- a/mobile/lib/presentation/pages/drift_library.page.dart +++ b/mobile/lib/presentation/pages/drift_library.page.dart @@ -354,7 +354,7 @@ class _QuickAccessButtonList extends ConsumerWidget { return SliverPadding( padding: const EdgeInsets.only(left: 16, top: 12, right: 16, bottom: 32), sliver: SliverToBoxAdapter( - child: Container( + child: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: context.colorScheme.onSurface.withAlpha(10), width: 1), borderRadius: const BorderRadius.all(Radius.circular(20)), diff --git a/mobile/lib/presentation/pages/drift_memory.page.dart b/mobile/lib/presentation/pages/drift_memory.page.dart index 4ae97f30e1..b8f3c94a00 100644 --- a/mobile/lib/presentation/pages/drift_memory.page.dart +++ b/mobile/lib/presentation/pages/drift_memory.page.dart @@ -281,7 +281,7 @@ class DriftMemoryPage extends HookConsumerWidget { final asset = memories[mIndex].assets[index]; return Stack( children: [ - Container( + ColoredBox( color: Colors.black, child: DriftMemoryCard( asset: asset, diff --git a/mobile/lib/presentation/pages/drift_partner_detail.page.dart b/mobile/lib/presentation/pages/drift_partner_detail.page.dart index fd5b64c108..53353ce689 100644 --- a/mobile/lib/presentation/pages/drift_partner_detail.page.dart +++ b/mobile/lib/presentation/pages/drift_partner_detail.page.dart @@ -89,7 +89,7 @@ class _InfoBoxState extends ConsumerState<_InfoBox> { height: 110, child: Padding( padding: const EdgeInsets.only(left: 8.0, right: 8.0, top: 16.0), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: context.colorScheme.onSurface.withAlpha(10), width: 1), borderRadius: const BorderRadius.all(Radius.circular(20)), diff --git a/mobile/lib/presentation/pages/drift_slideshow.page.dart b/mobile/lib/presentation/pages/drift_slideshow.page.dart index 3f0c441c01..9b7c10c891 100644 --- a/mobile/lib/presentation/pages/drift_slideshow.page.dart +++ b/mobile/lib/presentation/pages/drift_slideshow.page.dart @@ -313,7 +313,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si return ImageFiltered( imageFilter: ImageFilter.blur(sigmaX: 30, sigmaY: 30), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( image: DecorationImage( image: getFullImageProvider(asset, size: Size(context.width, context.height)), diff --git a/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart b/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart index 3fb32b7d93..e6ae6ad44f 100644 --- a/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart +++ b/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart @@ -157,7 +157,7 @@ class _ProfilePictureCropPageState extends ConsumerState return Center( child: ConstrainedBox( constraints: BoxConstraints(maxHeight: context.height * 0.7, maxWidth: context.width * 0.9), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(7)), boxShadow: [ diff --git a/mobile/lib/presentation/pages/search/drift_search.page.dart b/mobile/lib/presentation/pages/search/drift_search.page.dart index 6b818bd273..4d04967b28 100644 --- a/mobile/lib/presentation/pages/search/drift_search.page.dart +++ b/mobile/lib/presentation/pages/search/drift_search.page.dart @@ -598,7 +598,7 @@ class DriftSearchPage extends HookConsumerWidget { ), ), ], - title: Container( + title: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: context.colorScheme.onSurface.withAlpha(0), width: 0), borderRadius: const BorderRadius.all(Radius.circular(24)), @@ -859,7 +859,7 @@ class _QuickLinkList extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( + return DecoratedBox( decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(20)), border: Border.all(color: context.colorScheme.outline.withAlpha(10), width: 1), diff --git a/mobile/lib/presentation/widgets/album/album_selector.widget.dart b/mobile/lib/presentation/widgets/album/album_selector.widget.dart index 285c6290a9..ba6c6da560 100644 --- a/mobile/lib/presentation/widgets/album/album_selector.widget.dart +++ b/mobile/lib/presentation/widgets/album/album_selector.widget.dart @@ -395,7 +395,7 @@ class _SearchBar extends StatelessWidget { return SliverPadding( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), sliver: SliverToBoxAdapter( - child: Container( + child: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: context.colorScheme.onSurface.withAlpha(0), width: 0), borderRadius: const BorderRadius.all(Radius.circular(24)), @@ -699,7 +699,7 @@ class _GridAlbumCard extends ConsumerWidget { ); } - return Container( + return ColoredBox( color: context.colorScheme.surfaceContainerHighest, child: const Icon(Icons.photo_album_rounded, size: 40, color: Colors.grey), ); diff --git a/mobile/lib/presentation/widgets/album/album_tile.dart b/mobile/lib/presentation/widgets/album/album_tile.dart index 1aeadf61bc..bbf7e11e5a 100644 --- a/mobile/lib/presentation/widgets/album/album_tile.dart +++ b/mobile/lib/presentation/widgets/album/album_tile.dart @@ -51,7 +51,7 @@ class AlbumTile extends ConsumerWidget { : SizedBox( width: 80, height: 80, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.surfaceContainer, borderRadius: const BorderRadius.all(Radius.circular(16)), diff --git a/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart index d007883ec9..6f2398046f 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart @@ -112,6 +112,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg final localFilePath = widget.localFilePath; if (localFilePath != null) { final file = File(localFilePath); + // ignore: avoid_slow_async_io if (!await file.exists()) { throw Exception('No file found for the video'); } diff --git a/mobile/lib/presentation/widgets/images/local_album_thumbnail.widget.dart b/mobile/lib/presentation/widgets/images/local_album_thumbnail.widget.dart index b519da33c3..966e070872 100644 --- a/mobile/lib/presentation/widgets/images/local_album_thumbnail.widget.dart +++ b/mobile/lib/presentation/widgets/images/local_album_thumbnail.widget.dart @@ -14,7 +14,7 @@ class LocalAlbumThumbnail extends ConsumerWidget { return localAlbumThumbnail.when( data: (data) { if (data == null) { - return Container( + return DecoratedBox( decoration: BoxDecoration( color: context.colorScheme.surfaceContainer, borderRadius: const BorderRadius.all(Radius.circular(16)), diff --git a/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart b/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart index 7d71f0296d..1d3dcb2cf0 100644 --- a/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart +++ b/mobile/lib/presentation/widgets/images/thumbnail_tile.widget.dart @@ -346,7 +346,7 @@ class _UploadProgressOverlay extends StatelessWidget { final percentage = isError ? 0 : (progress * 100).toInt(); return Positioned.fill( - child: Container( + child: ColoredBox( color: isError ? Colors.red.withValues(alpha: 0.6) : Colors.black54, child: Center( child: Column( diff --git a/mobile/lib/presentation/widgets/memory/memory_card.widget.dart b/mobile/lib/presentation/widgets/memory/memory_card.widget.dart index 2a88de8e0a..7e782a3db4 100644 --- a/mobile/lib/presentation/widgets/memory/memory_card.widget.dart +++ b/mobile/lib/presentation/widgets/memory/memory_card.widget.dart @@ -97,7 +97,7 @@ class _BlurredBackdrop extends HookWidget { final blurhash = useDriftBlurHashRef(asset).value; if (blurhash != null) { // Use a nice cheap blur hash image decoration - return Container( + return DecoratedBox( decoration: BoxDecoration( image: DecorationImage(image: MemoryImage(blurhash), fit: BoxFit.cover), ), @@ -109,7 +109,7 @@ class _BlurredBackdrop extends HookWidget { // safely use that as the image provider return ImageFiltered( imageFilter: ImageFilter.blur(sigmaX: 30, sigmaY: 30), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( image: DecorationImage( image: getFullImageProvider(asset, size: Size(context.width, context.height)), diff --git a/mobile/lib/services/download.service.dart b/mobile/lib/services/download.service.dart index de8e8af3f5..f38b20cc21 100644 --- a/mobile/lib/services/download.service.dart +++ b/mobile/lib/services/download.service.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_slow_async_io + import 'dart:async'; import 'dart:io'; diff --git a/mobile/lib/services/foreground_upload.service.dart b/mobile/lib/services/foreground_upload.service.dart index 7c0352a00e..36d3975a26 100644 --- a/mobile/lib/services/foreground_upload.service.dart +++ b/mobile/lib/services/foreground_upload.service.dart @@ -419,6 +419,7 @@ class ForegroundUploadService { void Function(int bytes, int totalBytes)? onProgress, }) async { try { + // ignore: avoid_slow_async_io final stats = await file.stat(); final fileCreatedAt = stats.changed; final fileModifiedAt = stats.modified; diff --git a/mobile/lib/services/view_intent.service.dart b/mobile/lib/services/view_intent.service.dart index 22a3407e5a..e822d1ebb6 100644 --- a/mobile/lib/services/view_intent.service.dart +++ b/mobile/lib/services/view_intent.service.dart @@ -61,6 +61,7 @@ class ViewIntentService { try { final file = File(path); + // ignore: avoid_slow_async_io if (await file.exists()) { await file.delete(); } diff --git a/mobile/lib/widgets/common/tag_picker.dart b/mobile/lib/widgets/common/tag_picker.dart index 97fbff1930..a9a68fe044 100644 --- a/mobile/lib/widgets/common/tag_picker.dart +++ b/mobile/lib/widgets/common/tag_picker.dart @@ -125,7 +125,7 @@ class TagPicker extends HookConsumerWidget { // Create new tag tile return Padding( padding: const EdgeInsets.only(bottom: 2.0), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: isCreateSelected ? context.primaryColor : context.primaryColor.withAlpha(25), borderRadius: const BorderRadius.all(Radius.circular(10)), @@ -160,7 +160,7 @@ class TagPicker extends HookConsumerWidget { return Padding( padding: const EdgeInsets.only(bottom: 2.0), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( color: isSelected ? context.primaryColor : context.primaryColor.withAlpha(25), borderRadius: borderRadius, diff --git a/mobile/lib/widgets/map/map_settings/map_theme_picker.dart b/mobile/lib/widgets/map/map_settings/map_theme_picker.dart index 7866c0ecdc..e66f08c221 100644 --- a/mobile/lib/widgets/map/map_settings/map_theme_picker.dart +++ b/mobile/lib/widgets/map/map_settings/map_theme_picker.dart @@ -69,7 +69,7 @@ class _BorderedMapThumbnail extends StatelessWidget { Widget build(BuildContext context) { return Column( children: [ - Container( + DecoratedBox( decoration: BoxDecoration( border: Border.fromBorderSide( BorderSide(width: 4, color: shouldHighlight ? context.colorScheme.onSurface : Colors.transparent), diff --git a/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart b/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart index 92787077a1..7bd604ae5e 100644 --- a/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart +++ b/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart @@ -39,6 +39,7 @@ class SyncStatusAndActions extends HookConsumerWidget { final documentsDir = await getApplicationDocumentsDirectory(); final dbFile = File(path.join(documentsDir.path, 'immich.sqlite')); + // ignore: avoid_slow_async_io if (!await dbFile.exists()) { if (context.mounted) { context.scaffoldMessenger.showSnackBar( @@ -61,6 +62,7 @@ class SyncStatusAndActions extends HookConsumerWidget { ); Future.delayed(const Duration(seconds: 30), () async { + // ignore: avoid_slow_async_io if (await exportFile.exists()) { await exportFile.delete(); } diff --git a/mobile/lib/widgets/settings/free_up_space_settings.dart b/mobile/lib/widgets/settings/free_up_space_settings.dart index 7b16c2d67d..dbec3a2dcb 100644 --- a/mobile/lib/widgets/settings/free_up_space_settings.dart +++ b/mobile/lib/widgets/settings/free_up_space_settings.dart @@ -773,7 +773,7 @@ class _DatePresetCard extends StatelessWidget { child: InkWell( onTap: onTap, borderRadius: const BorderRadius.all(Radius.circular(12)), - child: Container( + child: DecoratedBox( decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(12)), border: Border.all(color: isSelected ? context.colorScheme.primary : Colors.transparent, width: 1), diff --git a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart index 3fead2c59f..1defd2df44 100644 --- a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart @@ -69,7 +69,7 @@ class PrimaryColorSetting extends HookConsumerWidget { right: 0, top: 0, bottom: 0, - child: Container( + child: DecoratedBox( decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(100)), color: Colors.grey[900]?.withValues(alpha: .4), diff --git a/mobile/test/services/view_intent_service_test.dart b/mobile/test/services/view_intent_service_test.dart index 7b3d0b85e7..fd8f5f725c 100644 --- a/mobile/test/services/view_intent_service_test.dart +++ b/mobile/test/services/view_intent_service_test.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_slow_async_io + import 'dart:io'; import 'package:flutter_test/flutter_test.dart'; @@ -13,11 +15,7 @@ void main() { late Directory tempRoot; late Directory cacheDir; - final attachment = ViewIntentPayload( - path: '/tmp/file.jpg', - mimeType: 'image/jpeg', - localAssetId: '42', - ); + final attachment = ViewIntentPayload(path: '/tmp/file.jpg', mimeType: 'image/jpeg', localAssetId: '42'); setUp(() { hostApi = MockViewIntentHostApi(); From 56fbca910eba70eeb53abe66e4ff205803371a95 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Thu, 30 Jul 2026 21:17:57 +0200 Subject: [PATCH 24/69] chore: skip e2e tests when the stack fails to start (#30414) --- .github/workflows/test.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b9fb652f59..a01b429713 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -441,6 +441,7 @@ jobs: if: ${{ !cancelled() }} - name: Start Docker Compose + id: docker run: docker compose up -d --build --renew-anon-volumes --force-recreate --remove-orphans --wait --wait-timeout 300 if: ${{ !cancelled() }} @@ -448,13 +449,13 @@ jobs: env: VITEST_DISABLE_DOCKER_SETUP: true run: pnpm test - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Run e2e tests (maintenance) env: VITEST_DISABLE_DOCKER_SETUP: true run: pnpm test:maintenance - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Capture Docker logs if: always() @@ -519,6 +520,7 @@ jobs: if: ${{ !cancelled() }} - name: Docker build + id: docker run: docker compose up -d --build --renew-anon-volumes --force-recreate --remove-orphans --wait --wait-timeout 300 if: ${{ !cancelled() }} @@ -526,7 +528,7 @@ jobs: env: PLAYWRIGHT_DISABLE_WEBSERVER: true run: pnpm test:web - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Archive e2e test (web) results uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -539,7 +541,7 @@ jobs: env: PLAYWRIGHT_DISABLE_WEBSERVER: true run: pnpm test:web:ui - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Archive ui test (web) results uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -552,7 +554,7 @@ jobs: env: PLAYWRIGHT_DISABLE_WEBSERVER: true run: pnpm test:web:maintenance - if: ${{ !cancelled() }} + if: ${{ !cancelled() && steps.docker.outcome == 'success' }} - name: Archive maintenance tests (web) results uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 From 9732bebb55ad594fe0d9ac5f13a1be7ddab109b9 Mon Sep 17 00:00:00 2001 From: Devesh Kolte Date: Fri, 31 Jul 2026 00:49:58 +0530 Subject: [PATCH 25/69] fix(server): store null instead of empty string for user password (#30223) --- ...86754473-ConvertUserPasswordEmptyStringToNull.ts | 13 +++++++++++++ server/src/schema/tables/user.table.ts | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 server/src/schema/migrations/1784986754473-ConvertUserPasswordEmptyStringToNull.ts diff --git a/server/src/schema/migrations/1784986754473-ConvertUserPasswordEmptyStringToNull.ts b/server/src/schema/migrations/1784986754473-ConvertUserPasswordEmptyStringToNull.ts new file mode 100644 index 0000000000..82f742c90a --- /dev/null +++ b/server/src/schema/migrations/1784986754473-ConvertUserPasswordEmptyStringToNull.ts @@ -0,0 +1,13 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + await sql`ALTER TABLE "user" ALTER COLUMN "password" DROP NOT NULL;`.execute(db); + await sql`ALTER TABLE "user" ALTER COLUMN "password" SET DEFAULT NULL;`.execute(db); + await sql`UPDATE "user" SET "password" = NULL WHERE "password" = '';`.execute(db); +} + +export async function down(db: Kysely): Promise { + await sql`UPDATE "user" SET "password" = '' WHERE "password" IS NULL;`.execute(db); + await sql`ALTER TABLE "user" ALTER COLUMN "password" SET DEFAULT '';`.execute(db); + await sql`ALTER TABLE "user" ALTER COLUMN "password" SET NOT NULL;`.execute(db); +} diff --git a/server/src/schema/tables/user.table.ts b/server/src/schema/tables/user.table.ts index 0839924d2a..50d56d9067 100644 --- a/server/src/schema/tables/user.table.ts +++ b/server/src/schema/tables/user.table.ts @@ -31,8 +31,8 @@ export class UserTable { @Column({ unique: true }) email!: string; - @Column({ default: '' }) - password!: Generated; + @Column({ nullable: true, default: null }) + password!: string | null; @Column({ nullable: true }) pinCode!: string | null; From 7149dd80307ffa92be49103bcdcf1485d75db1b7 Mon Sep 17 00:00:00 2001 From: Matthew Momjian <50788000+mmomjian@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:34:08 -0400 Subject: [PATCH 26/69] fix(docs): remove listing unraid as an "official" deployment (#30323) * remove listing unraid as an "official" deploymeny * mplconfig * oops --- docs/docs/install/unraid.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/docs/install/unraid.md b/docs/docs/install/unraid.md index 384d3d11d7..3ce98dc2e1 100644 --- a/docs/docs/install/unraid.md +++ b/docs/docs/install/unraid.md @@ -1,13 +1,19 @@ --- -sidebar_position: 60 +sidebar_position: 70 --- -# Unraid +# Unraid [ Community ] + +:::note +This is a community contribution and not officially supported by the Immich team, but included here for convenience. + +Community support can be found in the dedicated channel on the [Discord Server](https://discord.immich.app/). +::: Immich can easily be installed and updated on Unraid via: -1. [Docker Compose Manager](https://forums.unraid.net/topic/114415-plugin-docker-compose-manager/) plugin from the Unraid Community Apps -2. Community made template on the Unraid Community Apps +1. Community made template on the Unraid Community Apps +2. [Docker Compose Manager](https://forums.unraid.net/topic/114415-plugin-docker-compose-manager/) plugin from the Unraid Community Apps ## Community Applications Template @@ -23,7 +29,7 @@ Once you have Redis and PostgreSQL running, search for Immich on the Unraid CA, For more information about setting up the community image see [here](https://github.com/imagegenius/docker-immich#application-setup) -## Docker-Compose Method (Official) +## Docker-Compose Method :::info From 6b99f02232374530daae373d0e7e306a95a31319 Mon Sep 17 00:00:00 2001 From: Matthew Momjian <50788000+mmomjian@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:37:35 -0400 Subject: [PATCH 27/69] fix(docs): Revise config file instructions and notes (#30418) Revise config file instructions and notes Updated the config file instructions to specify 'immich-config.json' and added notes about interaction with the web UI and microservices. --- docs/docs/install/config-file.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/docs/install/config-file.md b/docs/docs/install/config-file.md index c8ebeffbcd..5c34acdd9d 100644 --- a/docs/docs/install/config-file.md +++ b/docs/docs/install/config-file.md @@ -6,14 +6,18 @@ sidebar_position: 100 A config file can be provided as an alternative to the UI configuration. +:::note Interaction with the web UI +While the config file does not need to include all keys from the below example, specifying `IMMICH_CONFIG_FILE` will disable the ability to edit other properties from the Immich web UI. +::: + ### Step 1 - Create a new config file -In JSON format, create a new config file (e.g. `immich.json`) and put it in a location mounted in the container that can be accessed by Immich. +In JSON format, create a new config file (e.g. `immich-config.json`) and put it in a location mounted in the container that can be accessed by Immich. YAML-formatted config files are also supported. The default configuration looks like this:
-immich.json +immich-config.json ```json { @@ -250,6 +254,10 @@ So you can just grab it from there, paste it into a file and you're pretty much ### Step 2 - Specify the file location +:::note +If you have any `microservices` workers, they will also need to have the config file mounted to their container. +::: + In your `.env` file, set the variable `IMMICH_CONFIG_FILE` to the path of your config. For more information, refer to the [Environment Variables](/install/environment-variables.md) section. @@ -261,7 +269,7 @@ It is recommended to reuse this variable in your `docker-compose.yml`: ```yaml volumes: - - ./configuration.yml:${IMMICH_CONFIG_FILE} + - ./immich-config.json:${IMMICH_CONFIG_FILE} ``` ::: From e7aace436d2d6dcadd356a0f67ae2216d9162b05 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Thu, 30 Jul 2026 12:39:24 -0700 Subject: [PATCH 28/69] chore(mobile): Apply stricter linting rules for correctness (#30372) * chore(mobile): Apply stricter linting rules for correctness * Added discarded_futures rule --- mobile/analysis_options.yaml | 12 +- .../domain/models/user_metadata.model.dart | 8 +- mobile/lib/domain/services/hash.service.dart | 2 +- .../domain/services/local_sync.service.dart | 2 +- .../lib/domain/services/timeline.service.dart | 46 ++-- mobile/lib/domain/utils/event_stream.dart | 4 +- .../entities/asset_edit.entity.dart | 2 +- .../entities/user_metadata.entity.dart | 2 +- .../repositories/sync_stream.repository.dart | 8 +- mobile/lib/main.dart | 26 ++- .../lib/pages/backup/drift_backup.page.dart | 35 +-- .../drift_backup_album_selection.page.dart | 74 +++--- mobile/lib/pages/common/app_log.page.dart | 8 +- .../lib/pages/common/app_log_detail.page.dart | 22 +- mobile/lib/pages/common/download_panel.dart | 4 +- .../lib/pages/common/splash_screen.page.dart | 14 +- mobile/lib/pages/common/tab_shell.page.dart | 4 +- .../lib/pages/library/folder/folder.page.dart | 22 +- .../pages/library/locked/pin_auth.page.dart | 10 +- .../library/shared_link/shared_link.page.dart | 4 +- mobile/lib/pages/login/login.page.dart | 6 +- .../search/map/map_location_picker.page.dart | 3 +- .../pages/share_intent/share_intent.page.dart | 4 +- .../pages/download_info.page.dart | 4 +- .../pages/drift_activities.page.dart | 12 +- .../presentation/pages/drift_album.page.dart | 2 +- .../pages/drift_album_options.page.dart | 26 ++- .../pages/drift_asset_troubleshoot.page.dart | 14 +- .../pages/drift_locked_folder.page.dart | 6 +- .../presentation/pages/drift_map.page.dart | 6 +- .../presentation/pages/drift_memory.page.dart | 22 +- .../pages/drift_people_collection.page.dart | 4 +- .../presentation/pages/drift_person.page.dart | 6 +- .../pages/drift_slideshow.page.dart | 38 +-- .../pages/drift_user_selection.page.dart | 8 +- .../pages/search/drift_search.page.dart | 220 ++++++++++-------- .../search/paginated_search.provider.dart | 2 +- .../add_action_button.widget.dart | 40 ++-- .../cast_action_button.widget.dart | 4 +- ...ownload_status_floating_button.widget.dart | 4 +- ..._profile_picture_action_button.widget.dart | 8 +- .../share_action_button.widget.dart | 48 ++-- .../slideshow_action_button.widget.dart | 8 +- .../widgets/album/album_selector.widget.dart | 10 +- .../album/pending_uploads_banner.widget.dart | 8 +- .../location_details.widget.dart | 4 +- .../asset_details/people_details.widget.dart | 4 +- .../asset_viewer/asset_page.widget.dart | 12 +- .../asset_viewer/asset_viewer.page.dart | 28 +-- .../asset_viewer/ocr_overlay.widget.dart | 2 +- .../asset_viewer/sheet_tile.widget.dart | 4 +- .../asset_viewer/video_viewer.widget.dart | 4 +- .../viewer_top_app_bar.widget.dart | 14 +- .../base_bottom_sheet.widget.dart | 12 +- .../feature_message_dialog.widget.dart | 3 +- .../widgets/images/full_image.widget.dart | 4 +- .../widgets/images/image_provider.dart | 13 +- .../widgets/images/thumbnail.widget.dart | 5 +- .../presentation/widgets/map/map.state.dart | 14 +- .../presentation/widgets/map/map.widget.dart | 2 +- .../widgets/memory/memory_lane.widget.dart | 4 +- .../widgets/timeline/header.widget.dart | 4 +- .../widgets/timeline/scrubber.widget.dart | 12 +- .../widgets/timeline/timeline.widget.dart | 34 +-- .../providers/app_life_cycle.provider.dart | 2 +- .../asset_viewer/asset_viewer.provider.dart | 4 +- .../share_intent_upload.provider.dart | 3 +- .../asset_viewer/video_player_provider.dart | 18 +- .../backup/backup_album.provider.dart | 4 +- mobile/lib/providers/cast.provider.dart | 4 +- mobile/lib/providers/cleanup.provider.dart | 12 +- .../gallery_permission.provider.dart | 3 +- .../providers/haptic_feedback.provider.dart | 12 +- .../readonly_mode.provider.dart | 6 +- mobile/lib/providers/local_auth.provider.dart | 10 +- .../lib/providers/map/map_state.provider.dart | 12 +- mobile/lib/providers/permission.provider.dart | 2 +- .../lib/providers/server_info.provider.dart | 4 +- .../lib/providers/shared_link.provider.dart | 2 +- mobile/lib/providers/user.provider.dart | 2 +- mobile/lib/providers/websocket.provider.dart | 8 +- .../lib/routing/app_navigation_observer.dart | 12 +- .../services/background_upload.service.dart | 6 +- mobile/lib/services/map.service.dart | 4 +- mobile/lib/services/share_intent_service.dart | 4 +- mobile/lib/utils/async_mutex.dart | 10 +- .../utils/hooks/app_settings_update_hook.dart | 4 +- mobile/lib/utils/image_converter.dart | 16 +- .../asset_viewer/animated_play_pause.dart | 5 +- .../backup/drift_album_info_list_tile.dart | 12 +- .../common/app_bar_dialog/app_bar_dialog.dart | 10 +- .../app_bar_dialog/app_bar_server_info.dart | 6 +- .../server_update_notification.dart | 7 +- .../widgets/common/dropdown_search_menu.dart | 4 +- .../common/immich_loading_indicator.dart | 11 +- .../widgets/common/immich_sliver_app_bar.dart | 5 +- .../common/mesmerizing_sliver_app_bar.dart | 20 +- .../widgets/common/person_sliver_app_bar.dart | 20 +- .../common/remote_album_sliver_app_bar.dart | 20 +- .../lib/widgets/forms/login/login_form.dart | 5 +- .../src/controller/photo_view_controller.dart | 2 +- .../photo_view_scalestate_controller.dart | 2 +- .../photo_view/src/core/photo_view_core.dart | 17 +- .../photo_view/src/photo_view_wrappers.dart | 2 - .../widgets/settings/advanced_settings.dart | 12 +- .../asset_list_layout_settings.dart | 4 +- .../asset_list_settings.dart | 4 +- .../image_viewer_quality_setting.dart | 4 +- .../image_viewer_tap_to_navigate_setting.dart | 4 +- .../slideshow_settings.dart | 10 +- .../video_viewer_settings.dart | 8 +- .../drift_backup_settings.dart | 2 +- .../sync_status_and_actions.dart | 6 +- .../settings/free_up_space_settings.dart | 12 +- .../networking_settings/endpoint_input.dart | 4 +- .../external_network_preference.dart | 6 +- .../networking_settings.dart | 6 +- .../settings/notification_setting.dart | 22 +- .../primary_color_setting.dart | 8 +- .../preference_settings/share_setting.dart | 4 +- .../preference_settings/theme_setting.dart | 8 +- mobile/lib/wm_executor.dart | 44 ++-- .../packages/ui/test/formatted_text_test.dart | 2 +- .../widgets/timeline/timeline_args_test.dart | 2 + .../test/services/deep_link_service_test.dart | 6 +- 125 files changed, 859 insertions(+), 632 deletions(-) diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml index b9f18d0d81..3f5a33b2b2 100644 --- a/mobile/analysis_options.yaml +++ b/mobile/analysis_options.yaml @@ -28,7 +28,6 @@ linter: rules: # Formatting avoid_print: true - unawaited_futures: true require_trailing_commas: true unrelated_type_equality_checks: true prefer_const_constructors: true @@ -50,6 +49,17 @@ linter: avoid_multiple_declarations_per_line: true unnecessary_breaks: true + # Correctness + no_adjacent_strings_in_list: true + cancel_subscriptions: true + close_sinks: true + unawaited_futures: true + discarded_futures: true + no_self_assignments: true + throw_in_finally: true + collection_methods_unrelated_type: true + cast_nullable_to_non_nullable: true + # Known issues avoid_slow_async_io: true avoid_type_to_string: true diff --git a/mobile/lib/domain/models/user_metadata.model.dart b/mobile/lib/domain/models/user_metadata.model.dart index b73f798255..0e702ba868 100644 --- a/mobile/lib/domain/models/user_metadata.model.dart +++ b/mobile/lib/domain/models/user_metadata.model.dart @@ -23,7 +23,7 @@ class Onboarding { } factory Onboarding.fromMap(Map map) { - return Onboarding(isOnboarded: map["isOnboarded"] as bool); + return Onboarding(isOnboarded: map["isOnboarded"]! as bool); } @override @@ -195,9 +195,9 @@ class License { factory License.fromMap(Map map) { return License( - activatedAt: DateTime.parse(map["activatedAt"] as String), - activationKey: map["activationKey"] as String, - licenseKey: map["licenseKey"] as String, + activatedAt: DateTime.parse(map["activatedAt"]! as String), + activationKey: map["activationKey"]! as String, + licenseKey: map["licenseKey"]! as String, ); } diff --git a/mobile/lib/domain/services/hash.service.dart b/mobile/lib/domain/services/hash.service.dart index e4c332b283..b0dbf8fbea 100644 --- a/mobile/lib/domain/services/hash.service.dart +++ b/mobile/lib/domain/services/hash.service.dart @@ -32,7 +32,7 @@ class HashService { }) : _batchSize = batchSize ?? kBatchHashFileLimit { // Stop the in-flight native hash call promptly on cancellation; the loops // below also observe [isCancelled] to bail between batches. - _cancellation?.future.then((_) => _nativeSyncApi.cancelHashing().onError(_log.warning)); + unawaited(_cancellation?.future.then((_) => _nativeSyncApi.cancelHashing().onError(_log.warning))); } bool get isCancelled => _cancellation?.isCompleted ?? false; diff --git a/mobile/lib/domain/services/local_sync.service.dart b/mobile/lib/domain/services/local_sync.service.dart index feb104f90d..b4ebc66f89 100644 --- a/mobile/lib/domain/services/local_sync.service.dart +++ b/mobile/lib/domain/services/local_sync.service.dart @@ -40,7 +40,7 @@ class LocalSyncService { required this._permissionRepository, this._cancellation, }) { - _cancellation?.future.then((_) => _nativeSyncApi.cancelSync().onError(_log.warning)); + unawaited(_cancellation?.future.then((_) => _nativeSyncApi.cancelSync().onError(_log.warning))); } bool get _isCancelled => _cancellation?.isCompleted ?? false; diff --git a/mobile/lib/domain/services/timeline.service.dart b/mobile/lib/domain/services/timeline.service.dart index 9b539ec218..b20ba306ff 100644 --- a/mobile/lib/domain/services/timeline.service.dart +++ b/mobile/lib/domain/services/timeline.service.dart @@ -106,32 +106,34 @@ class TimelineService { TimelineService._({required this._assetSource, required this._bucketSource, required this.origin}) { _bucketSubscription = _bucketSource().listen((buckets) { - _mutex.run(() async { - final totalAssets = buckets.fold(0, (acc, bucket) => acc + bucket.assetCount); + unawaited( + _mutex.run(() async { + final totalAssets = buckets.fold(0, (acc, bucket) => acc + bucket.assetCount); - if (totalAssets == 0) { - _bufferOffset = 0; - _buffer = []; - } else { - final int offset; - final int count; - // When the buffer is empty or the old bufferOffset is greater than the new total assets, - // we need to reset the buffer and load the first batch of assets. - if (_bufferOffset >= totalAssets || _buffer.isEmpty) { - offset = 0; - count = kTimelineAssetLoadBatchSize; + if (totalAssets == 0) { + _bufferOffset = 0; + _buffer = []; } else { - offset = _bufferOffset; - count = math.min(_buffer.length, totalAssets - _bufferOffset); + final int offset; + final int count; + // When the buffer is empty or the old bufferOffset is greater than the new total assets, + // we need to reset the buffer and load the first batch of assets. + if (_bufferOffset >= totalAssets || _buffer.isEmpty) { + offset = 0; + count = kTimelineAssetLoadBatchSize; + } else { + offset = _bufferOffset; + count = math.min(_buffer.length, totalAssets - _bufferOffset); + } + _buffer = await _assetSource(offset, count); + _bufferOffset = offset; } - _buffer = await _assetSource(offset, count); - _bufferOffset = offset; - } - // change the state's total assets count only after the buffer is reloaded - _totalAssets = totalAssets; - EventStream.shared.emit(const TimelineReloadEvent()); - }); + // change the state's total assets count only after the buffer is reloaded + _totalAssets = totalAssets; + EventStream.shared.emit(const TimelineReloadEvent()); + }), + ); }); } diff --git a/mobile/lib/domain/utils/event_stream.dart b/mobile/lib/domain/utils/event_stream.dart index 5967fdca50..0069c75f86 100644 --- a/mobile/lib/domain/utils/event_stream.dart +++ b/mobile/lib/domain/utils/event_stream.dart @@ -32,7 +32,7 @@ class EventStream { } /// Closes the stream controller - void dispose() { - _controller.close(); + Future dispose() { + return _controller.close(); } } diff --git a/mobile/lib/infrastructure/entities/asset_edit.entity.dart b/mobile/lib/infrastructure/entities/asset_edit.entity.dart index 87a05ab8fe..58e1a91d33 100644 --- a/mobile/lib/infrastructure/entities/asset_edit.entity.dart +++ b/mobile/lib/infrastructure/entities/asset_edit.entity.dart @@ -25,7 +25,7 @@ class AssetEditEntity extends Table with DriftDefaultsMixin { } final JsonTypeConverter2, Uint8List, Object?> editParameterConverter = TypeConverter.jsonb( - fromJson: (json) => json as Map, + fromJson: (json) => json! as Map, ); extension AssetEditEntityDataDomainEx on AssetEditEntityData { diff --git a/mobile/lib/infrastructure/entities/user_metadata.entity.dart b/mobile/lib/infrastructure/entities/user_metadata.entity.dart index ede3de3966..da2070fd71 100644 --- a/mobile/lib/infrastructure/entities/user_metadata.entity.dart +++ b/mobile/lib/infrastructure/entities/user_metadata.entity.dart @@ -17,5 +17,5 @@ class UserMetadataEntity extends Table with DriftDefaultsMixin { } final JsonTypeConverter2, Uint8List, Object?> userMetadataConverter = TypeConverter.jsonb( - fromJson: (json) => json as Map, + fromJson: (json) => json! as Map, ); diff --git a/mobile/lib/infrastructure/repositories/sync_stream.repository.dart b/mobile/lib/infrastructure/repositories/sync_stream.repository.dart index 844226d49f..c43de69c5d 100644 --- a/mobile/lib/infrastructure/repositories/sync_stream.repository.dart +++ b/mobile/lib/infrastructure/repositories/sync_stream.repository.dart @@ -358,12 +358,12 @@ class SyncStreamRepository extends DriftDatabaseRepository { final map = metadata.value as Map; final companion = RemoteAssetCloudIdEntityCompanion( cloudId: Value(map['iCloudId']?.toString()), - createdAt: Value(map['createdAt'] != null ? DateTime.parse(map['createdAt'] as String) : null), + createdAt: Value(map['createdAt'] != null ? DateTime.parse(map['createdAt']! as String) : null), adjustmentTime: Value( - map['adjustmentTime'] != null ? DateTime.parse(map['adjustmentTime'] as String) : null, + map['adjustmentTime'] != null ? DateTime.parse(map['adjustmentTime']! as String) : null, ), - latitude: Value(map['latitude'] != null ? (double.tryParse(map['latitude'] as String)) : null), - longitude: Value(map['longitude'] != null ? (double.tryParse(map['longitude'] as String)) : null), + latitude: Value(map['latitude'] != null ? (double.tryParse(map['latitude']! as String)) : null), + longitude: Value(map['longitude'] != null ? (double.tryParse(map['longitude']! as String)) : null), ); batch.insert( _db.remoteAssetCloudIdEntity, diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index 09bcdc752f..58e93891a2 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -128,17 +128,17 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve switch (state) { case AppLifecycleState.resumed: dPrint(() => "[APP STATE] resumed"); - ref.read(appStateProvider.notifier).handleAppResume(); + unawaited(ref.read(appStateProvider.notifier).handleAppResume()); unawaited(ref.read(viewIntentHandlerProvider).onAppResumed()); case AppLifecycleState.inactive: dPrint(() => "[APP STATE] inactive"); ref.read(appStateProvider.notifier).handleAppInactivity(); case AppLifecycleState.paused: dPrint(() => "[APP STATE] paused"); - ref.read(appStateProvider.notifier).handleAppPause(); + unawaited(ref.read(appStateProvider.notifier).handleAppPause()); case AppLifecycleState.detached: dPrint(() => "[APP STATE] detached"); - ref.read(appStateProvider.notifier).handleAppDetached(); + unawaited(ref.read(appStateProvider.notifier).handleAppDetached()); case AppLifecycleState.hidden: dPrint(() => "[APP STATE] hidden"); ref.read(appStateProvider.notifier).handleAppHidden(); @@ -216,17 +216,19 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve @override void initState() { super.initState(); - initApp().then((_) => dPrint(() => "App Init Completed")); + unawaited(initApp().then((_) => dPrint(() => "App Init Completed"))); WidgetsBinding.instance.addPostFrameCallback((_) { // needs to be delayed so that EasyLocalization is working - ref.read(backgroundWorkerFgServiceProvider).enable(); + unawaited(ref.read(backgroundWorkerFgServiceProvider).enable()); if (Platform.isAndroid) { - ref - .read(backgroundWorkerFgServiceProvider) - .saveNotificationMessage( - StaticTranslations.instance.uploading_media, - StaticTranslations.instance.backup_background_service_default_notification, - ); + unawaited( + ref + .read(backgroundWorkerFgServiceProvider) + .saveNotificationMessage( + StaticTranslations.instance.uploading_media, + StaticTranslations.instance.backup_background_service_default_notification, + ), + ); } }); @@ -243,7 +245,7 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve @override void reassemble() { if (kDebugMode) { - NetworkRepository.init(); + unawaited(NetworkRepository.init()); } super.reassemble(); } diff --git a/mobile/lib/pages/backup/drift_backup.page.dart b/mobile/lib/pages/backup/drift_backup.page.dart index 793437579a..cc618dbe60 100644 --- a/mobile/lib/pages/backup/drift_backup.page.dart +++ b/mobile/lib/pages/backup/drift_backup.page.dart @@ -43,7 +43,7 @@ class _DriftBackupPageState extends ConsumerState { void initState() { super.initState(); - WakelockPlus.enable(); + unawaited(WakelockPlus.enable()); final currentUser = ref.read(currentUserProvider); if (currentUser == null) { @@ -69,7 +69,7 @@ class _DriftBackupPageState extends ConsumerState { @override void dispose() { super.dispose(); - WakelockPlus.disable(); + unawaited(WakelockPlus.disable()); } @override @@ -111,7 +111,7 @@ class _DriftBackupPageState extends ConsumerState { title: Text("backup_controller_page_backup".t()), leading: IconButton( onPressed: () { - context.maybePop(true); + unawaited(context.maybePop(true)); }, splashRadius: 24, icon: const Icon(Icons.arrow_back_ios_rounded), @@ -119,7 +119,7 @@ class _DriftBackupPageState extends ConsumerState { actions: [ IconButton( onPressed: () { - context.pushRoute(const DriftBackupOptionsRoute()); + unawaited(context.pushRoute(const DriftBackupOptionsRoute())); }, icon: const Icon(Icons.settings_outlined), tooltip: "backup_options".t(context: context), @@ -207,8 +207,8 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin } } - void showPermissionsDialog() { - showDialog( + Future showPermissionsDialog() { + return showDialog( context: context, builder: (ctx) => AlertDialog( content: Text(context.t.notification_permission_dialog_content), @@ -225,7 +225,7 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin expanded: false, onPressed: () { ContextHelper(context).pop(); - openAppSettings(); + unawaited(openAppSettings()); }, ), ], @@ -233,8 +233,8 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin ); } - void showBatteryOptimizationInfo() { - showDialog( + Future showBatteryOptimizationInfo() { + return showDialog( context: context, barrierDismissible: false, builder: (BuildContext ctx) { @@ -246,7 +246,8 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin labelText: context.t.backup_controller_page_background_battery_info_link, variant: .ghost, expanded: false, - onPressed: () => launchUrl(Uri.parse('https://dontkillmyapp.com'), mode: LaunchMode.externalApplication), + onPressed: () => + unawaited(launchUrl(Uri.parse('https://dontkillmyapp.com'), mode: LaunchMode.externalApplication)), ), ImmichTextButton( labelText: context.t.backup_controller_page_background_battery_info_ok, @@ -279,11 +280,13 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin style: context.textTheme.bodySmall?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), onPressed: () { - ref.read(notificationPermissionProvider.notifier).requestNotificationPermission().then((p) { - if (p == PermissionStatus.permanentlyDenied) { - showPermissionsDialog(); - } - }); + unawaited( + ref.read(notificationPermissionProvider.notifier).requestNotificationPermission().then((p) { + if (p == PermissionStatus.permanentlyDenied) { + unawaited(showPermissionsDialog()); + } + }), + ); }, ), if (notificationStatus != PermissionStatus.granted && batteryOptimizationStatus != PermissionStatus.granted) @@ -297,7 +300,7 @@ class _BackupFooterState extends ConsumerState<_BackupFooter> with WidgetsBindin textAlign: TextAlign.left, style: context.textTheme.bodySmall?.copyWith(color: context.colorScheme.onSurfaceSecondary), ), - onPressed: showBatteryOptimizationInfo, + onPressed: () => unawaited(showBatteryOptimizationInfo()), ), ], TextButton.icon( diff --git a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart index 6589741aab..396f4224a7 100644 --- a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart +++ b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart @@ -214,34 +214,36 @@ class _DriftBackupAlbumSelectionPageState extends ConsumerState removeSelection() { + return ref.read(backupAlbumProvider.notifier).deselectAlbum(album); } return Padding( padding: const EdgeInsets.only(right: 8.0), child: GestureDetector( - onTap: removeSelection, + onTap: () => unawaited(removeSelection()), child: AnimatedContainer( duration: const Duration(milliseconds: 200), curve: Curves.easeInOut, @@ -387,7 +389,7 @@ class _SelectedAlbumNameChips extends ConsumerWidget { backgroundColor: context.primaryColor, deleteIconColor: context.isDarkTheme ? Colors.black : Colors.white, deleteIcon: const Icon(Icons.cancel_rounded, size: 15), - onDeleted: removeSelection, + onDeleted: () => unawaited(removeSelection()), ), ), ), @@ -408,12 +410,12 @@ class _ExcludedAlbumNameChips extends ConsumerWidget { children: excludedBackupAlbums.asMap().entries.map((entry) { final album = entry.value; - void removeSelection() { - ref.read(backupAlbumProvider.notifier).deselectAlbum(album); + Future removeSelection() { + return ref.read(backupAlbumProvider.notifier).deselectAlbum(album); } return GestureDetector( - onTap: removeSelection, + onTap: () => unawaited(removeSelection()), child: Padding( padding: const EdgeInsets.only(right: 8.0), child: AnimatedContainer( @@ -427,7 +429,7 @@ class _ExcludedAlbumNameChips extends ConsumerWidget { backgroundColor: Colors.red[300], deleteIconColor: context.scaffoldBackgroundColor, deleteIcon: const Icon(Icons.cancel_rounded, size: 15), - onDeleted: removeSelection, + onDeleted: () => unawaited(removeSelection()), ), ), ), @@ -457,7 +459,7 @@ class _SelectAllButton extends ConsumerWidget { ? () { for (final album in filteredAlbums) { if (album.backupSelection != BackupSelection.selected) { - ref.read(backupAlbumProvider.notifier).selectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).selectAlbum(album)); } } } @@ -477,7 +479,7 @@ class _SelectAllButton extends ConsumerWidget { ? () { for (final album in filteredAlbums) { if (album.backupSelection == BackupSelection.selected) { - ref.read(backupAlbumProvider.notifier).deselectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).deselectAlbum(album)); } } } diff --git a/mobile/lib/pages/common/app_log.page.dart b/mobile/lib/pages/common/app_log.page.dart index 5458d90808..b04d8dc926 100644 --- a/mobile/lib/pages/common/app_log.page.dart +++ b/mobile/lib/pages/common/app_log.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -61,7 +63,7 @@ class AppLogPage extends HookConsumerWidget { size: 20.0, ), onPressed: () { - immichLogger.clearLogs(); + unawaited(immichLogger.clearLogs()); shouldReload.value = !shouldReload.value; }, ), @@ -70,7 +72,7 @@ class AppLogPage extends HookConsumerWidget { return IconButton( icon: Icon(Icons.share_rounded, color: context.primaryColor, semanticLabel: "Share logs", size: 20.0), onPressed: () { - ImmichLogger.shareLogs(iconContext); + unawaited(ImmichLogger.shareLogs(iconContext)); }, ); }, @@ -78,7 +80,7 @@ class AppLogPage extends HookConsumerWidget { ], leading: IconButton( onPressed: () { - context.maybePop(); + unawaited(context.maybePop()); }, icon: const Icon(Icons.arrow_back_ios_new_rounded, size: 20.0), ), diff --git a/mobile/lib/pages/common/app_log_detail.page.dart b/mobile/lib/pages/common/app_log_detail.page.dart index ab7668f845..330ca51075 100644 --- a/mobile/lib/pages/common/app_log_detail.page.dart +++ b/mobile/lib/pages/common/app_log_detail.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -33,16 +35,18 @@ class AppLogDetailPage extends HookConsumerWidget { ), IconButton( onPressed: () { - Clipboard.setData(ClipboardData(text: text)).then((_) { - context.scaffoldMessenger.showSnackBar( - SnackBar( - content: Text( - "copied_to_clipboard".tr(), - style: context.textTheme.bodyLarge?.copyWith(color: context.primaryColor), + unawaited( + Clipboard.setData(ClipboardData(text: text)).then((_) { + context.scaffoldMessenger.showSnackBar( + SnackBar( + content: Text( + "copied_to_clipboard".tr(), + style: context.textTheme.bodyLarge?.copyWith(color: context.primaryColor), + ), ), - ), - ); - }); + ); + }), + ); }, icon: Icon(Icons.copy, size: 16.0, color: context.primaryColor), ), diff --git a/mobile/lib/pages/common/download_panel.dart b/mobile/lib/pages/common/download_panel.dart index f39aa07166..267d32fc3d 100644 --- a/mobile/lib/pages/common/download_panel.dart +++ b/mobile/lib/pages/common/download_panel.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:background_downloader/background_downloader.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -15,7 +17,7 @@ class DownloadPanel extends ConsumerWidget { final tasks = ref.watch(downloadStateProvider.select((state) => state.taskProgress)).entries.toList(); void onCancelDownload(String id) { - ref.watch(downloadStateProvider.notifier).cancelDownload(id); + unawaited(ref.watch(downloadStateProvider.notifier).cancelDownload(id)); } return Positioned( diff --git a/mobile/lib/pages/common/splash_screen.page.dart b/mobile/lib/pages/common/splash_screen.page.dart index 711783bc94..4c417cc87c 100644 --- a/mobile/lib/pages/common/splash_screen.page.dart +++ b/mobile/lib/pages/common/splash_screen.page.dart @@ -282,11 +282,13 @@ class SplashScreenPageState extends ConsumerState { @override void initState() { super.initState(); - ref - .read(authProvider.notifier) - .setOpenApiServiceEndpoint() - .then(logConnectionInfo) - .whenComplete(() => resumeSession()); + unawaited( + ref + .read(authProvider.notifier) + .setOpenApiServiceEndpoint() + .then(logConnectionInfo) + .whenComplete(() => resumeSession()), + ); } void logConnectionInfo(String? endpoint) { @@ -327,7 +329,7 @@ class SplashScreenPageState extends ConsumerState { if (syncSuccess) { await Future.wait([ backgroundManager.hashAssets().then((_) { - _resumeBackup(backupProvider); + unawaited(_resumeBackup(backupProvider)); }), _resumeBackup(backupProvider), // TODO: Bring back when the soft freeze issue is addressed diff --git a/mobile/lib/pages/common/tab_shell.page.dart b/mobile/lib/pages/common/tab_shell.page.dart index 2fdcec4054..f834e4ac51 100644 --- a/mobile/lib/pages/common/tab_shell.page.dart +++ b/mobile/lib/pages/common/tab_shell.page.dart @@ -126,7 +126,7 @@ void _onNavigationSelected(TabsRouter router, int index, WidgetRef ref) { // Album page if (index == kAlbumTabIndex) { - ref.read(remoteAlbumProvider.notifier).refresh(); + unawaited(ref.read(remoteAlbumProvider.notifier).refresh()); } // Library page @@ -168,7 +168,7 @@ class _BottomNavigationBarState extends ConsumerState<_BottomNavigationBar> { @override void dispose() { - _eventSubscription?.cancel(); + unawaited(_eventSubscription?.cancel()); super.dispose(); } diff --git a/mobile/lib/pages/library/folder/folder.page.dart b/mobile/lib/pages/library/folder/folder.page.dart index 6934d7b6c5..69631efe4e 100644 --- a/mobile/lib/pages/library/folder/folder.page.dart +++ b/mobile/lib/pages/library/folder/folder.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -53,7 +55,7 @@ class FolderPage extends HookConsumerWidget { useEffect(() { if (folder == null) { - ref.read(folderStructureProvider.notifier).fetchFolders(sortOrder.value); + unawaited(ref.read(folderStructureProvider.notifier).fetchFolders(sortOrder.value)); } return null; }, []); @@ -72,7 +74,7 @@ class FolderPage extends HookConsumerWidget { void onToggleSortOrder() { final newOrder = sortOrder.value == SortOrder.asc ? SortOrder.desc : SortOrder.asc; - ref.read(folderStructureProvider.notifier).fetchFolders(newOrder); + unawaited(ref.read(folderStructureProvider.notifier).fetchFolders(newOrder)); sortOrder.value = newOrder; } @@ -118,7 +120,7 @@ class FolderContent extends HookConsumerWidget { if (folder == null) { return; } - ref.read(folderRenderListProvider(folder!).notifier).fetchAssets(sortOrder); + unawaited(ref.read(folderRenderListProvider(folder!).notifier).fetchAssets(sortOrder)); return null; }, [folder]); @@ -176,12 +178,14 @@ class FolderContent extends HookConsumerWidget { (index, asset) => LargeLeadingTile( onTap: () { AssetViewer.setAsset(ref, asset); - context.pushRoute( - AssetViewerRoute( - initialIndex: index, - timelineService: ref - .read(timelineFactoryProvider) - .fromAssets(folderAssets, TimelineOrigin.folder), + unawaited( + context.pushRoute( + AssetViewerRoute( + initialIndex: index, + timelineService: ref + .read(timelineFactoryProvider) + .fromAssets(folderAssets, TimelineOrigin.folder), + ), ), ); }, diff --git a/mobile/lib/pages/library/locked/pin_auth.page.dart b/mobile/lib/pages/library/locked/pin_auth.page.dart index 7beda1d47b..2da9a8ddab 100644 --- a/mobile/lib/pages/library/locked/pin_auth.page.dart +++ b/mobile/lib/pages/library/locked/pin_auth.page.dart @@ -38,8 +38,8 @@ class PinAuthPage extends HookConsumerWidget { } } - void enableBiometricAuth() { - showDialog( + Future enableBiometricAuth() { + return showDialog( context: context, builder: (buildContext) { return SimpleDialog( @@ -53,7 +53,7 @@ class PinAuthPage extends HookConsumerWidget { description: 'enable_biometric_auth_description'.tr(), onSuccess: (pinCode) { Navigator.pop(buildContext); - registerBiometric(pinCode); + unawaited(registerBiometric(pinCode)); }, autoFocus: true, icon: Icons.fingerprint_rounded, @@ -83,7 +83,7 @@ class PinAuthPage extends HookConsumerWidget { child: PinVerificationForm( autoFocus: true, onSuccess: (_) { - context.replaceRoute(const DriftLockedFolderRoute()); + unawaited(context.replaceRoute(const DriftLockedFolderRoute())); }, ), ), @@ -93,7 +93,7 @@ class PinAuthPage extends HookConsumerWidget { padding: const EdgeInsets.only(right: 16.0), child: TextButton.icon( icon: const Icon(Icons.fingerprint, size: 28), - onPressed: enableBiometricAuth, + onPressed: () => unawaited(enableBiometricAuth()), label: Text( 'use_biometric'.tr(), style: context.textTheme.labelLarge?.copyWith(color: context.primaryColor, fontSize: 18), diff --git a/mobile/lib/pages/library/shared_link/shared_link.page.dart b/mobile/lib/pages/library/shared_link/shared_link.page.dart index a4f52ebd4c..18fc235dd8 100644 --- a/mobile/lib/pages/library/shared_link/shared_link.page.dart +++ b/mobile/lib/pages/library/shared_link/shared_link.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -17,7 +19,7 @@ class SharedLinkPage extends HookConsumerWidget { final sharedLinks = ref.watch(sharedLinksStateProvider); useEffect(() { - ref.read(sharedLinksStateProvider.notifier).fetchLinks(); + unawaited(ref.read(sharedLinksStateProvider.notifier).fetchLinks()); return () { if (!context.mounted) { return; diff --git a/mobile/lib/pages/login/login.page.dart b/mobile/lib/pages/login/login.page.dart index 79091d2679..e225c4c066 100644 --- a/mobile/lib/pages/login/login.page.dart +++ b/mobile/lib/pages/login/login.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -22,7 +24,7 @@ class LoginPage extends HookConsumerWidget { } useEffect(() { - getAppInfo(); + unawaited(getAppInfo()); return null; }); @@ -55,7 +57,7 @@ class LoginPage extends HookConsumerWidget { ), ), onTap: () { - context.pushRoute(const AppLogRoute()); + unawaited(context.pushRoute(const AppLogRoute())); }, ), ], diff --git a/mobile/lib/pages/search/map/map_location_picker.page.dart b/mobile/lib/pages/search/map/map_location_picker.page.dart index 96f41a4d38..bb848b24bc 100644 --- a/mobile/lib/pages/search/map/map_location_picker.page.dart +++ b/mobile/lib/pages/search/map/map_location_picker.page.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:math'; import 'package:auto_route/auto_route.dart'; @@ -37,7 +38,7 @@ class MapLocationPickerPage extends HookConsumerWidget { } void onClose([LatLng? selected]) { - context.maybePop(selected); + unawaited(context.maybePop(selected)); } Future getCurrentLocation() async { diff --git a/mobile/lib/pages/share_intent/share_intent.page.dart b/mobile/lib/pages/share_intent/share_intent.page.dart index ec88c4a9e4..db5e583d7a 100644 --- a/mobile/lib/pages/share_intent/share_intent.page.dart +++ b/mobile/lib/pages/share_intent/share_intent.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -65,7 +67,7 @@ class ShareIntentPage extends ConsumerWidget { ), leading: IconButton( onPressed: () { - context.navigateTo(const TabShellRoute()); + unawaited(context.navigateTo(const TabShellRoute())); }, icon: const Icon(Icons.arrow_back), ), diff --git a/mobile/lib/presentation/pages/download_info.page.dart b/mobile/lib/presentation/pages/download_info.page.dart index af44714b83..c2c63c7860 100644 --- a/mobile/lib/presentation/pages/download_info.page.dart +++ b/mobile/lib/presentation/pages/download_info.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -15,7 +17,7 @@ class DownloadInfoPage extends ConsumerWidget { final tasks = ref.watch(downloadStateProvider.select((state) => state.taskProgress)).entries.toList(); void onCancelDownload(String id) { - ref.watch(downloadStateProvider.notifier).cancelDownload(id); + unawaited(ref.watch(downloadStateProvider.notifier).cancelDownload(id)); } return Scaffold( diff --git a/mobile/lib/presentation/pages/drift_activities.page.dart b/mobile/lib/presentation/pages/drift_activities.page.dart index 59c9a8a1e1..ebf7c2efa7 100644 --- a/mobile/lib/presentation/pages/drift_activities.page.dart +++ b/mobile/lib/presentation/pages/drift_activities.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart' hide Store; @@ -25,13 +27,17 @@ class DriftActivitiesPage extends HookConsumerWidget { final activities = ref.watch(albumActivityProvider((album.id, assetId))); final listViewScrollController = useScrollController(); - void scrollToBottom() { - listViewScrollController.animateTo(0, duration: const Duration(milliseconds: 300), curve: Curves.fastOutSlowIn); + Future scrollToBottom() { + return listViewScrollController.animateTo( + 0, + duration: const Duration(milliseconds: 300), + curve: Curves.fastOutSlowIn, + ); } Future onAddComment(String comment) async { await activityNotifier.addComment(comment); - scrollToBottom(); + unawaited(scrollToBottom()); } return ProviderScope( diff --git a/mobile/lib/presentation/pages/drift_album.page.dart b/mobile/lib/presentation/pages/drift_album.page.dart index 47a4625f87..ab91b6f3c8 100644 --- a/mobile/lib/presentation/pages/drift_album.page.dart +++ b/mobile/lib/presentation/pages/drift_album.page.dart @@ -53,7 +53,7 @@ class _DriftAlbumsPageState extends ConsumerState { ), AlbumSelector( onAlbumSelected: (album) { - context.router.push(RemoteAlbumRoute(album: album)); + unawaited(context.router.push(RemoteAlbumRoute(album: album))); }, ), ], diff --git a/mobile/lib/presentation/pages/drift_album_options.page.dart b/mobile/lib/presentation/pages/drift_album_options.page.dart index 84060aa38c..37c0273fae 100644 --- a/mobile/lib/presentation/pages/drift_album_options.page.dart +++ b/mobile/lib/presentation/pages/drift_album_options.page.dart @@ -110,18 +110,20 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { ]; } - showModalBottomSheet( - backgroundColor: context.colorScheme.surfaceContainer, - isScrollControlled: false, - context: context, - builder: (context) { - return SafeArea( - child: Padding( - padding: const EdgeInsets.only(top: 24.0), - child: Column(mainAxisSize: MainAxisSize.min, children: [...actions]), - ), - ); - }, + unawaited( + showModalBottomSheet( + backgroundColor: context.colorScheme.surfaceContainer, + isScrollControlled: false, + context: context, + builder: (context) { + return SafeArea( + child: Padding( + padding: const EdgeInsets.only(top: 24.0), + child: Column(mainAxisSize: MainAxisSize.min, children: [...actions]), + ), + ); + }, + ), ); } diff --git a/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart b/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart index 3e5b603451..cee0cdc334 100644 --- a/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart +++ b/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -78,11 +80,13 @@ class _AssetPropertiesSectionState extends ConsumerState<_AssetPropertiesSection @override void initState() { super.initState(); - _buildAssetProperties(widget.asset).whenComplete(() { - if (mounted) { - setState(() {}); - } - }); + unawaited( + _buildAssetProperties(widget.asset).whenComplete(() { + if (mounted) { + setState(() {}); + } + }), + ); } @override diff --git a/mobile/lib/presentation/pages/drift_locked_folder.page.dart b/mobile/lib/presentation/pages/drift_locked_folder.page.dart index 9849558c94..e8130f7059 100644 --- a/mobile/lib/presentation/pages/drift_locked_folder.page.dart +++ b/mobile/lib/presentation/pages/drift_locked_folder.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -39,8 +41,8 @@ class _DriftLockedFolderPageState extends ConsumerState w return; } if (state == AppLifecycleState.paused) { - ref.read(authProvider.notifier).lockPinCode(); - context.navigateTo(const TabShellRoute()); + unawaited(ref.read(authProvider.notifier).lockPinCode()); + unawaited(context.navigateTo(const TabShellRoute())); return; } setState(() { diff --git a/mobile/lib/presentation/pages/drift_map.page.dart b/mobile/lib/presentation/pages/drift_map.page.dart index 97062b88ab..d36ccc350c 100644 --- a/mobile/lib/presentation/pages/drift_map.page.dart +++ b/mobile/lib/presentation/pages/drift_map.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; @@ -11,8 +13,8 @@ class DriftMapPage extends StatelessWidget { const DriftMapPage({super.key, this.initialLocation}); - void onSettingsPressed(BuildContext context) { - showModalBottomSheet( + Future onSettingsPressed(BuildContext context) { + return showModalBottomSheet( elevation: 0.0, showDragHandle: true, isScrollControlled: true, diff --git a/mobile/lib/presentation/pages/drift_memory.page.dart b/mobile/lib/presentation/pages/drift_memory.page.dart index b8f3c94a00..31371fe581 100644 --- a/mobile/lib/presentation/pages/drift_memory.page.dart +++ b/mobile/lib/presentation/pages/drift_memory.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; @@ -47,21 +49,21 @@ class DriftMemoryPage extends HookConsumerWidget { useEffect(() { // Memories is an immersive activity - SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive); + unawaited(SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive)); return () { // Clean up to normal edge to edge when we are done - restoreEdgeToEdge(); + unawaited(restoreEdgeToEdge()); }; }); void toNextMemory() { - memoryPageController.nextPage(duration: const Duration(milliseconds: 500), curve: Curves.easeIn); + unawaited(memoryPageController.nextPage(duration: const Duration(milliseconds: 500), curve: Curves.easeIn)); } void toPreviousMemory() { if (currentMemoryIndex.value > 0) { // Move to the previous memory page - memoryPageController.previousPage(duration: const Duration(milliseconds: 500), curve: Curves.easeIn); + unawaited(memoryPageController.previousPage(duration: const Duration(milliseconds: 500), curve: Curves.easeIn)); // Wait for the next frame to ensure the page is built SchedulerBinding.instance.addPostFrameCallback((_) { @@ -88,7 +90,7 @@ class DriftMemoryPage extends HookConsumerWidget { // Go to the next asset final PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; - controller.nextPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500)); + unawaited(controller.nextPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500))); } else { // Go to the next memory since we are at the end of our assets toNextMemory(); @@ -100,7 +102,7 @@ class DriftMemoryPage extends HookConsumerWidget { // Go to the previous asset final PageController controller = memoryAssetPageControllers[currentMemoryIndex.value]; - controller.previousPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500)); + unawaited(controller.previousPage(curve: Curves.easeInOut, duration: const Duration(milliseconds: 500))); } else { // Go to the previous memory since we are at the end of our assets toPreviousMemory(); @@ -153,7 +155,7 @@ class DriftMemoryPage extends HookConsumerWidget { // Precache the next page right away if we are on the first page if (currentAssetPage.value == 0) { - Future.delayed(const Duration(milliseconds: 200)).then((_) => precacheAsset(1)); + unawaited(Future.delayed(const Duration(milliseconds: 200)).then((_) => precacheAsset(1))); } Future onAssetChanged(int otherIndex) async { @@ -198,7 +200,7 @@ class DriftMemoryPage extends HookConsumerWidget { final offset = notification.metrics.pixels; if (isEpiloguePage && (offset > notification.metrics.maxScrollExtent + 150)) { - context.maybePop(); + unawaited(context.maybePop()); return true; } } @@ -328,8 +330,8 @@ class DriftMemoryPage extends HookConsumerWidget { // auto_route doesn't invoke pop scope, so // turn off full screen mode here // https://github.com/Milad-Akarie/auto_route_library/issues/1799 - context.maybePop(); - restoreEdgeToEdge(); + unawaited(context.maybePop()); + unawaited(restoreEdgeToEdge()); }, shape: const CircleBorder(), color: Colors.white.withValues(alpha: 0.2), diff --git a/mobile/lib/presentation/pages/drift_people_collection.page.dart b/mobile/lib/presentation/pages/drift_people_collection.page.dart index f39b5e15c7..416b7d587a 100644 --- a/mobile/lib/presentation/pages/drift_people_collection.page.dart +++ b/mobile/lib/presentation/pages/drift_people_collection.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -86,7 +88,7 @@ class _DriftPeopleCollectionPageState extends ConsumerState { } } - void showOptionSheet(BuildContext context) { - showModalBottomSheet( + Future showOptionSheet(BuildContext context) { + return showModalBottomSheet( context: context, backgroundColor: context.colorScheme.surface, isScrollControlled: false, diff --git a/mobile/lib/presentation/pages/drift_slideshow.page.dart b/mobile/lib/presentation/pages/drift_slideshow.page.dart index 9b7c10c891..81c09bea67 100644 --- a/mobile/lib/presentation/pages/drift_slideshow.page.dart +++ b/mobile/lib/presentation/pages/drift_slideshow.page.dart @@ -67,7 +67,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si _updateNextIndex(); ref.listenManual(appConfigProvider.select((s) => s.slideshow), _onConfigChanged); - SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive); + unawaited(SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive)); unawaited(WakelockPlus.enable()); } @@ -94,9 +94,9 @@ class _DriftSlideshowPageState extends ConsumerState with Si if (asset.isImage) { _createTimer(); } else if (ref.read(videoPlayerProvider(asset.heroTag)).status == VideoPlaybackStatus.paused) { - ref.read(videoPlayerProvider(asset.heroTag).notifier).play(); + unawaited(ref.read(videoPlayerProvider(asset.heroTag).notifier).play()); } else { - _nextPage(); + unawaited(_nextPage()); } _updateNextIndex(); @@ -113,7 +113,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si final asset = widget.timeline.getAssetSafe(_index)!; if (!asset.isImage) { - ref.read(videoPlayerProvider(asset.heroTag).notifier).pause(); + unawaited(ref.read(videoPlayerProvider(asset.heroTag).notifier).pause()); } setState(() { @@ -147,7 +147,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si }; if (!widget.timeline.hasRange(_nextIndex, 1)) { - widget.timeline.preloadAssets(_nextIndex); + unawaited(widget.timeline.preloadAssets(_nextIndex)); } } @@ -184,14 +184,16 @@ class _DriftSlideshowPageState extends ConsumerState with Si _crossfadeFromIndex = previousIndex; _crossfadeToIndex = page; }); - _crossfadeController.forward(from: 0.0).whenComplete(() { - if (mounted) { - setState(() { - _crossfadeFromIndex = null; - _crossfadeToIndex = null; - }); - } - }); + unawaited( + _crossfadeController.forward(from: 0.0).whenComplete(() { + if (mounted) { + setState(() { + _crossfadeFromIndex = null; + _crossfadeToIndex = null; + }); + } + }), + ); } Widget _getCrossfadeLayer(BuildContext context, int index, {required bool isIncoming}) { @@ -238,7 +240,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si _timer = Timer(Duration(milliseconds: _config.duration * 1000 - _stopwatch.elapsedMilliseconds), () { _stopwatch.stop(); _stopwatch.reset(); - _nextPage(); + unawaited(_nextPage()); }); _stopwatch.start(); @@ -376,9 +378,9 @@ class _DriftSlideshowPageState extends ConsumerState with Si final position = ref.read(videoPlayerProvider(asset.heroTag)).position; if (status == VideoPlaybackStatus.completed && isCurrent && position.inMicroseconds > 0) { - _nextPage(); + unawaited(_nextPage()); } else if (status == VideoPlaybackStatus.playing) { - ref.read(videoPlayerProvider(asset.heroTag).notifier).setLoop(false); + unawaited(ref.read(videoPlayerProvider(asset.heroTag).notifier).setLoop(false)); } return PhotoView.customChild( @@ -418,7 +420,7 @@ class _DriftSlideshowPageState extends ConsumerState with Si IconButton( onPressed: () { _pause(); - context.pushRoute(SettingsSubRoute(section: SettingSection.assetViewer)); + unawaited(context.pushRoute(SettingsSubRoute(section: SettingSection.assetViewer))); }, icon: const Icon(Icons.settings), ), @@ -512,7 +514,7 @@ class _SlideshowProgressBarState extends State<_SlideshowProgressBar> with Singl animationBehavior: AnimationBehavior.preserve, )..value = (widget.elapsedMs / widget.durationMs).clamp(0.0, 1.0); if (!widget.paused) { - _controller.forward(); + unawaited(_controller.forward()); } } diff --git a/mobile/lib/presentation/pages/drift_user_selection.page.dart b/mobile/lib/presentation/pages/drift_user_selection.page.dart index 41394014a0..19a450b435 100644 --- a/mobile/lib/presentation/pages/drift_user_selection.page.dart +++ b/mobile/lib/presentation/pages/drift_user_selection.page.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -53,7 +55,7 @@ class DriftUserSelectionPage extends HookConsumerWidget { final sharedUsersList = useState>({}); void addNewUsersHandler() { - context.maybePop(sharedUsersList.value.map((e) => e.id).toList()); + unawaited(context.maybePop(sharedUsersList.value.map((e) => e.id).toList())); } Widget buildTileIcon(UserDto user) { @@ -122,12 +124,12 @@ class DriftUserSelectionPage extends HookConsumerWidget { leading: IconButton( icon: const Icon(Icons.close_rounded), onPressed: () { - context.maybePop(null); + unawaited(context.maybePop(null)); }, ), actions: [ TextButton( - onPressed: sharedUsersList.value.isEmpty ? null : addNewUsersHandler, + onPressed: sharedUsersList.value.isEmpty ? null : () => addNewUsersHandler(), child: const Text("add", style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)).tr(), ), ], diff --git a/mobile/lib/presentation/pages/search/drift_search.page.dart b/mobile/lib/presentation/pages/search/drift_search.page.dart index 4d04967b28..8d6122804a 100644 --- a/mobile/lib/presentation/pages/search/drift_search.page.dart +++ b/mobile/lib/presentation/pages/search/drift_search.page.dart @@ -105,20 +105,22 @@ class DriftSearchPage extends HookConsumerWidget { return null; } - Future.microtask(() { - textSearchController.clear(); - peopleCurrentFilterWidget.value = null; - dateRangeCurrentFilterWidget.value = null; - cameraCurrentFilterWidget.value = null; - tagCurrentFilterWidget.value = null; - mediaTypeCurrentFilterWidget.value = null; - ratingCurrentFilterWidget.value = null; - displayOptionCurrentFilterWidget.value = null; - locationCurrentFilterWidget.value = preFilter.location.city != null - ? Text(preFilter.location.city!, style: context.textTheme.labelLarge) - : null; - search(preFilter); - }); + unawaited( + Future.microtask(() { + textSearchController.clear(); + peopleCurrentFilterWidget.value = null; + dateRangeCurrentFilterWidget.value = null; + cameraCurrentFilterWidget.value = null; + tagCurrentFilterWidget.value = null; + mediaTypeCurrentFilterWidget.value = null; + ratingCurrentFilterWidget.value = null; + displayOptionCurrentFilterWidget.value = null; + locationCurrentFilterWidget.value = preFilter.location.city != null + ? Text(preFilter.location.city!, style: context.textTheme.labelLarge) + : null; + search(preFilter); + }), + ); return null; }, [preFilter]); @@ -141,17 +143,19 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(people: people)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - child: FractionallySizedBox( - heightFactor: 0.8, - child: FilterBottomSheetScaffold( - title: 'search_filter_people_title'.t(context: context), - expanded: true, - onSearch: handleApply, - onClear: handleClear, - child: PeoplePicker(onSelect: handleOnSelect, filter: filter.value.people), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + child: FractionallySizedBox( + heightFactor: 0.8, + child: FilterBottomSheetScaffold( + title: 'search_filter_people_title'.t(context: context), + expanded: true, + onSearch: handleApply, + onClear: handleClear, + child: PeoplePicker(onSelect: handleOnSelect, filter: filter.value.people), + ), ), ), ); @@ -176,17 +180,19 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(tagIds: tagIds)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - child: FractionallySizedBox( - heightFactor: 0.8, - child: FilterBottomSheetScaffold( - title: 'search_filter_tags_title'.t(context: context), - expanded: true, - onSearch: handleApply, - onClear: handleClear, - child: TagPicker(onSelectExistingTag: handleOnSelect, filter: (filter.value.tagIds ?? []).toSet()), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + child: FractionallySizedBox( + heightFactor: 0.8, + child: FilterBottomSheetScaffold( + title: 'search_filter_tags_title'.t(context: context), + expanded: true, + onSearch: handleApply, + onClear: handleClear, + child: TagPicker(onSelectExistingTag: handleOnSelect, filter: (filter.value.tagIds ?? []).toSet()), + ), ), ), ); @@ -216,21 +222,23 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(location: location)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - isDismissible: true, - child: FilterBottomSheetScaffold( - title: 'search_filter_location_title'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 16.0), - child: Container( - padding: EdgeInsets.only(bottom: context.viewInsets.bottom), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: LocationPicker(onSelected: handleOnSelect, filter: filter.value.location), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + isDismissible: true, + child: FilterBottomSheetScaffold( + title: 'search_filter_location_title'.t(context: context), + onSearch: handleApply, + onClear: handleClear, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 16.0), + child: Container( + padding: EdgeInsets.only(bottom: context.viewInsets.bottom), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: LocationPicker(onSelected: handleOnSelect, filter: filter.value.location), + ), ), ), ), @@ -259,17 +267,19 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(camera: camera)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - isDismissible: true, - child: FilterBottomSheetScaffold( - title: 'search_filter_camera_title'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: Padding( - padding: const EdgeInsets.all(16.0), - child: CameraPicker(onSelect: handleOnSelect, filter: filter.value.camera), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + isDismissible: true, + child: FilterBottomSheetScaffold( + title: 'search_filter_camera_title'.t(context: context), + onSearch: handleApply, + onClear: handleClear, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: CameraPicker(onSelect: handleOnSelect, filter: filter.value.camera), + ), ), ), ); @@ -339,22 +349,24 @@ class DriftSearchPage extends HookConsumerWidget { } void showQuickDatePicker() { - showFilterBottomSheet( - context: context, - child: FilterBottomSheetScaffold( - title: "pick_date_range".tr(), - expanded: true, - onClear: () => datePicked(null), - child: QuickDatePicker( - currentInput: dateInputFilter.value, - onRequestPicker: () { - ContextHelper(context).pop(); - showDatePicker(); - }, - onSelect: (date) { - ContextHelper(context).pop(); - datePicked(date); - }, + unawaited( + showFilterBottomSheet( + context: context, + child: FilterBottomSheetScaffold( + title: "pick_date_range".tr(), + expanded: true, + onClear: () => datePicked(null), + child: QuickDatePicker( + currentInput: dateInputFilter.value, + onRequestPicker: () { + ContextHelper(context).pop(); + unawaited(showDatePicker()); + }, + onSelect: (date) { + ContextHelper(context).pop(); + datePicked(date); + }, + ), ), ), ); @@ -383,13 +395,15 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(mediaType: mediaType)); } - showFilterBottomSheet( - context: context, - child: FilterBottomSheetScaffold( - title: 'search_filter_media_type_title'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: MediaTypePicker(onSelect: handleOnSelected, filter: filter.value.mediaType), + unawaited( + showFilterBottomSheet( + context: context, + child: FilterBottomSheetScaffold( + title: 'search_filter_media_type_title'.t(context: context), + onSearch: handleApply, + onClear: handleClear, + child: MediaTypePicker(onSelect: handleOnSelected, filter: filter.value.mediaType), + ), ), ); } @@ -417,14 +431,16 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(rating: rating)); } - showFilterBottomSheet( - context: context, - isScrollControlled: true, - child: FilterBottomSheetScaffold( - title: 'rating'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: StarRatingPicker(onSelect: handleOnSelected, filter: filter.value.rating), + unawaited( + showFilterBottomSheet( + context: context, + isScrollControlled: true, + child: FilterBottomSheetScaffold( + title: 'rating'.t(context: context), + onSearch: handleApply, + onClear: handleClear, + child: StarRatingPicker(onSelect: handleOnSelected, filter: filter.value.rating), + ), ), ); } @@ -462,13 +478,15 @@ class DriftSearchPage extends HookConsumerWidget { search(filter.value.copyWith(display: display)); } - showFilterBottomSheet( - context: context, - child: FilterBottomSheetScaffold( - title: 'display_options'.t(context: context), - onSearch: handleApply, - onClear: handleClear, - child: DisplayOptionPicker(onSelect: handleOnSelect, filter: filter.value.display), + unawaited( + showFilterBottomSheet( + context: context, + child: FilterBottomSheetScaffold( + title: 'display_options'.t(context: context), + onSearch: handleApply, + onClear: handleClear, + child: DisplayOptionPicker(onSelect: handleOnSelect, filter: filter.value.display), + ), ), ); } @@ -697,7 +715,7 @@ class DriftSearchPage extends HookConsumerWidget { if (filter.value.isEmpty) const _SearchSuggestions() else - _SearchResultGrid(onScrollEnd: loadMoreSearchResults), + _SearchResultGrid(onScrollEnd: () => loadMoreSearchResults()), ], ), ); diff --git a/mobile/lib/presentation/pages/search/paginated_search.provider.dart b/mobile/lib/presentation/pages/search/paginated_search.provider.dart index fa2d5a06cf..e9839f31ea 100644 --- a/mobile/lib/presentation/pages/search/paginated_search.provider.dart +++ b/mobile/lib/presentation/pages/search/paginated_search.provider.dart @@ -70,7 +70,7 @@ class PaginatedSearchNotifier extends StateNotifier { @override void dispose() { - _assetCountController.close(); + unawaited(_assetCountController.close()); super.dispose(); } } diff --git a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart index 86d3fa0749..bcd3b20df6 100644 --- a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -36,11 +38,11 @@ class _AddActionButtonState extends ConsumerState { case AddToMenuItem.album: _openAlbumSelector(); case AddToMenuItem.archive: - performArchiveAction(context, ref, source: ActionSource.viewer); + unawaited(performArchiveAction(context, ref, source: ActionSource.viewer)); case AddToMenuItem.unarchive: - performUnArchiveAction(context, ref, source: ActionSource.viewer); + unawaited(performUnArchiveAction(context, ref, source: ActionSource.viewer)); case AddToMenuItem.lockedFolder: - performMoveToLockFolderAction(context, ref, source: ActionSource.viewer); + unawaited(performMoveToLockFolderAction(context, ref, source: ActionSource.viewer)); } } @@ -112,21 +114,23 @@ class _AddActionButtonState extends ConsumerState { AlbumSelector(onAlbumSelected: (album) => _addCurrentAssetToAlbum(album)), ]; - showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (_) { - return BaseBottomSheet( - actions: const [], - slivers: slivers, - initialChildSize: 0.6, - minChildSize: 0.3, - maxChildSize: 0.95, - expand: false, - backgroundColor: context.isDarkTheme ? Colors.black : Colors.white, - ); - }, + unawaited( + showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) { + return BaseBottomSheet( + actions: const [], + slivers: slivers, + initialChildSize: 0.6, + minChildSize: 0.3, + maxChildSize: 0.95, + expand: false, + backgroundColor: context.isDarkTheme ? Colors.black : Colors.white, + ); + }, + ), ); } diff --git a/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart index 7a4f84fb4f..9465f50500 100644 --- a/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; @@ -21,7 +23,7 @@ class CastActionButton extends ConsumerWidget { iconColor: isCasting ? context.primaryColor : null, // null = default color label: "cast".t(context: context), onPressed: () { - showDialog(context: context, builder: (context) => const CastDialog()); + unawaited(showDialog(context: context, builder: (context) => const CastDialog())); }, iconOnly: iconOnly, menuItem: menuItem, diff --git a/mobile/lib/presentation/widgets/action_buttons/download_status_floating_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/download_status_floating_button.widget.dart index efa7f5c6d0..264e489db3 100644 --- a/mobile/lib/presentation/widgets/action_buttons/download_status_floating_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/download_status_floating_button.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -33,7 +35,7 @@ class DownloadStatusFloatingButton extends ConsumerWidget { : context.colorScheme.surfaceBright, elevation: 2, onPressed: () { - context.pushRoute(const DownloadInfoRoute()); + unawaited(context.pushRoute(const DownloadInfoRoute())); }, child: Stack( alignment: AlignmentDirectional.center, diff --git a/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart index c8dbb7cb1f..5b41715022 100644 --- a/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -13,12 +15,12 @@ class SetProfilePictureActionButton extends ConsumerWidget { const SetProfilePictureActionButton({super.key, required this.asset, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context) { + Future _onTap(BuildContext context) async { if (!context.mounted) { return; } - context.pushRoute(ProfilePictureCropRoute(asset: asset)); + await context.pushRoute(ProfilePictureCropRoute(asset: asset)); } @override @@ -28,7 +30,7 @@ class SetProfilePictureActionButton extends ConsumerWidget { label: "set_as_profile_picture".t(context: context), iconOnly: iconOnly, menuItem: menuItem, - onPressed: () => _onTap(context), + onPressed: () => unawaited(_onTap(context)), maxWidth: 100, ); } diff --git a/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart index ef520ea941..eadcf0a81e 100644 --- a/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart @@ -138,31 +138,33 @@ class ShareActionButton extends ConsumerWidget { await showDialog( context: context, builder: (BuildContext buildContext) { - ref - .read(actionProvider.notifier) - .shareAssets( - source, - context, - fileType: fileType, - cancelCompleter: cancelCompleter, - onAssetDownloadProgress: (value) => progress.value = value, - ) - .then((ActionResult result) { - if (cancelCompleter.isCompleted || !context.mounted) { - return; - } + unawaited( + ref + .read(actionProvider.notifier) + .shareAssets( + source, + context, + fileType: fileType, + cancelCompleter: cancelCompleter, + onAssetDownloadProgress: (value) => progress.value = value, + ) + .then((ActionResult result) { + if (cancelCompleter.isCompleted || !context.mounted) { + return; + } - if (!result.success) { - ImmichToast.show( - context: context, - msg: context.t.scaffold_body_error_occurred, - gravity: ToastGravity.BOTTOM, - toastType: ToastType.error, - ); - } + if (!result.success) { + ImmichToast.show( + context: context, + msg: context.t.scaffold_body_error_occurred, + gravity: ToastGravity.BOTTOM, + toastType: ToastType.error, + ); + } - buildContext.pop(); - }); + buildContext.pop(); + }), + ); return preparingDialog; }, diff --git a/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart index 479cf2dfe9..fdbc7a8cda 100644 --- a/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -12,12 +14,12 @@ class SlideshowActionButton extends ConsumerWidget { const SlideshowActionButton({super.key, this.iconOnly = false, this.menuItem = false}); - void _onTap(BuildContext context, WidgetRef ref) { + Future _onTap(BuildContext context, WidgetRef ref) async { if (!context.mounted) { return; } - context.pushRoute(DriftSlideshowRoute(timeline: ref.read(timelineServiceProvider))); + await context.pushRoute(DriftSlideshowRoute(timeline: ref.read(timelineServiceProvider))); } @override @@ -27,7 +29,7 @@ class SlideshowActionButton extends ConsumerWidget { label: "slideshow".t(context: context), iconOnly: iconOnly, menuItem: menuItem, - onPressed: () => _onTap(context, ref), + onPressed: () => unawaited(_onTap(context, ref)), maxWidth: 100, ); } diff --git a/mobile/lib/presentation/widgets/album/album_selector.widget.dart b/mobile/lib/presentation/widgets/album/album_selector.widget.dart index ba6c6da560..bf5de5611d 100644 --- a/mobile/lib/presentation/widgets/album/album_selector.widget.dart +++ b/mobile/lib/presentation/widgets/album/album_selector.widget.dart @@ -63,7 +63,7 @@ class _AlbumSelectorState extends ConsumerState { isGrid = albumConfig.isGrid; }); - ref.read(remoteAlbumProvider.notifier).refresh(); + unawaited(ref.read(remoteAlbumProvider.notifier).refresh()); }); searchController.addListener(() { @@ -81,7 +81,7 @@ class _AlbumSelectorState extends ConsumerState { final userId = ref.read(currentUserProvider)?.id; filter = filter.copyWith(query: searchTerm, userId: userId, mode: filterMode); - filterAlbums(); + unawaited(filterAlbums()); } Future onRefresh() async { @@ -92,7 +92,7 @@ class _AlbumSelectorState extends ConsumerState { setState(() { isGrid = !isGrid; }); - ref.read(settingsProvider).write(.albumIsGrid, isGrid); + unawaited(ref.read(settingsProvider).write(.albumIsGrid, isGrid)); } void changeFilter(QuickFilterMode mode) { @@ -100,7 +100,7 @@ class _AlbumSelectorState extends ConsumerState { filter = filter.copyWith(mode: mode); }); - filterAlbums(); + unawaited(filterAlbums()); } Future changeSort(AlbumSort sort) async { @@ -121,7 +121,7 @@ class _AlbumSelectorState extends ConsumerState { searchController.clear(); }); - filterAlbums(); + unawaited(filterAlbums()); } Future sortAlbums() async { diff --git a/mobile/lib/presentation/widgets/album/pending_uploads_banner.widget.dart b/mobile/lib/presentation/widgets/album/pending_uploads_banner.widget.dart index 2701316e75..5622ed6b1b 100644 --- a/mobile/lib/presentation/widgets/album/pending_uploads_banner.widget.dart +++ b/mobile/lib/presentation/widgets/album/pending_uploads_banner.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; @@ -45,8 +47,8 @@ class PendingUploadsBanner extends ConsumerWidget { ); } - static void _openSheet(BuildContext context, String albumId) { - showModalBottomSheet( + static Future _openSheet(BuildContext context, String albumId) { + return showModalBottomSheet( context: context, showDragHandle: true, builder: (_) => _PendingUploadsSheet(albumId: albumId), @@ -97,7 +99,7 @@ class _PendingUploadsBannerContent extends StatelessWidget { return Material( color: hasFailures ? context.colorScheme.errorContainer : context.colorScheme.surfaceContainerHigh, child: InkWell( - onTap: () => PendingUploadsBanner._openSheet(context, albumId), + onTap: () => unawaited(PendingUploadsBanner._openSheet(context, albumId)), child: Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart index 379f0975b1..8edfca5bf1 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; @@ -48,7 +50,7 @@ class _LocationDetailsState extends ConsumerState { if (widget.exifInfo != oldWidget.exifInfo) { final exif = widget.exifInfo; if (exif != null && exif.hasCoordinates) { - _mapController?.moveCamera(CameraUpdate.newLatLng(LatLng(exif.latitude!, exif.longitude!))); + unawaited(_mapController?.moveCamera(CameraUpdate.newLatLng(LatLng(exif.latitude!, exif.longitude!)))); } } } diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/people_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/people_details.widget.dart index 278da294c0..72db236b3c 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/people_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/people_details.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -74,7 +76,7 @@ class PeopleDetails extends ConsumerWidget { return; } ContextHelper(context).pop(); - context.pushRoute(DriftPersonRoute(person: person)); + unawaited(context.pushRoute(DriftPersonRoute(person: person))); }, onNameTap: () => showNameEditModal(person), ), diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart index 1ef22a891f..7233356402 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart @@ -87,8 +87,8 @@ class _AssetPageState extends ConsumerState { @override void dispose() { _scrollController.dispose(); - _scaleBoundarySub?.cancel(); - _eventSubscription?.cancel(); + unawaited(_scaleBoundarySub?.cancel()); + unawaited(_eventSubscription?.cancel()); super.dispose(); } @@ -112,7 +112,7 @@ class _AssetPageState extends ConsumerState { return; } _viewer.setShowingDetails(true); - _scrollController.animateTo(_snapOffset, duration: Durations.medium2, curve: Curves.easeOutCubic); + unawaited(_scrollController.animateTo(_snapOffset, duration: Durations.medium2, curve: Curves.easeOutCubic)); } bool _willClose(double scrollVelocity) => @@ -199,7 +199,7 @@ class _AssetPageState extends ConsumerState { case _DragIntent.dismiss: const popThreshold = 75.0; if (details.localPosition.dy - start!.localPosition.dy > popThreshold) { - context.maybePop(); + unawaited(context.maybePop()); return; } _viewController?.animateMultiple( @@ -292,14 +292,14 @@ class _AssetPageState extends ConsumerState { } void _listenForScaleBoundaries(PhotoViewControllerBase? controller) { - _scaleBoundarySub?.cancel(); + unawaited(_scaleBoundarySub?.cancel()); _scaleBoundarySub = null; if (controller == null || controller.scaleBoundaries != null) { return; } _scaleBoundarySub = controller.outputStateStream.listen((_) { if (controller.scaleBoundaries != null) { - _scaleBoundarySub?.cancel(); + unawaited(_scaleBoundarySub?.cancel()); _scaleBoundarySub = null; if (mounted) { setState(() {}); diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart index 3952dafdb2..23cc6119fb 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart @@ -107,7 +107,7 @@ class _AssetViewerState extends ConsumerState { final maxPage = _totalAssets - 1; if (target >= 0 && target <= maxPage) { _pageController.jumpToPage(target); - _onAssetChanged(target); + unawaited(_onAssetChanged(target)); } } @@ -126,14 +126,14 @@ class _AssetViewerState extends ConsumerState { WidgetsBinding.instance.addPostFrameCallback(_onAssetInit); final assetViewer = ref.read(assetViewerProvider); - _setSystemUIMode(assetViewer.showingControls, assetViewer.showingDetails); + unawaited(_setSystemUIMode(assetViewer.showingControls, assetViewer.showingDetails)); } @override void dispose() { _pageController.dispose(); _preloader.dispose(); - _reloadSubscription?.cancel(); + unawaited(_reloadSubscription?.cancel()); _stackChildrenKeepAlive?.close(); unawaited(restoreEdgeToEdge()); @@ -157,7 +157,7 @@ class _AssetViewerState extends ConsumerState { final page = _pageController.page?.round(); if (page != null && page != _currentPage) { - _onAssetChanged(page); + unawaited(_onAssetChanged(page)); } return false; } @@ -223,7 +223,7 @@ class _AssetViewerState extends ConsumerState { case ViewerReloadAssetEvent(): _onViewerReloadEvent(); case final ViewerStackAssetDeletedEvent event: - _onViewerStackAssetDeletedEvent(event); + unawaited(_onViewerStackAssetDeletedEvent(event)); default: } } @@ -235,8 +235,8 @@ class _AssetViewerState extends ConsumerState { final index = _pageController.page?.round() ?? 0; final target = index >= _totalAssets - 1 ? index - 1 : index + 1; - _pageController.animateToPage(target, duration: Durations.medium1, curve: Curves.easeInOut); - _onAssetChanged(target); + unawaited(_pageController.animateToPage(target, duration: Durations.medium1, curve: Curves.easeInOut)); + unawaited(_onAssetChanged(target)); } Future _onViewerStackAssetDeletedEvent(ViewerStackAssetDeletedEvent event) async { @@ -271,7 +271,7 @@ class _AssetViewerState extends ConsumerState { final totalAssets = timelineService.totalAssets; if (totalAssets == 0) { - context.maybePop(); + unawaited(context.maybePop()); return; } @@ -281,14 +281,14 @@ class _AssetViewerState extends ConsumerState { if (index != _currentPage) { _pageController.jumpToPage(index); - _onAssetChanged(index); + unawaited(_onAssetChanged(index)); } else if (currentAsset is RemoteAsset && currentAsset.stackId != null && assetIndex == null) { final timelineAsset = timelineService.getAssetSafe(index); if (timelineAsset is! RemoteAsset || currentAsset.stackId != timelineAsset.stackId) { - _onAssetChanged(index); + unawaited(_onAssetChanged(index)); } } else if (currentAsset != null && assetIndex == null) { - _onAssetChanged(index); + unawaited(_onAssetChanged(index)); } if (_totalAssets != totalAssets) { @@ -298,9 +298,9 @@ class _AssetViewerState extends ConsumerState { } } - void _setSystemUIMode(bool controls, bool details) { + Future _setSystemUIMode(bool controls, bool details) { final immersive = !controls || (CurrentPlatform.isIOS && details); - unawaited(immersive ? SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky) : restoreEdgeToEdge()); + return immersive ? SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky) : restoreEdgeToEdge(); } @override @@ -324,7 +324,7 @@ class _AssetViewerState extends ConsumerState { ref.listen(assetViewerProvider.select((value) => (value.showingControls, value.showingDetails)), (_, state) { final (controls, details) = state; - _setSystemUIMode(controls, details); + unawaited(_setSystemUIMode(controls, details)); }); return AnnotatedRegion( diff --git a/mobile/lib/presentation/widgets/asset_viewer/ocr_overlay.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/ocr_overlay.widget.dart index a9291f3173..576d4937b6 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/ocr_overlay.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/ocr_overlay.widget.dart @@ -82,7 +82,7 @@ class _OcrOverlayState extends ConsumerState { } void _detachController() { - _controllerSub?.cancel(); + unawaited(_controllerSub?.cancel()); _controllerSub = null; } diff --git a/mobile/lib/presentation/widgets/asset_viewer/sheet_tile.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/sheet_tile.widget.dart index 69e84ee03d..ac6f79a155 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/sheet_tile.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/sheet_tile.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -26,7 +28,7 @@ class SheetTile extends ConsumerWidget { }); void copyTitle(BuildContext context, WidgetRef ref) { - Clipboard.setData(ClipboardData(text: title)); + unawaited(Clipboard.setData(ClipboardData(text: title))); ImmichToast.show( context: context, msg: 'copied_to_clipboard'.t(context: context), diff --git a/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart index 6f2398046f..63b5663d9d 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/video_viewer.widget.dart @@ -66,7 +66,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg if (!widget.isCurrent) { _loadTimer?.cancel(); - _notifier.pause(); + unawaited(_notifier.pause()); return; } @@ -293,7 +293,7 @@ class _NativeVideoViewerState extends ConsumerState with Widg _controller = nc; if (widget.isCurrent) { - _loadVideo(); + unawaited(_loadVideo()); } } diff --git a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart index 878a1c9405..9c9f8f7139 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -52,11 +54,13 @@ class ViewerTopAppBar extends ConsumerWidget implements PreferredSizeWidget { IconButton( icon: const Icon(Icons.chat_outlined), onPressed: () { - context.router.push( - DriftActivitiesRoute( - album: album, - assetId: asset is RemoteAsset ? asset.id : null, - assetName: asset.name, + unawaited( + context.router.push( + DriftActivitiesRoute( + album: album, + assetId: asset is RemoteAsset ? asset.id : null, + assetName: asset.name, + ), ), ); }, diff --git a/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart index d5ed3f6c96..a066e0167e 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; @@ -53,10 +55,12 @@ class _BaseDraggableScrollableSheetState extends ConsumerState } if (previous?.isInteracting != true && next.isInteracting) { - _controller.animateTo( - widget.minChildSize, - duration: const Duration(milliseconds: 200), - curve: Curves.easeInOut, + unawaited( + _controller.animateTo( + widget.minChildSize, + duration: const Duration(milliseconds: 200), + curve: Curves.easeInOut, + ), ); } }); diff --git a/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart b/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart index 2c89c68d99..d748452c0e 100644 --- a/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart +++ b/mobile/lib/presentation/widgets/feature_message/feature_message_dialog.widget.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:math' as math; import 'package:easy_localization/easy_localization.dart'; @@ -60,7 +61,7 @@ class _FeatureMessageDialogState extends State<_FeatureMessageDialog> with Singl Navigator.of(context).pop(); return; } - _controller.nextPage(duration: const Duration(milliseconds: 320), curve: Curves.easeOutCubic); + unawaited(_controller.nextPage(duration: const Duration(milliseconds: 320), curve: Curves.easeOutCubic)); } List _borderColors(BuildContext context) { diff --git a/mobile/lib/presentation/widgets/images/full_image.widget.dart b/mobile/lib/presentation/widgets/images/full_image.widget.dart index 78fc0a6a21..8c92ac2818 100644 --- a/mobile/lib/presentation/widgets/images/full_image.widget.dart +++ b/mobile/lib/presentation/widgets/images/full_image.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; @@ -30,7 +32,7 @@ class FullImage extends StatelessWidget { height: size.height, fit: fit, errorBuilder: (context, error, stackTrace) { - provider.evict(); + unawaited(provider.evict()); return const Icon(Icons.image_not_supported_outlined, size: 32); }, ); diff --git a/mobile/lib/presentation/widgets/images/image_provider.dart b/mobile/lib/presentation/widgets/images/image_provider.dart index 9cc386e302..927734ca25 100644 --- a/mobile/lib/presentation/widgets/images/image_provider.dart +++ b/mobile/lib/presentation/widgets/images/image_provider.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:io'; import 'dart:ui' as ui; @@ -43,10 +44,12 @@ mixin CancellableImageProviderMixin on CancellableImageProvide return cachedImage; } - completer.operation.valueOrCancellation().whenComplete(() { - cachedStream.removeListener(listener); - cachedOperation = null; - }); + unawaited( + completer.operation.valueOrCancellation().whenComplete(() { + cachedStream.removeListener(listener); + cachedOperation = null; + }), + ); cachedOperation = completer.operation; return null; } @@ -138,7 +141,7 @@ mixin CancellableImageProviderMixin on CancellableImageProvide final operation = cachedOperation; if (operation != null) { cachedOperation = null; - operation.cancel(); + unawaited(operation.cancel()); } if (hasActiveWork) { diff --git a/mobile/lib/presentation/widgets/images/thumbnail.widget.dart b/mobile/lib/presentation/widgets/images/thumbnail.widget.dart index 847fa4e381..90bb79cced 100644 --- a/mobile/lib/presentation/widgets/images/thumbnail.widget.dart +++ b/mobile/lib/presentation/widgets/images/thumbnail.widget.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:ui' as ui; import 'package:flutter/material.dart'; @@ -130,9 +131,9 @@ class _ThumbnailState extends State with SingleTickerProviderStateMix if ((synchronousCall && _providerImage == null) || !_isVisible()) { _fadeController.value = 1.0; } else if (_fadeController.isAnimating) { - _fadeController.forward(); + unawaited(_fadeController.forward()); } else { - _fadeController.forward(from: 0.0); + unawaited(_fadeController.forward(from: 0.0)); } setState(() { diff --git a/mobile/lib/presentation/widgets/map/map.state.dart b/mobile/lib/presentation/widgets/map/map.state.dart index f1b4f80ec1..eedf3aadf5 100644 --- a/mobile/lib/presentation/widgets/map/map.state.dart +++ b/mobile/lib/presentation/widgets/map/map.state.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/events.model.dart'; @@ -87,32 +89,32 @@ class MapStateNotifier extends Notifier { } void switchFavoriteOnly(bool isFavoriteOnly) { - ref.read(settingsProvider).write(.mapShowFavoriteOnly, isFavoriteOnly); + unawaited(ref.read(settingsProvider).write(.mapShowFavoriteOnly, isFavoriteOnly)); state = state.copyWith(onlyFavorites: isFavoriteOnly); EventStream.shared.emit(const MapMarkerReloadEvent()); } void switchIncludeArchived(bool isIncludeArchived) { - ref.read(settingsProvider).write(.mapIncludeArchived, isIncludeArchived); + unawaited(ref.read(settingsProvider).write(.mapIncludeArchived, isIncludeArchived)); state = state.copyWith(includeArchived: isIncludeArchived); EventStream.shared.emit(const MapMarkerReloadEvent()); } void switchWithPartners(bool isWithPartners) { - ref.read(settingsProvider).write(.mapWithPartners, isWithPartners); + unawaited(ref.read(settingsProvider).write(.mapWithPartners, isWithPartners)); state = state.copyWith(withPartners: isWithPartners); EventStream.shared.emit(const MapMarkerReloadEvent()); } void setRelativeTime(int relativeDays) { - ref.read(settingsProvider).write(.mapRelativeDate, relativeDays); + unawaited(ref.read(settingsProvider).write(.mapRelativeDate, relativeDays)); state = state.copyWith(relativeDays: relativeDays); EventStream.shared.emit(const MapMarkerReloadEvent()); } void setCustomTimeRange(TimeRange range) { - ref.read(settingsProvider).write(.mapCustomFrom, range.from); - ref.read(settingsProvider).write(.mapCustomTo, range.to); + unawaited(ref.read(settingsProvider).write(.mapCustomFrom, range.from)); + unawaited(ref.read(settingsProvider).write(.mapCustomTo, range.to)); state = state.copyWith(timeRange: range); EventStream.shared.emit(const MapMarkerReloadEvent()); } diff --git a/mobile/lib/presentation/widgets/map/map.widget.dart b/mobile/lib/presentation/widgets/map/map.widget.dart index a68a475ad4..918d64054b 100644 --- a/mobile/lib/presentation/widgets/map/map.widget.dart +++ b/mobile/lib/presentation/widgets/map/map.widget.dart @@ -66,7 +66,7 @@ class _DriftMapState extends ConsumerState { void dispose() { _debouncer.dispose(); bottomSheetOffset.dispose(); - _eventSubscription?.cancel(); + unawaited(_eventSubscription?.cancel()); super.dispose(); } diff --git a/mobile/lib/presentation/widgets/memory/memory_lane.widget.dart b/mobile/lib/presentation/widgets/memory/memory_lane.widget.dart index 62889b10cb..b0b7816889 100644 --- a/mobile/lib/presentation/widgets/memory/memory_lane.widget.dart +++ b/mobile/lib/presentation/widgets/memory/memory_lane.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -33,7 +35,7 @@ class DriftMemoryLane extends ConsumerWidget { if (memories[index].assets.isNotEmpty) { DriftMemoryPage.setMemory(ref, memories[index]); } - context.pushRoute(DriftMemoryRoute(memories: memories, memoryIndex: index)); + unawaited(context.pushRoute(DriftMemoryRoute(memories: memories, memoryIndex: index))); }, children: memories .map((memory) => DriftMemoryCard(key: Key(memory.id), memory: memory)) diff --git a/mobile/lib/presentation/widgets/timeline/header.widget.dart b/mobile/lib/presentation/widgets/timeline/header.widget.dart index d73d024efb..76176041fa 100644 --- a/mobile/lib/presentation/widgets/timeline/header.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/header.widget.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -105,7 +107,7 @@ class _BulkSelectIconButton extends ConsumerWidget { ? const SizedBox.shrink() : IconButton( onPressed: () { - ref.read(multiSelectProvider.notifier).toggleBucketSelection(assetOffset, bucket.assetCount); + unawaited(ref.read(multiSelectProvider.notifier).toggleBucketSelection(assetOffset, bucket.assetCount)); ref.read(hapticFeedbackProvider.notifier).heavyImpact(); }, icon: isAllSelected diff --git a/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart b/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart index f5e3493a8e..eb081a1e6a 100644 --- a/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/scrubber.widget.dart @@ -152,7 +152,7 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi void _resetThumbTimer() { _fadeOutTimer?.cancel(); _fadeOutTimer = Timer(kTimelineScrubberFadeOutDuration, () { - _thumbAnimationController.reverse(); + unawaited(_thumbAnimationController.reverse()); _fadeOutTimer = null; }); } @@ -177,10 +177,10 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi if (notification is ScrollUpdateNotification) { _thumbTopOffset = _currentOffset; if (_labelAnimation.status != AnimationStatus.reverse) { - _labelAnimationController.reverse(); + unawaited(_labelAnimationController.reverse()); } if (_thumbAnimationController.status != AnimationStatus.forward) { - _thumbAnimationController.forward(); + unawaited(_thumbAnimationController.forward()); } } _resetThumbTimer(); @@ -210,7 +210,7 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi void _onDragStart(DragStartDetails _) { setState(() { _isDragging = true; - _labelAnimationController.forward(); + unawaited(_labelAnimationController.forward()); _fadeOutTimer?.cancel(); _lastLabel = null; }); @@ -226,7 +226,7 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi } if (_thumbAnimationController.status != AnimationStatus.forward) { - _thumbAnimationController.forward(); + unawaited(_thumbAnimationController.forward()); } final dragPosition = _calculateDragPosition(details); @@ -344,7 +344,7 @@ class ScrubberState extends ConsumerState with TickerProviderStateMixi } void _onDragEnd(DragEndDetails _) { - _labelAnimationController.reverse(); + unawaited(_labelAnimationController.reverse()); setState(() { _isDragging = false; }); diff --git a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart index 5bd39deb8a..9e65dcb72c 100644 --- a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart @@ -258,7 +258,7 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> with WidgetsBi void dispose() { WidgetsBinding.instance.removeObserver(this); _scrollController.dispose(); - _eventSubscription?.cancel(); + unawaited(_eventSubscription?.cancel()); super.dispose(); } @@ -269,9 +269,11 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> with WidgetsBi final timelineState = ref.read(timelineStateProvider.notifier); timelineState.setScrubbing(true); - _scrollController - .animateTo(0, duration: const Duration(milliseconds: 250), curve: Curves.easeInOut) - .whenComplete(() => timelineState.setScrubbing(false)); + unawaited( + _scrollController + .animateTo(0, duration: const Duration(milliseconds: 250), curve: Curves.easeInOut) + .whenComplete(() => timelineState.setScrubbing(false)), + ); } void _scrollToDate(DateTime date) { @@ -303,13 +305,15 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> with WidgetsBi // Scroll to the segment with a small offset to show the header final targetOffset = fallbackSegment.startOffset - 50; timelineState.setScrubbing(true); - _scrollController - .animateTo( - targetOffset.clamp(0.0, _scrollController.position.maxScrollExtent), - duration: const Duration(milliseconds: 500), - curve: Curves.easeInOut, - ) - .whenComplete(() => timelineState.setScrubbing(false)); + unawaited( + _scrollController + .animateTo( + targetOffset.clamp(0.0, _scrollController.position.maxScrollExtent), + duration: const Duration(milliseconds: 500), + curve: Curves.easeInOut, + ) + .whenComplete(() => timelineState.setScrubbing(false)), + ); } else { timelineState.setScrubbing(false); } @@ -344,8 +348,8 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> with WidgetsBi }); } - void _dragScroll(ScrollDirection direction) { - _scrollController.animateTo( + Future _dragScroll(ScrollDirection direction) { + return _scrollController.animateTo( _scrollController.offset + (direction == ScrollDirection.forward ? 175 : -175), duration: const Duration(milliseconds: 125), curve: Curves.easeOut, @@ -488,7 +492,7 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> with WidgetsBi _restoreAssetIndex = targetAssetIndex; }); - ref.read(settingsProvider).write(.timelineTilesPerRow, _perRow); + unawaited(ref.read(settingsProvider).write(.timelineTilesPerRow, _perRow)); } }; }, @@ -498,7 +502,7 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> with WidgetsBi onStart: !isReadonlyModeEnabled ? _setDragStartIndex : null, onAssetEnter: _handleDragAssetEnter, onEnd: !isReadonlyModeEnabled ? _stopDrag : null, - onScroll: _dragScroll, + onScroll: (direction) => unawaited(_dragScroll(direction)), onScrollStart: () { // Minimize the bottom sheet when drag selection starts ref.read(timelineStateProvider.notifier).setScrolling(true); diff --git a/mobile/lib/providers/app_life_cycle.provider.dart b/mobile/lib/providers/app_life_cycle.provider.dart index 2b52973c0a..8678f7c32e 100644 --- a/mobile/lib/providers/app_life_cycle.provider.dart +++ b/mobile/lib/providers/app_life_cycle.provider.dart @@ -120,7 +120,7 @@ class AppLifeCycleNotifier extends StateNotifier { if (syncSuccess) { await Future.wait([ _safeRun(backgroundManager.hashAssets(), "hashAssets").then((_) { - _resumeBackup(); + unawaited(_resumeBackup()); }), _resumeBackup(), // TODO: Bring back when the soft freeze issue is addressed diff --git a/mobile/lib/providers/asset_viewer/asset_viewer.provider.dart b/mobile/lib/providers/asset_viewer/asset_viewer.provider.dart index 6808860ffc..7b1d5d2caa 100644 --- a/mobile/lib/providers/asset_viewer/asset_viewer.provider.dart +++ b/mobile/lib/providers/asset_viewer/asset_viewer.provider.dart @@ -88,7 +88,7 @@ class AssetViewerStateNotifier extends Notifier { } void reset() { - _assetSubscription?.cancel(); + unawaited(_assetSubscription?.cancel()); _assetSubscription = null; state = const AssetViewerState(); } @@ -102,7 +102,7 @@ class AssetViewerStateNotifier extends Notifier { } void _watchCurrentAsset(BaseAsset asset) { - _assetSubscription?.cancel(); + unawaited(_assetSubscription?.cancel()); _assetSubscription = ref.read(assetServiceProvider).watchAsset(asset).listen((updated) { if (updated != null) { state = state.copyWith(currentAsset: updated); diff --git a/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart b/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart index 51119f4ba2..47d67c9674 100644 --- a/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart +++ b/mobile/lib/providers/asset_viewer/share_intent_upload.provider.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:io'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -33,7 +34,7 @@ class ShareIntentUploadStateNotifier extends StateNotifier route.name == "ShareIntentRoute"); clearAttachments(); addAttachments(attachments); - router.push(ShareIntentRoute(attachments: attachments)); + unawaited(router.push(ShareIntentRoute(attachments: attachments))); } void addAttachments(List attachments) { diff --git a/mobile/lib/providers/asset_viewer/video_player_provider.dart b/mobile/lib/providers/asset_viewer/video_player_provider.dart index 463a1ac3d2..74d697a2ea 100644 --- a/mobile/lib/providers/asset_viewer/video_player_provider.dart +++ b/mobile/lib/providers/asset_viewer/video_player_provider.dart @@ -50,7 +50,7 @@ class VideoPlayerNotifier extends StateNotifier { void dispose() { _bufferingTimer?.cancel(); _seekTimer?.cancel(); - WakelockPlus.disable(); + unawaited(WakelockPlus.disable()); _controller = null; super.dispose(); @@ -121,7 +121,7 @@ class VideoPlayerNotifier extends StateNotifier { } _seekTimer = Timer(const Duration(milliseconds: 150), () { - _controller?.seekTo(state.position.inMilliseconds); + unawaited(_controller?.seekTo(state.position.inMilliseconds)); }); } @@ -130,11 +130,11 @@ class VideoPlayerNotifier extends StateNotifier { switch (state.status) { case VideoPlaybackStatus.paused: - play(); + unawaited(play()); case VideoPlaybackStatus.playing || VideoPlaybackStatus.buffering: - pause(); + unawaited(pause()); case VideoPlaybackStatus.completed: - restart(); + unawaited(restart()); } } @@ -145,7 +145,7 @@ class VideoPlayerNotifier extends StateNotifier { } _holdStatus = state.status; - pause(); + unawaited(pause()); } /// Restores playback to the status before [hold] was called. @@ -155,7 +155,7 @@ class VideoPlayerNotifier extends StateNotifier { switch (status) { case VideoPlaybackStatus.playing || VideoPlaybackStatus.buffering: - play(); + unawaited(play()); default: } } @@ -238,7 +238,7 @@ class VideoPlayerNotifier extends StateNotifier { final newStatus = _mapStatus(playbackInfo.status); switch (newStatus) { case VideoPlaybackStatus.playing: - WakelockPlus.enable(); + unawaited(WakelockPlus.enable()); _startBufferingTimer(); default: onNativePlaybackEnded(); @@ -250,7 +250,7 @@ class VideoPlayerNotifier extends StateNotifier { } void onNativePlaybackEnded() { - WakelockPlus.disable(); + unawaited(WakelockPlus.disable()); _bufferingTimer?.cancel(); } diff --git a/mobile/lib/providers/backup/backup_album.provider.dart b/mobile/lib/providers/backup/backup_album.provider.dart index f81f905c2f..25a4204928 100644 --- a/mobile/lib/providers/backup/backup_album.provider.dart +++ b/mobile/lib/providers/backup/backup_album.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/album/local_album.model.dart'; import 'package:immich_mobile/domain/services/local_album.service.dart'; @@ -10,7 +12,7 @@ final backupAlbumProvider = StateNotifierProvider> { BackupAlbumNotifier(this._localAlbumService) : super([]) { - getAll(); + unawaited(getAll()); } final LocalAlbumService _localAlbumService; diff --git a/mobile/lib/providers/cast.provider.dart b/mobile/lib/providers/cast.provider.dart index 943ac930ec..776888146b 100644 --- a/mobile/lib/providers/cast.provider.dart +++ b/mobile/lib/providers/cast.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/models/cast/cast_manager_state.dart'; @@ -51,7 +53,7 @@ class CastNotifier extends StateNotifier { } void loadMedia(RemoteAsset asset, bool reload) { - _gCastService.loadMedia(asset, reload); + unawaited(_gCastService.loadMedia(asset, reload)); } Future connect(CastDestinationType type, dynamic device) async { diff --git a/mobile/lib/providers/cleanup.provider.dart b/mobile/lib/providers/cleanup.provider.dart index 378ceb010f..4316b4eb00 100644 --- a/mobile/lib/providers/cleanup.provider.dart +++ b/mobile/lib/providers/cleanup.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; @@ -87,18 +89,18 @@ class CleanupNotifier extends StateNotifier { state = state.copyWith(selectedDate: date, assetsToDelete: []); if (date != null) { final daysAgo = DateTime.now().difference(date).inDays; - _settingsRepository.write(.cleanupCutoffDaysAgo, daysAgo); + unawaited(_settingsRepository.write(.cleanupCutoffDaysAgo, daysAgo)); } } void setKeepMediaType(AssetKeepType keepMediaType) { state = state.copyWith(keepMediaType: keepMediaType, assetsToDelete: []); - _settingsRepository.write(.cleanupKeepMediaType, keepMediaType); + unawaited(_settingsRepository.write(.cleanupKeepMediaType, keepMediaType)); } void setKeepFavorites(bool keepFavorites) { state = state.copyWith(keepFavorites: keepFavorites, assetsToDelete: []); - _settingsRepository.write(.cleanupKeepFavorites, keepFavorites); + unawaited(_settingsRepository.write(.cleanupKeepFavorites, keepFavorites)); } void toggleKeepAlbum(String albumId) { @@ -118,7 +120,7 @@ class CleanupNotifier extends StateNotifier { } void _persistExcludedAlbumIds(Set albumIds) { - _settingsRepository.write(.cleanupKeepAlbumIds, albumIds.toList()); + unawaited(_settingsRepository.write(.cleanupKeepAlbumIds, albumIds.toList())); } void cleanupStaleAlbumIds(Set existingAlbumIds) { @@ -144,7 +146,7 @@ class CleanupNotifier extends StateNotifier { _persistExcludedAlbumIds(keepAlbumIds); } - _settingsRepository.write(.cleanupDefaultsInitialized, true); + unawaited(_settingsRepository.write(.cleanupDefaultsInitialized, true)); } Future scanAssets() async { diff --git a/mobile/lib/providers/gallery_permission.provider.dart b/mobile/lib/providers/gallery_permission.provider.dart index 315c67a214..6d4703c834 100644 --- a/mobile/lib/providers/gallery_permission.provider.dart +++ b/mobile/lib/providers/gallery_permission.provider.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:io'; import 'package:device_info_plus/device_info_plus.dart'; @@ -9,7 +10,7 @@ class GalleryPermissionNotifier extends StateNotifier { : super(PermissionStatus.denied) // Denied is the initial state { // Sets the initial state - getGalleryPermissionStatus(); + unawaited(getGalleryPermissionStatus()); } bool get hasPermission => state.isGranted || state.isLimited; diff --git a/mobile/lib/providers/haptic_feedback.provider.dart b/mobile/lib/providers/haptic_feedback.provider.dart index e1ce5c8d0d..850935163d 100644 --- a/mobile/lib/providers/haptic_feedback.provider.dart +++ b/mobile/lib/providers/haptic_feedback.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/providers/app_settings.provider.dart'; @@ -15,31 +17,31 @@ class HapticNotifier extends StateNotifier { void selectionClick() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.selectionClick(); + unawaited(HapticFeedback.selectionClick()); } } void lightImpact() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.lightImpact(); + unawaited(HapticFeedback.lightImpact()); } } void mediumImpact() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.mediumImpact(); + unawaited(HapticFeedback.mediumImpact()); } } void heavyImpact() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.heavyImpact(); + unawaited(HapticFeedback.heavyImpact()); } } void vibrate() { if (_ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.enableHapticFeedback)) { - HapticFeedback.vibrate(); + unawaited(HapticFeedback.vibrate()); } } } diff --git a/mobile/lib/providers/infrastructure/readonly_mode.provider.dart b/mobile/lib/providers/infrastructure/readonly_mode.provider.dart index d503919c90..be94a8a341 100644 --- a/mobile/lib/providers/infrastructure/readonly_mode.provider.dart +++ b/mobile/lib/providers/infrastructure/readonly_mode.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/providers/app_settings.provider.dart'; import 'package:immich_mobile/providers/auth.provider.dart'; @@ -16,11 +18,11 @@ class ReadOnlyModeNotifier extends Notifier { void setMode(bool value) { final isLoggedIn = ref.read(authProvider).isAuthenticated; - _appSettingService.setSetting(AppSettingsEnum.readonlyModeEnabled, value); + unawaited(_appSettingService.setSetting(AppSettingsEnum.readonlyModeEnabled, value)); state = value; if (value && isLoggedIn) { - ref.read(appRouterProvider).navigate(const MainTimelineRoute()); + unawaited(ref.read(appRouterProvider).navigate(const MainTimelineRoute())); } } diff --git a/mobile/lib/providers/local_auth.provider.dart b/mobile/lib/providers/local_auth.provider.dart index d2860975bb..58bd4fb0f8 100644 --- a/mobile/lib/providers/local_auth.provider.dart +++ b/mobile/lib/providers/local_auth.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -21,9 +23,11 @@ class LocalAuthNotifier extends StateNotifier { LocalAuthNotifier(this._localAuthService, this._secureStorageService) : super(const BiometricStatus(availableBiometrics: [], canAuthenticate: false)) { - _localAuthService.getStatus().then((value) { - state = state.copyWith(canAuthenticate: value.canAuthenticate, availableBiometrics: value.availableBiometrics); - }); + unawaited( + _localAuthService.getStatus().then((value) { + state = state.copyWith(canAuthenticate: value.canAuthenticate, availableBiometrics: value.availableBiometrics); + }), + ); } Future registerBiometric(BuildContext context, String pinCode) async { diff --git a/mobile/lib/providers/map/map_state.provider.dart b/mobile/lib/providers/map/map_state.provider.dart index b643264dca..12e9e59fac 100644 --- a/mobile/lib/providers/map/map_state.provider.dart +++ b/mobile/lib/providers/map/map_state.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/models/map/map_state.model.dart'; @@ -26,12 +28,12 @@ class MapStateNotifier extends Notifier { } void switchTheme(ThemeMode mode) { - ref.read(settingsProvider).write(.mapThemeMode, mode); + unawaited(ref.read(settingsProvider).write(.mapThemeMode, mode)); state = state.copyWith(themeMode: mode); } void switchFavoriteOnly(bool isFavoriteOnly) { - ref.read(settingsProvider).write(.mapShowFavoriteOnly, isFavoriteOnly); + unawaited(ref.read(settingsProvider).write(.mapShowFavoriteOnly, isFavoriteOnly)); state = state.copyWith(showFavoriteOnly: isFavoriteOnly, shouldRefetchMarkers: true); } @@ -40,17 +42,17 @@ class MapStateNotifier extends Notifier { } void switchIncludeArchived(bool isIncludeArchived) { - ref.read(settingsProvider).write(.mapIncludeArchived, isIncludeArchived); + unawaited(ref.read(settingsProvider).write(.mapIncludeArchived, isIncludeArchived)); state = state.copyWith(includeArchived: isIncludeArchived, shouldRefetchMarkers: true); } void switchWithPartners(bool isWithPartners) { - ref.read(settingsProvider).write(.mapWithPartners, isWithPartners); + unawaited(ref.read(settingsProvider).write(.mapWithPartners, isWithPartners)); state = state.copyWith(withPartners: isWithPartners, shouldRefetchMarkers: true); } void setRelativeTime(int relativeTime) { - ref.read(settingsProvider).write(.mapRelativeDate, relativeTime); + unawaited(ref.read(settingsProvider).write(.mapRelativeDate, relativeTime)); state = state.copyWith(relativeTime: relativeTime, shouldRefetchMarkers: true); } } diff --git a/mobile/lib/providers/permission.provider.dart b/mobile/lib/providers/permission.provider.dart index b7011e1357..dc82285122 100644 --- a/mobile/lib/providers/permission.provider.dart +++ b/mobile/lib/providers/permission.provider.dart @@ -10,7 +10,7 @@ class NotificationPermissionNotifier extends StateNotifier { NotificationPermissionNotifier() : super(Platform.isAndroid ? PermissionStatus.granted : PermissionStatus.restricted) { // Sets the initial state - getNotificationPermission().then((p) => state = p); + unawaited(getNotificationPermission().then((p) => state = p)); } /// Requests the notification permission diff --git a/mobile/lib/providers/server_info.provider.dart b/mobile/lib/providers/server_info.provider.dart index bf83b36f54..c25e496a04 100644 --- a/mobile/lib/providers/server_info.provider.dart +++ b/mobile/lib/providers/server_info.provider.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/models/server_info/server_config.model.dart'; @@ -77,7 +79,7 @@ class ServerInfoNotifier extends StateNotifier { void handleReleaseInfo(ServerVersion serverVersion, ServerVersion? latestVersion) { // Update local server version - _checkServerVersionMismatch(serverVersion, latestVersion: latestVersion); + unawaited(_checkServerVersionMismatch(serverVersion, latestVersion: latestVersion)); } Future getServerFeatures() async { diff --git a/mobile/lib/providers/shared_link.provider.dart b/mobile/lib/providers/shared_link.provider.dart index fb44aea203..096919f28a 100644 --- a/mobile/lib/providers/shared_link.provider.dart +++ b/mobile/lib/providers/shared_link.provider.dart @@ -8,7 +8,7 @@ class SharedLinksNotifier extends StateNotifier>> { final SharedLinkService _sharedLinkService; SharedLinksNotifier(this._sharedLinkService) : super(const AsyncLoading()) { - fetchLinks(); + unawaited(fetchLinks()); } Future fetchLinks() async { diff --git a/mobile/lib/providers/user.provider.dart b/mobile/lib/providers/user.provider.dart index 622847b0c2..2feb39ce5c 100644 --- a/mobile/lib/providers/user.provider.dart +++ b/mobile/lib/providers/user.provider.dart @@ -22,7 +22,7 @@ class CurrentUserProvider extends StateNotifier { @override void dispose() { - streamSub.cancel(); + unawaited(streamSub.cancel()); super.dispose(); } } diff --git a/mobile/lib/providers/websocket.provider.dart b/mobile/lib/providers/websocket.provider.dart index a7c08457af..2eb8ddc2b4 100644 --- a/mobile/lib/providers/websocket.provider.dart +++ b/mobile/lib/providers/websocket.provider.dart @@ -143,8 +143,8 @@ class WebsocketNotifier extends StateNotifier { } void _handleOnConfigUpdate(dynamic _) { - _ref.read(serverInfoProvider.notifier).getServerFeatures(); - _ref.read(serverInfoProvider.notifier).getServerConfig(); + unawaited(_ref.read(serverInfoProvider.notifier).getServerFeatures()); + unawaited(_ref.read(serverInfoProvider.notifier).getServerConfig()); } void _handleReleaseUpdates(dynamic data) { @@ -203,7 +203,7 @@ class WebsocketNotifier extends StateNotifier { unawaited( _ref.read(backgroundSyncProvider).syncWebsocketBatchV1(_batchedAssetUploadReady.toList()).then((_) { if (isSyncAlbumEnabled) { - _ref.read(backgroundSyncProvider).syncLinkedAlbum(); + unawaited(_ref.read(backgroundSyncProvider).syncLinkedAlbum()); } }), ); @@ -224,7 +224,7 @@ class WebsocketNotifier extends StateNotifier { unawaited( _ref.read(backgroundSyncProvider).syncWebsocketBatchV2(_batchedAssetUploadReady.toList()).then((_) { if (isSyncAlbumEnabled) { - _ref.read(backgroundSyncProvider).syncLinkedAlbum(); + unawaited(_ref.read(backgroundSyncProvider).syncLinkedAlbum()); } }), ); diff --git a/mobile/lib/routing/app_navigation_observer.dart b/mobile/lib/routing/app_navigation_observer.dart index 57304af44f..f126788008 100644 --- a/mobile/lib/routing/app_navigation_observer.dart +++ b/mobile/lib/routing/app_navigation_observer.dart @@ -13,10 +13,12 @@ class AppNavigationObserver extends AutoRouterObserver { @override void didPush(Route route, Route? previousRoute) { - Future(() { - ref.read(currentRouteNameProvider.notifier).state = route.settings.name; - ref.read(previousRouteNameProvider.notifier).state = previousRoute?.settings.name; - ref.read(previousRouteDataProvider.notifier).state = previousRoute?.settings; - }); + unawaited( + Future(() { + ref.read(currentRouteNameProvider.notifier).state = route.settings.name; + ref.read(previousRouteNameProvider.notifier).state = previousRoute?.settings.name; + ref.read(previousRouteDataProvider.notifier).state = previousRoute?.settings; + }), + ); } } diff --git a/mobile/lib/services/background_upload.service.dart b/mobile/lib/services/background_upload.service.dart index 5b379ff890..5312107f6c 100644 --- a/mobile/lib/services/background_upload.service.dart +++ b/mobile/lib/services/background_upload.service.dart @@ -135,12 +135,12 @@ class BackgroundUploadService { if (!_taskStatusController.isClosed) { _taskStatusController.add(update); } - _handleTaskStatusUpdate(update); + unawaited(_handleTaskStatusUpdate(update)); } void dispose() { - _taskStatusController.close(); - _taskProgressController.close(); + unawaited(_taskStatusController.close()); + unawaited(_taskProgressController.close()); } /// Enqueue tasks to the background upload queue diff --git a/mobile/lib/services/map.service.dart b/mobile/lib/services/map.service.dart index 5b50e8a890..b439af8668 100644 --- a/mobile/lib/services/map.service.dart +++ b/mobile/lib/services/map.service.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:immich_mobile/mixins/error_logger.mixin.dart'; import 'package:immich_mobile/models/map/map_marker.model.dart'; import 'package:immich_mobile/services/api.service.dart'; @@ -11,7 +13,7 @@ class MapService with ErrorLoggerMixin { final logger = Logger("MapService"); MapService(this._apiService) { - _setMapUserAgentHeader(); + unawaited(_setMapUserAgentHeader()); } Future _setMapUserAgentHeader() async { diff --git a/mobile/lib/services/share_intent_service.dart b/mobile/lib/services/share_intent_service.dart index fca5c4a188..a5ab5d8bc9 100644 --- a/mobile/lib/services/share_intent_service.dart +++ b/mobile/lib/services/share_intent_service.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/models/upload/share_intent_attachment.model.dart'; import 'package:immich_mobile/repositories/share_handler.repository.dart'; @@ -12,6 +14,6 @@ class ShareIntentService { void init() { shareHandlerRepository.onSharedMedia = onSharedMedia; - shareHandlerRepository.init(); + unawaited(shareHandlerRepository.init()); } } diff --git a/mobile/lib/utils/async_mutex.dart b/mobile/lib/utils/async_mutex.dart index b97ab9b052..6c54c1220d 100644 --- a/mobile/lib/utils/async_mutex.dart +++ b/mobile/lib/utils/async_mutex.dart @@ -12,10 +12,12 @@ class AsyncMutex { Future run(Future Function() operation) { final completer = Completer(); _enqueued++; - _running.whenComplete(() { - _enqueued--; - completer.complete(Future.sync(operation)); - }); + unawaited( + _running.whenComplete(() { + _enqueued--; + completer.complete(Future.sync(operation)); + }), + ); return _running = completer.future; } } diff --git a/mobile/lib/utils/hooks/app_settings_update_hook.dart b/mobile/lib/utils/hooks/app_settings_update_hook.dart index c498b60b06..9d7cc4b064 100644 --- a/mobile/lib/utils/hooks/app_settings_update_hook.dart +++ b/mobile/lib/utils/hooks/app_settings_update_hook.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/cupertino.dart'; import 'package:flutter_hooks/flutter_hooks.dart' hide Store; import 'package:immich_mobile/entities/store.entity.dart'; @@ -7,7 +9,7 @@ ValueNotifier useAppSettingsState(AppSettingsEnum key) { final notifier = useState(Store.get(key.storeKey, key.defaultValue)); // Listen to changes to the notifier and update app settings - useValueChanged(notifier.value, (_, __) => Store.put(key.storeKey, notifier.value)); + useValueChanged(notifier.value, (_, __) => unawaited(Store.put(key.storeKey, notifier.value))); return notifier; } diff --git a/mobile/lib/utils/image_converter.dart b/mobile/lib/utils/image_converter.dart index d0fd4f873f..1a3a00130a 100644 --- a/mobile/lib/utils/image_converter.dart +++ b/mobile/lib/utils/image_converter.dart @@ -15,13 +15,15 @@ Future imageToUint8List(Image image) async { .resolve(ImageConfiguration.empty) .addListener( ImageStreamListener((ImageInfo info, bool _) { - info.image.toByteData(format: ImageByteFormat.png).then((byteData) { - if (byteData != null) { - completer.complete(byteData.buffer.asUint8List()); - } else { - completer.completeError('Failed to convert image to bytes'); - } - }); + unawaited( + info.image.toByteData(format: ImageByteFormat.png).then((byteData) { + if (byteData != null) { + completer.complete(byteData.buffer.asUint8List()); + } else { + completer.completeError('Failed to convert image to bytes'); + } + }), + ); }, onError: (exception, stackTrace) => completer.completeError(exception)), ); return completer.future; diff --git a/mobile/lib/widgets/asset_viewer/animated_play_pause.dart b/mobile/lib/widgets/asset_viewer/animated_play_pause.dart index 4be7f49b5a..bad8a6345c 100644 --- a/mobile/lib/widgets/asset_viewer/animated_play_pause.dart +++ b/mobile/lib/widgets/asset_viewer/animated_play_pause.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:ui'; import 'package:flutter/material.dart'; @@ -27,9 +28,9 @@ class AnimatedPlayPauseState extends State with SingleTickerP super.didUpdateWidget(oldWidget); if (widget.playing != oldWidget.playing) { if (widget.playing) { - animationController.forward(); + unawaited(animationController.forward()); } else { - animationController.reverse(); + unawaited(animationController.reverse()); } } } diff --git a/mobile/lib/widgets/backup/drift_album_info_list_tile.dart b/mobile/lib/widgets/backup/drift_album_info_list_tile.dart index 85f655ec86..999b64e9de 100644 --- a/mobile/lib/widgets/backup/drift_album_info_list_tile.dart +++ b/mobile/lib/widgets/backup/drift_album_info_list_tile.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; @@ -54,7 +56,7 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { ref.watch(hapticFeedbackProvider.notifier).selectionClick(); if (isExcluded) { - ref.read(backupAlbumProvider.notifier).deselectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).deselectAlbum(album)); } else { if (album.id == 'isAll' || album.name == 'Recents') { ImmichToast.show( @@ -66,7 +68,7 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { return; } - ref.read(backupAlbumProvider.notifier).excludeAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).excludeAlbum(album)); } }, child: ListTile( @@ -75,9 +77,9 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { onTap: () { ref.read(hapticFeedbackProvider.notifier).selectionClick(); if (isSelected) { - ref.read(backupAlbumProvider.notifier).deselectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).deselectAlbum(album)); } else { - ref.read(backupAlbumProvider.notifier).selectAlbum(album); + unawaited(ref.read(backupAlbumProvider.notifier).selectAlbum(album)); } }, leading: buildIcon(), @@ -85,7 +87,7 @@ class DriftAlbumInfoListTile extends HookConsumerWidget { subtitle: buildSubtitle(), trailing: IconButton( onPressed: () { - context.pushRoute(LocalTimelineRoute(album: album)); + unawaited(context.pushRoute(LocalTimelineRoute(album: album))); }, icon: Icon(Icons.image_outlined, color: context.primaryColor, size: 24), splashRadius: 25, diff --git a/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart b/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart index 22c860becf..085f4e2120 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart @@ -38,8 +38,8 @@ class ImmichAppBarDialog extends HookConsumerWidget { final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); useEffect(() { - ref.read(backupProvider.notifier).updateDiskInfo(); - ref.read(currentUserProvider.notifier).refresh(); + unawaited(ref.read(backupProvider.notifier).updateDiskInfo()); + unawaited(ref.read(currentUserProvider.notifier).refresh()); return null; }, []); @@ -180,7 +180,7 @@ class ImmichAppBarDialog extends HookConsumerWidget { InkWell( onTap: () { ContextHelper(context).pop(); - launchUrl(Uri.parse('https://docs.immich.app'), mode: LaunchMode.externalApplication); + unawaited(launchUrl(Uri.parse('https://docs.immich.app'), mode: LaunchMode.externalApplication)); }, child: Text("documentation", style: context.textTheme.bodySmall).tr(), ), @@ -188,7 +188,9 @@ class ImmichAppBarDialog extends HookConsumerWidget { InkWell( onTap: () { ContextHelper(context).pop(); - launchUrl(Uri.parse('https://github.com/immich-app/immich'), mode: LaunchMode.externalApplication); + unawaited( + launchUrl(Uri.parse('https://github.com/immich-app/immich'), mode: LaunchMode.externalApplication), + ); }, child: Text("profile_drawer_github", style: context.textTheme.bodySmall).tr(), ), diff --git a/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart b/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart index fbec03bbbd..348e3aa14c 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/app_bar_server_info.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart' hide Store; @@ -31,7 +33,7 @@ class AppBarServerInfo extends HookConsumerWidget { } useEffect(() { - getPackageInfo(); + unawaited(getPackageInfo()); return null; }, []); @@ -87,7 +89,7 @@ class _ServerInfoItem extends StatelessWidget { return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - if (icon != null) ...[icon as Widget, const SizedBox(width: 8)], + if (icon != null) ...[icon! as Widget, const SizedBox(width: 8)], Text( label, style: TextStyle( diff --git a/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart b/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart index c29475351e..806ac87c19 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/server_update_notification.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:io'; import 'package:easy_localization/easy_localization.dart'; @@ -20,7 +21,7 @@ class ServerUpdateNotification extends HookConsumerWidget { final Color infoColor = context.isDarkTheme ? context.primaryColor.withAlpha(55) : context.primaryColor.withAlpha(25); - void openUpdateLink() { + Future openUpdateLink() { String url; if (serverInfoState.versionStatus == VersionStatus.serverOutOfDate) { url = kImmichLatestRelease; @@ -35,7 +36,7 @@ class ServerUpdateNotification extends HookConsumerWidget { } } - launchUrlString(url, mode: LaunchMode.externalApplication); + return launchUrlString(url, mode: LaunchMode.externalApplication); } return SizedBox( @@ -68,7 +69,7 @@ class ServerUpdateNotification extends HookConsumerWidget { serverInfoState.versionStatus == VersionStatus.clientOutOfDate) ...[ const SizedBox(width: 8), TextButton( - onPressed: openUpdateLink, + onPressed: () => unawaited(openUpdateLink()), style: TextButton.styleFrom( padding: const EdgeInsets.all(4), minimumSize: Size.zero, diff --git a/mobile/lib/widgets/common/dropdown_search_menu.dart b/mobile/lib/widgets/common/dropdown_search_menu.dart index bf0c75c8aa..54568c392a 100644 --- a/mobile/lib/widgets/common/dropdown_search_menu.dart +++ b/mobile/lib/widgets/common/dropdown_search_menu.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:collection/collection.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -114,7 +116,7 @@ class DropdownSearchMenu extends HookWidget { final bool highlight = AutocompleteHighlightedOption.of(context) == index; if (highlight) { SchedulerBinding.instance.addPostFrameCallback((Duration timeStamp) { - Scrollable.ensureVisible(context, alignment: 0.5); + unawaited(Scrollable.ensureVisible(context, alignment: 0.5)); }, debugLabel: 'AutocompleteOptions.ensureVisible'); } return Container( diff --git a/mobile/lib/widgets/common/immich_loading_indicator.dart b/mobile/lib/widgets/common/immich_loading_indicator.dart index 52f957f7e7..1fdc5213df 100644 --- a/mobile/lib/widgets/common/immich_loading_indicator.dart +++ b/mobile/lib/widgets/common/immich_loading_indicator.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:immich_mobile/widgets/common/immich_logo.dart'; @@ -9,11 +11,12 @@ class ImmichLoadingIndicator extends HookWidget { @override Widget build(BuildContext context) { - final logoAnimationController = useAnimationController(duration: const Duration(seconds: 6)) - ..reverse() - ..repeat(); + final logoAnimationController = useAnimationController(duration: const Duration(seconds: 6)); + unawaited(logoAnimationController.reverse()); + unawaited(logoAnimationController.repeat()); - final borderAnimationController = useAnimationController(duration: const Duration(seconds: 6))..repeat(); + final borderAnimationController = useAnimationController(duration: const Duration(seconds: 6)); + unawaited(borderAnimationController.repeat()); return Container( height: 80, diff --git a/mobile/lib/widgets/common/immich_sliver_app_bar.dart b/mobile/lib/widgets/common/immich_sliver_app_bar.dart index 22528b05d5..c5bce92cff 100644 --- a/mobile/lib/widgets/common/immich_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/immich_sliver_app_bar.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:math' as math; import 'package:auto_route/auto_route.dart'; @@ -304,13 +305,13 @@ class _SyncStatusIndicatorState extends ConsumerState<_SyncStatusIndicator> with // Control animations based on sync status if (isSyncing) { if (!_rotationController.isAnimating) { - _rotationController.repeat(); + unawaited(_rotationController.repeat()); } _dismissalController.reset(); } else { _rotationController.stop(); if (_dismissalController.status == AnimationStatus.dismissed) { - _dismissalController.forward(); + unawaited(_dismissalController.forward()); } } diff --git a/mobile/lib/widgets/common/mesmerizing_sliver_app_bar.dart b/mobile/lib/widgets/common/mesmerizing_sliver_app_bar.dart index 90dfd9c82a..0ceb98aa76 100644 --- a/mobile/lib/widgets/common/mesmerizing_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/mesmerizing_sliver_app_bar.dart @@ -134,7 +134,7 @@ class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with S Future.delayed(const Duration(milliseconds: 100), () { if (mounted) { - _slideController.forward(); + unawaited(_slideController.forward()); } }); } @@ -228,7 +228,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> { @override void dispose() { - _reloadSubscription?.cancel(); + unawaited(_reloadSubscription?.cancel()); super.dispose(); } @@ -311,13 +311,17 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with Tic void _startAnimationCycle() { if (_isZoomingIn) { - _zoomController.forward().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.forward().then((_) { + unawaited(_loadNextAsset()); + }), + ); } else { - _zoomController.reverse().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.reverse().then((_) { + unawaited(_loadNextAsset()); + }), + ); } } diff --git a/mobile/lib/widgets/common/person_sliver_app_bar.dart b/mobile/lib/widgets/common/person_sliver_app_bar.dart index 80dded2130..0e6829243c 100644 --- a/mobile/lib/widgets/common/person_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/person_sliver_app_bar.dart @@ -169,7 +169,7 @@ class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with S Future.delayed(const Duration(milliseconds: 100), () { if (mounted) { - _slideController.forward(); + unawaited(_slideController.forward()); } }); } @@ -335,7 +335,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> { @override void dispose() { - _reloadSubscription?.cancel(); + unawaited(_reloadSubscription?.cancel()); super.dispose(); } @@ -416,13 +416,17 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with Tic void _startAnimationCycle() { if (_isZoomingIn) { - _zoomController.forward().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.forward().then((_) { + unawaited(_loadNextAsset()); + }), + ); } else { - _zoomController.reverse().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.reverse().then((_) { + unawaited(_loadNextAsset()); + }), + ); } } diff --git a/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart b/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart index 4d2dc5ef88..09a0367039 100644 --- a/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart +++ b/mobile/lib/widgets/common/remote_album_sliver_app_bar.dart @@ -172,7 +172,7 @@ class _ExpandedBackgroundState extends ConsumerState<_ExpandedBackground> with S Future.delayed(const Duration(milliseconds: 100), () { if (mounted) { - _slideController.forward(); + unawaited(_slideController.forward()); } }); } @@ -309,7 +309,7 @@ class _ItemCountTextState extends ConsumerState<_ItemCountText> { @override void dispose() { - _reloadSubscription?.cancel(); + unawaited(_reloadSubscription?.cancel()); super.dispose(); } @@ -390,13 +390,17 @@ class _RandomAssetBackgroundState extends State<_RandomAssetBackground> with Tic void _startAnimationCycle() { if (_isZoomingIn) { - _zoomController.forward().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.forward().then((_) { + unawaited(_loadNextAsset()); + }), + ); } else { - _zoomController.reverse().then((_) { - _loadNextAsset(); - }); + unawaited( + _zoomController.reverse().then((_) { + unawaited(_loadNextAsset()); + }), + ); } } diff --git a/mobile/lib/widgets/forms/login/login_form.dart b/mobile/lib/widgets/forms/login/login_form.dart index 4c9b56646f..969c311bfb 100644 --- a/mobile/lib/widgets/forms/login/login_form.dart +++ b/mobile/lib/widgets/forms/login/login_form.dart @@ -70,7 +70,8 @@ class LoginForm extends HookConsumerWidget { final isOauthEnable = useState(false); final isPasswordLoginEnable = useState(false); final oAuthButtonLabel = useState('OAuth'); - final logoAnimationController = useAnimationController(duration: const Duration(seconds: 60))..repeat(); + final logoAnimationController = useAnimationController(duration: const Duration(seconds: 60)); + unawaited(logoAnimationController.repeat()); final serverInfo = ref.watch(serverInfoProvider); final warningMessage = useState(null); final loginFormKey = GlobalKey(); @@ -358,7 +359,7 @@ class LoginForm extends HookConsumerWidget { } SingleChildRenderObjectWidget buildVersionCompatWarning() { - checkVersionMismatch(); + unawaited(checkVersionMismatch()); if (warningMessage.value == null) { return const SizedBox.shrink(); diff --git a/mobile/lib/widgets/photo_view/src/controller/photo_view_controller.dart b/mobile/lib/widgets/photo_view/src/controller/photo_view_controller.dart index b9475a9ee2..08c300e9ae 100644 --- a/mobile/lib/widgets/photo_view/src/controller/photo_view_controller.dart +++ b/mobile/lib/widgets/photo_view/src/controller/photo_view_controller.dart @@ -209,7 +209,7 @@ class PhotoViewController implements PhotoViewControllerBase return; } _scaleAnimation = Tween(begin: from, end: to).animate(_scaleAnimationController); - _scaleAnimationController - ..value = 0.0 - ..fling(velocity: 0.4); + _scaleAnimationController.value = 0.0; + unawaited(_scaleAnimationController.fling(velocity: 0.4)); } void animatePosition(Offset from, Offset to) { @@ -250,9 +251,8 @@ class PhotoViewCoreState extends State return; } _positionAnimation = Tween(begin: from, end: to).animate(_positionAnimationController); - _positionAnimationController - ..value = 0.0 - ..fling(velocity: 0.4); + _positionAnimationController.value = 0.0; + unawaited(_positionAnimationController.fling(velocity: 0.4)); } void animateRotation(double from, double to) { @@ -260,9 +260,8 @@ class PhotoViewCoreState extends State return; } _rotationAnimation = Tween(begin: from, end: to).animate(_rotationAnimationController); - _rotationAnimationController - ..value = 0.0 - ..fling(velocity: 0.4); + _rotationAnimationController.value = 0.0; + unawaited(_rotationAnimationController.fling(velocity: 0.4)); } void onAnimationStatus(AnimationStatus status) { diff --git a/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart b/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart index db66cb962d..e55df57105 100644 --- a/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart +++ b/mobile/lib/widgets/photo_view/src/photo_view_wrappers.dart @@ -82,7 +82,6 @@ class _ImageWrapperState extends State { ImageStreamListener? _imageStreamListener; ImageStream? _imageStream; ImageChunkEvent? _loadingProgress; - ImageInfo? _imageInfo; bool _loading = true; Size? _imageSize; Object? _lastException; @@ -138,7 +137,6 @@ class _ImageWrapperState extends State { void setupCB() { _imageSize = Size(info.image.width.toDouble(), info.image.height.toDouble()); _loading = false; - _imageInfo = _imageInfo; _loadingProgress = null; _lastException = null; diff --git a/mobile/lib/widgets/settings/advanced_settings.dart b/mobile/lib/widgets/settings/advanced_settings.dart index 1c1d42639f..dbf54fd082 100644 --- a/mobile/lib/widgets/settings/advanced_settings.dart +++ b/mobile/lib/widgets/settings/advanced_settings.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:io'; import 'package:device_info_plus/device_info_plus.dart'; @@ -35,13 +36,16 @@ class AdvancedSettings extends HookConsumerWidget { final preferRemote = useState(ref.read(appConfigProvider).image.preferRemote); useValueChanged( preferRemote.value, - (_, __) => ref.read(settingsProvider).write(.imagePreferRemote, preferRemote.value), + (_, __) => unawaited(ref.read(settingsProvider).write(.imagePreferRemote, preferRemote.value)), ); final readonlyModeEnabled = useAppSettingsState(AppSettingsEnum.readonlyModeEnabled); final logLevel = Level.LEVELS[levelId.value].name; - useValueChanged(levelId.value, (_, __) => LogService.I.setLogLevel(Level.LEVELS[levelId.value].toLogLevel())); + useValueChanged( + levelId.value, + (_, __) => unawaited(LogService.I.setLogLevel(Level.LEVELS[levelId.value].toLogLevel())), + ); Future checkAndroidVersion() async { if (Platform.isAndroid) { @@ -54,12 +58,12 @@ class AdvancedSettings extends HookConsumerWidget { } useEffect(() { - () async { + unawaited(() async { isManageMediaSupported.value = await checkAndroidVersion(); if (isManageMediaSupported.value) { manageMediaAndroidPermission.value = await ref.read(permissionRepositoryProvider).hasManageMediaPermission(); } - }(); + }()); return null; }, []); diff --git a/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart b/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart index f915df04f8..eda0d819d5 100644 --- a/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart +++ b/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -15,7 +17,7 @@ class LayoutSettings extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final tilesPerRow = useState(ref.read(appConfigProvider.select((s) => s.timeline.tilesPerRow))); useValueChanged(tilesPerRow.value, (_, __) { - ref.read(settingsProvider).write(.timelineTilesPerRow, tilesPerRow.value); + unawaited(ref.read(settingsProvider).write(.timelineTilesPerRow, tilesPerRow.value)); }); return Column( diff --git a/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart b/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart index 3ac72d6612..1f3f4bbcf0 100644 --- a/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart +++ b/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -21,7 +23,7 @@ class AssetListSettings extends HookConsumerWidget { valueNotifier: storageIndicator, title: 'theme_setting_asset_list_storage_indicator_title'.tr(), onChanged: (value) { - ref.read(settingsProvider).write(.timelineStorageIndicator, value); + unawaited(ref.read(settingsProvider).write(.timelineStorageIndicator, value)); ref.invalidate(appSettingsServiceProvider); ref.invalidate(settingsProvider); }, diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart b/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart index f65af6af9d..e3173dcdc7 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_quality_setting.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -14,7 +16,7 @@ class ImageViewerQualitySetting extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final isOriginal = useState(ref.read(appConfigProvider).image.loadOriginal); useValueChanged(isOriginal.value, (_, __) { - ref.read(settingsProvider).write(.imageLoadOriginal, isOriginal.value); + unawaited(ref.read(settingsProvider).write(.imageLoadOriginal, isOriginal.value)); }); return Column( diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart b/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart index 730521e3c1..c785e8fed4 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/image_viewer_tap_to_navigate_setting.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -13,7 +15,7 @@ class ImageViewerTapToNavigateSetting extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final tapToNavigate = useState(ref.read(appConfigProvider).viewer.tapToNavigate); useValueChanged(tapToNavigate.value, (_, __) { - ref.read(settingsProvider).write(.viewerTapToNavigate, tapToNavigate.value); + unawaited(ref.read(settingsProvider).write(.viewerTapToNavigate, tapToNavigate.value)); }); return Column( diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/slideshow_settings.dart b/mobile/lib/widgets/settings/asset_viewer_settings/slideshow_settings.dart index af361943ec..ec52d23ca8 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/slideshow_settings.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/slideshow_settings.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -22,16 +24,16 @@ class SlideshowSettings extends HookConsumerWidget { final useDirection = useState(slideshow.direction); useValueChanged(useRepeat.value, (_, __) { - ref.read(settingsProvider).write(.slideshowRepeat, useRepeat.value); + unawaited(ref.read(settingsProvider).write(.slideshowRepeat, useRepeat.value)); }); useValueChanged(useDuration.value, (_, __) { - ref.read(settingsProvider).write(.slideshowDuration, useDuration.value); + unawaited(ref.read(settingsProvider).write(.slideshowDuration, useDuration.value)); }); useValueChanged(useLook.value, (_, __) { - ref.read(settingsProvider).write(.slideshowLook, useLook.value); + unawaited(ref.read(settingsProvider).write(.slideshowLook, useLook.value)); }); useValueChanged(useDirection.value, (_, __) { - ref.read(settingsProvider).write(.slideshowDirection, useDirection.value); + unawaited(ref.read(settingsProvider).write(.slideshowDirection, useDirection.value)); }); return Column( diff --git a/mobile/lib/widgets/settings/asset_viewer_settings/video_viewer_settings.dart b/mobile/lib/widgets/settings/asset_viewer_settings/video_viewer_settings.dart index 81929d95b9..2b302e0427 100644 --- a/mobile/lib/widgets/settings/asset_viewer_settings/video_viewer_settings.dart +++ b/mobile/lib/widgets/settings/asset_viewer_settings/video_viewer_settings.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -17,13 +19,13 @@ class VideoViewerSettings extends HookConsumerWidget { final useOriginalVideo = useState(viewer.loadOriginalVideo); useValueChanged(useAutoPlayVideo.value, (_, __) { - ref.read(settingsProvider).write(.viewerAutoPlayVideo, useAutoPlayVideo.value); + unawaited(ref.read(settingsProvider).write(.viewerAutoPlayVideo, useAutoPlayVideo.value)); }); useValueChanged(useLoopVideo.value, (_, __) { - ref.read(settingsProvider).write(.viewerLoopVideo, useLoopVideo.value); + unawaited(ref.read(settingsProvider).write(.viewerLoopVideo, useLoopVideo.value)); }); useValueChanged(useOriginalVideo.value, (_, __) { - ref.read(settingsProvider).write(.viewerLoadOriginalVideo, useOriginalVideo.value); + unawaited(ref.read(settingsProvider).write(.viewerLoadOriginalVideo, useOriginalVideo.value)); }); return Column( diff --git a/mobile/lib/widgets/settings/backup_settings/drift_backup_settings.dart b/mobile/lib/widgets/settings/backup_settings/drift_backup_settings.dart index 44a1a1d7a9..f0f6435f90 100644 --- a/mobile/lib/widgets/settings/backup_settings/drift_backup_settings.dart +++ b/mobile/lib/widgets/settings/backup_settings/drift_backup_settings.dart @@ -232,7 +232,7 @@ class _BackupOnlyWhenChargingButton extends ConsumerWidget { titleKey: "charging", subtitleKey: "charging_requirement_mobile_backup", onChanged: (value) { - fgService.configure(requireCharging: value); + unawaited(fgService.configure(requireCharging: value)); }, ); } diff --git a/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart b/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart index 7bd604ae5e..1871dc8a62 100644 --- a/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart +++ b/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart @@ -132,7 +132,7 @@ class SyncStatusAndActions extends HookConsumerWidget { leading: const Icon(Icons.sync), trailing: _SyncStatusIcon(status: ref.watch(syncStatusProvider).localSyncStatus), onTap: () { - ref.read(backgroundSyncProvider).syncLocal(full: true); + unawaited(ref.read(backgroundSyncProvider).syncLocal(full: true)); }, ), SettingListTile( @@ -141,7 +141,7 @@ class SyncStatusAndActions extends HookConsumerWidget { leading: const Icon(Icons.cloud_sync), trailing: _SyncStatusIcon(status: ref.watch(syncStatusProvider).remoteSyncStatus), onTap: () { - ref.read(backgroundSyncProvider).syncRemote(); + unawaited(ref.read(backgroundSyncProvider).syncRemote()); }, ), if (CurrentPlatform.isIOS && serverVersion.isAtLeast(major: 2, minor: 5)) @@ -158,7 +158,7 @@ class SyncStatusAndActions extends HookConsumerWidget { subtitle: "tap_to_run_job".t(context: context), trailing: _SyncStatusIcon(status: ref.watch(syncStatusProvider).hashJobStatus), onTap: () { - ref.read(backgroundSyncProvider).hashAssets(); + unawaited(ref.read(backgroundSyncProvider).hashAssets()); }, ), const Divider(height: 1), diff --git a/mobile/lib/widgets/settings/free_up_space_settings.dart b/mobile/lib/widgets/settings/free_up_space_settings.dart index dbec3a2dcb..72e85ac821 100644 --- a/mobile/lib/widgets/settings/free_up_space_settings.dart +++ b/mobile/lib/widgets/settings/free_up_space_settings.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -30,9 +32,9 @@ class _FreeUpSpaceSettingsState extends ConsumerState { @override void initState() { super.initState(); - WakelockPlus.enable(); + unawaited(WakelockPlus.enable()); WidgetsBinding.instance.addPostFrameCallback((_) { - _initializeAlbumDefaults(); + unawaited(_initializeAlbumDefaults()); }); } @@ -68,7 +70,7 @@ class _FreeUpSpaceSettingsState extends ConsumerState { void _goToScanStep() { ref.read(hapticFeedbackProvider.notifier).mediumImpact(); setState(() => _currentStep = CleanupStep.scan); - _scanAssets(); + unawaited(_scanAssets()); } void _setPresetDate(int daysAgo) { @@ -169,13 +171,13 @@ class _FreeUpSpaceSettingsState extends ConsumerState { void _showAssetsPreview(List assets) { ref.read(hapticFeedbackProvider.notifier).mediumImpact(); - context.pushRoute(CleanupPreviewRoute(assets: assets)); + unawaited(context.pushRoute(CleanupPreviewRoute(assets: assets))); } @override void dispose() { super.dispose(); - WakelockPlus.disable(); + unawaited(WakelockPlus.disable()); } @override diff --git a/mobile/lib/widgets/settings/networking_settings/endpoint_input.dart b/mobile/lib/widgets/settings/networking_settings/endpoint_input.dart index e8310caed4..162f1252a8 100644 --- a/mobile/lib/widgets/settings/networking_settings/endpoint_input.dart +++ b/mobile/lib/widgets/settings/networking_settings/endpoint_input.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -53,7 +55,7 @@ class EndpointInputState extends ConsumerState { void _onOutFocus() { if (!focusNode.hasFocus && isInputValid) { - validateAuxilaryServerUrl(); + unawaited(validateAuxilaryServerUrl()); } } diff --git a/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart b/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart index f3c2b6c97f..68278e0e1d 100644 --- a/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart +++ b/mobile/lib/widgets/settings/networking_settings/external_network_preference.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -44,13 +46,13 @@ class ExternalNetworkPreference extends HookConsumerWidget { entries.value.insert(newIndex, entry); entries.value = [...entries.value]; - saveEndpointList(); + unawaited(saveEndpointList()); } void handleDismiss(int index) { entries.value = [...entries.value..removeAt(index)]; - saveEndpointList(); + unawaited(saveEndpointList()); } Widget proxyDecorator(Widget child, int _, Animation animation) { diff --git a/mobile/lib/widgets/settings/networking_settings/networking_settings.dart b/mobile/lib/widgets/settings/networking_settings/networking_settings.dart index 7e6e169de7..e7510053e3 100644 --- a/mobile/lib/widgets/settings/networking_settings/networking_settings.dart +++ b/mobile/lib/widgets/settings/networking_settings/networking_settings.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; @@ -21,7 +23,7 @@ class NetworkingSettings extends HookConsumerWidget { final currentEndpoint = getServerUrl(); final featureEnabled = useState(ref.read(appConfigProvider).network.autoEndpointSwitching); useValueChanged(featureEnabled.value, (_, __) { - ref.read(settingsProvider).write(.networkAutoEndpointSwitching, featureEnabled.value); + unawaited(ref.read(settingsProvider).write(.networkAutoEndpointSwitching, featureEnabled.value)); }); Future checkWifiReadPermission() async { @@ -83,7 +85,7 @@ class NetworkingSettings extends HookConsumerWidget { useEffect(() { if (featureEnabled.value == true) { - checkWifiReadPermission(); + unawaited(checkWifiReadPermission()); } return null; }, [featureEnabled.value]); diff --git a/mobile/lib/widgets/settings/notification_setting.dart b/mobile/lib/widgets/settings/notification_setting.dart index ee2e15f52b..8c858a231b 100644 --- a/mobile/lib/widgets/settings/notification_setting.dart +++ b/mobile/lib/widgets/settings/notification_setting.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -17,20 +19,22 @@ class NotificationSetting extends HookConsumerWidget { void openAppNotificationSettings(BuildContext ctx) { ctx.pop(); - openAppSettings(); + unawaited(openAppSettings()); } // When permissions are permanently denied, you need to go to settings to // allow them void showPermissionsDialog() { - showDialog( - context: context, - builder: (ctx) => AlertDialog( - content: const Text('notification_permission_dialog_content').tr(), - actions: [ - TextButton(child: const Text('cancel').tr(), onPressed: () => ctx.pop()), - TextButton(onPressed: () => openAppNotificationSettings(ctx), child: const Text('settings').tr()), - ], + unawaited( + showDialog( + context: context, + builder: (ctx) => AlertDialog( + content: const Text('notification_permission_dialog_content').tr(), + actions: [ + TextButton(child: const Text('cancel').tr(), onPressed: () => ctx.pop()), + TextButton(onPressed: () => openAppNotificationSettings(ctx), child: const Text('settings').tr()), + ], + ), ), ); } diff --git a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart index 1defd2df44..b0624dca23 100644 --- a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -26,16 +28,16 @@ class PrimaryColorSetting extends HookConsumerWidget { } void onUseSystemColorChange(bool newValue) { - ref.read(settingsProvider).write(.themeDynamic, newValue); + unawaited(ref.read(settingsProvider).write(.themeDynamic, newValue)); popBottomSheet(); } void onPrimaryColorChange(ImmichColorPreset colorPreset) { - ref.read(settingsProvider).write(.themePrimaryColor, colorPreset); + unawaited(ref.read(settingsProvider).write(.themePrimaryColor, colorPreset)); //turn off system color setting if (themeConfig.dynamicTheme) { - ref.read(settingsProvider).write(.themeDynamic, false); + unawaited(ref.read(settingsProvider).write(.themeDynamic, false)); } popBottomSheet(); } diff --git a/mobile/lib/widgets/settings/preference_settings/share_setting.dart b/mobile/lib/widgets/settings/preference_settings/share_setting.dart index 2435810566..1881703023 100644 --- a/mobile/lib/widgets/settings/preference_settings/share_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/share_setting.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -19,7 +21,7 @@ class ShareSetting extends HookConsumerWidget { void onChanged(ShareAssetType? value) { if (value != null) { fileType.value = value; - ref.read(settingsProvider).write(SettingsKey.shareFileType, value); + unawaited(ref.read(settingsProvider).write(SettingsKey.shareFileType, value)); } } diff --git a/mobile/lib/widgets/settings/preference_settings/theme_setting.dart b/mobile/lib/widgets/settings/preference_settings/theme_setting.dart index ffeeceae02..ec84d7be01 100644 --- a/mobile/lib/widgets/settings/preference_settings/theme_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/theme_setting.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -22,7 +24,7 @@ class ThemeSetting extends HookConsumerWidget { void onThemeChange(bool isDark) { currentTheme.value = isDark ? ThemeMode.dark : ThemeMode.light; - ref.read(settingsProvider).write(.themeMode, currentTheme.value); + unawaited(ref.read(settingsProvider).write(.themeMode, currentTheme.value)); } void onSystemThemeChange(bool isSystem) { @@ -39,11 +41,11 @@ class ThemeSetting extends HookConsumerWidget { currentTheme.value = ThemeMode.dark; } } - ref.read(settingsProvider).write(.themeMode, currentTheme.value); + unawaited(ref.read(settingsProvider).write(.themeMode, currentTheme.value)); } void onSurfaceColorSettingChange(bool useColorfulInterface) { - ref.read(settingsProvider).write(.themeColorfulInterface, useColorfulInterface); + unawaited(ref.read(settingsProvider).write(.themeColorfulInterface, useColorfulInterface)); colorfulInterface.value = useColorfulInterface; } diff --git a/mobile/lib/wm_executor.dart b/mobile/lib/wm_executor.dart index e873c5f76d..aac6d3e174 100644 --- a/mobile/lib/wm_executor.dart +++ b/mobile/lib/wm_executor.dart @@ -145,7 +145,7 @@ class _Executor extends Mixinable<_Executor> with _ExecutorLogger { void _schedule() { final availableWorker = _pool.firstWhereOrNull((worker) => worker.taskId == null && worker.initialized); if (availableWorker == null) { - _ensureWorkersInitialized(); + unawaited(_ensureWorkersInitialized()); return; } if (_queue.isEmpty) { @@ -153,26 +153,28 @@ class _Executor extends Mixinable<_Executor> with _ExecutorLogger { } final task = _queue.removeFirst(); - availableWorker - .work(task) - .then( - (value) { - //might be completed by cancel and it is normal. - //Assuming that worker finished with error and cleaned gracefully - task.complete(value, null, null); - }, - onError: (error, st) { - task.complete(null, error, st); - }, - ) - .whenComplete(() { - if (_dynamicSpawning && _queue.isEmpty) { - // Retire the idle worker; shutdown() nulls its fields so the husk - // stays pooled and is revived by initialize() if work arrives. - unawaited(availableWorker.shutdown()); - } - _schedule(); - }); + unawaited( + availableWorker + .work(task) + .then( + (value) { + //might be completed by cancel and it is normal. + //Assuming that worker finished with error and cleaned gracefully + task.complete(value, null, null); + }, + onError: (error, st) { + task.complete(null, error, st); + }, + ) + .whenComplete(() { + if (_dynamicSpawning && _queue.isEmpty) { + // Retire the idle worker; shutdown() nulls its fields so the husk + // stays pooled and is revived by initialize() if work arrives. + unawaited(availableWorker.shutdown()); + } + _schedule(); + }), + ); } @override diff --git a/mobile/packages/ui/test/formatted_text_test.dart b/mobile/packages/ui/test/formatted_text_test.dart index c3901cd802..5f26822855 100644 --- a/mobile/packages/ui/test/formatted_text_test.dart +++ b/mobile/packages/ui/test/formatted_text_test.dart @@ -59,7 +59,7 @@ void main() { ); final text = tester.widget(find.byType(Text)); - final richText = text.textSpan as TextSpan; + final richText = text.textSpan! as TextSpan; expect(richText.style?.fontSize, 16); expect(richText.style?.color, Colors.purple); diff --git a/mobile/test/presentation/widgets/timeline/timeline_args_test.dart b/mobile/test/presentation/widgets/timeline/timeline_args_test.dart index 0828e8e989..5c03998bfc 100644 --- a/mobile/test/presentation/widgets/timeline/timeline_args_test.dart +++ b/mobile/test/presentation/widgets/timeline/timeline_args_test.dart @@ -1,3 +1,5 @@ +// ignore_for_file: close_sinks + import 'dart:async'; import 'package:flutter/material.dart'; diff --git a/mobile/test/services/deep_link_service_test.dart b/mobile/test/services/deep_link_service_test.dart index ff090367ea..16fa392f27 100644 --- a/mobile/test/services/deep_link_service_test.dart +++ b/mobile/test/services/deep_link_service_test.dart @@ -115,7 +115,7 @@ void main() { final route = await sut.handleMyImmichApp(link('/albums/$_albumId/photos/$_assetId'), ref); expect(route, isA()); - expect((route!.args as AssetViewerRouteArgs).currentAlbum, _album); + expect((route!.args! as AssetViewerRouteArgs).currentAlbum, _album); }); test('still opens the viewer when the album cannot be resolved', () async { @@ -125,7 +125,7 @@ void main() { final route = await sut.handleMyImmichApp(link('/albums/$_albumId/photos/$_assetId'), ref); expect(route, isA()); - expect((route!.args as AssetViewerRouteArgs).currentAlbum, isNull); + expect((route!.args! as AssetViewerRouteArgs).currentAlbum, isNull); }); test('plain photo link has no album', () async { @@ -134,7 +134,7 @@ void main() { final route = await sut.handleMyImmichApp(link('/photos/$_assetId'), ref); expect(route, isA()); - expect((route!.args as AssetViewerRouteArgs).currentAlbum, isNull); + expect((route!.args! as AssetViewerRouteArgs).currentAlbum, isNull); verifyNever(() => remoteAlbumService.get(any())); }); } From 6b6058c4631a4c8ec551a960739210c379577695 Mon Sep 17 00:00:00 2001 From: Giacomo Pinato Date: Thu, 30 Jul 2026 21:41:49 +0200 Subject: [PATCH 29/69] feat: store null instead of empty string for album.description (#30123) Addresses the first column of issue #28832: album.description now stores and returns null instead of an empty string. Co-authored-by: Giacomo Pinato --- .../drift_album_api_repository.dart | 8 ++- open-api/immich-openapi-specs.json | 41 +++++++++++++-- packages/sdk/src/fetch-client.ts | 4 +- server/src/dtos/album.dto.ts | 52 +++++++++++++++++-- .../1784664555996-AlbumDescriptionNullable.ts | 13 +++++ server/src/schema/tables/album.table.ts | 4 +- server/src/services/sync.service.ts | 10 +++- web/src/lib/modals/AlbumEditModal.svelte | 2 +- .../[[assetId=id]]/AlbumDescription.svelte | 2 +- 9 files changed, 118 insertions(+), 18 deletions(-) create mode 100644 server/src/schema/migrations/1784664555996-AlbumDescriptionNullable.ts diff --git a/mobile/lib/repositories/drift_album_api_repository.dart b/mobile/lib/repositories/drift_album_api_repository.dart index e0d4cc4632..8c21af6599 100644 --- a/mobile/lib/repositories/drift_album_api_repository.dart +++ b/mobile/lib/repositories/drift_album_api_repository.dart @@ -25,7 +25,9 @@ class DriftAlbumApiRepository extends ApiRepository { _api.createAlbum( CreateAlbumDto( albumName: name, - description: description == null ? const Optional.absent() : Optional.present(description), + description: description == null + ? const Optional.absent() + : Optional.present(description.isEmpty ? null : description), assetIds: Optional.present(assetIds.toList()), ), ), @@ -88,7 +90,9 @@ class DriftAlbumApiRepository extends ApiRepository { albumId, UpdateAlbumDto( albumName: name == null ? const Optional.absent() : Optional.present(name), - description: description == null ? const Optional.absent() : Optional.present(description), + description: description == null + ? const Optional.absent() + : Optional.present(description.isEmpty ? null : description), albumThumbnailAssetId: thumbnailAssetId == null ? const Optional.absent() : Optional.present(thumbnailAssetId), diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index dd5d4dce45..bc3bf82094 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -16585,7 +16585,18 @@ }, "description": { "description": "Album description", - "type": "string" + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v3", + "state": "Updated", + "description": "An empty string is returned instead of null for backwards compatibility; null will be returned in v4." + } + ] }, "endDate": { "description": "End date (latest asset)", @@ -18443,7 +18454,19 @@ }, "description": { "description": "Album description", - "type": "string" + "nullable": true, + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v3", + "state": "Updated", + "description": "Sending an empty string is deprecated; send null instead. Empty strings will no longer be coerced to null in v4." + } + ] } }, "required": [ @@ -27115,7 +27138,19 @@ }, "description": { "description": "Album description", - "type": "string" + "nullable": true, + "type": "string", + "x-immich-history": [ + { + "version": "v1", + "state": "Added" + }, + { + "version": "v3", + "state": "Updated", + "description": "Sending an empty string is deprecated; send null instead. Empty strings will no longer be coerced to null in v4." + } + ] }, "isActivityEnabled": { "description": "Enable activity feed", diff --git a/packages/sdk/src/fetch-client.ts b/packages/sdk/src/fetch-client.ts index a7e0d9511e..3ac958ce2d 100644 --- a/packages/sdk/src/fetch-client.ts +++ b/packages/sdk/src/fetch-client.ts @@ -540,7 +540,7 @@ export type CreateAlbumDto = { /** Initial asset IDs */ assetIds?: string[]; /** Album description */ - description?: string; + description?: string | null; }; export type AlbumsAddAssetsDto = { /** Album IDs */ @@ -567,7 +567,7 @@ export type UpdateAlbumDto = { /** Album thumbnail asset ID */ albumThumbnailAssetId?: string; /** Album description */ - description?: string; + description?: string | null; /** Enable activity feed */ isActivityEnabled?: boolean; order?: AssetOrder; diff --git a/server/src/dtos/album.dto.ts b/server/src/dtos/album.dto.ts index 3c871f672d..1e3b3b6193 100644 --- a/server/src/dtos/album.dto.ts +++ b/server/src/dtos/album.dto.ts @@ -34,7 +34,22 @@ const AlbumUserCreateSchema = z const CreateAlbumSchema = z .object({ albumName: z.string().describe('Album name'), - description: z.string().optional().describe('Album description'), + // TODO: drop the empty-string-to-null transform in v4 (clients should send null) + description: z + .string() + .nullable() + .transform((value) => (value === '' ? null : value)) + .optional() + .describe('Album description') + .meta({ + ...new HistoryBuilder() + .added('v1') + .updated( + 'v3', + 'Sending an empty string is deprecated; send null instead. Empty strings will no longer be coerced to null in v4.', + ) + .getExtensions(), + }), albumUsers: z.array(AlbumUserCreateSchema).optional().describe('Album users'), assetIds: z.array(z.uuidv4()).optional().describe('Initial asset IDs'), }) @@ -57,7 +72,22 @@ const AlbumsAddAssetsResponseSchema = z const UpdateAlbumSchema = z .object({ albumName: z.string().optional().describe('Album name'), - description: z.string().optional().describe('Album description'), + // TODO: drop the empty-string-to-null transform in v4 (clients should send null) + description: z + .string() + .nullable() + .transform((value) => (value === '' ? null : value)) + .optional() + .describe('Album description') + .meta({ + ...new HistoryBuilder() + .added('v1') + .updated( + 'v3', + 'Sending an empty string is deprecated; send null instead. Empty strings will no longer be coerced to null in v4.', + ) + .getExtensions(), + }), albumThumbnailAssetId: z.uuidv4().optional().describe('Album thumbnail asset ID'), isActivityEnabled: z.boolean().optional().describe('Enable activity feed'), order: AssetOrderSchema.optional(), @@ -110,7 +140,18 @@ export const AlbumResponseSchema = z .object({ id: z.uuidv4().describe('Album ID'), albumName: z.string().describe('Album name'), - description: z.string().describe('Album description'), + description: z + .string() + .describe('Album description') + .meta({ + ...new HistoryBuilder() + .added('v1') + .updated( + 'v3', + 'An empty string is returned instead of null for backwards compatibility; null will be returned in v4.', + ) + .getExtensions(), + }), // TODO: use `isoDatetimeToDate` when using `ZodSerializerDto` on the controllers. createdAt: z.string().meta({ format: 'date-time' }).describe('Creation date'), // TODO: use `isoDatetimeToDate` when using `ZodSerializerDto` on the controllers. @@ -171,7 +212,7 @@ export type MapAlbumDto = { assets?: ShallowDehydrateObject[]; sharedLinks?: ShallowDehydrateObject[]; albumName: string; - description: string; + description: string | null; albumThumbnailAssetId: string | null; createdAt: Date; updatedAt: Date; @@ -207,7 +248,8 @@ export const mapAlbum = (entity: MaybeDehydrated): AlbumResponseDto return { albumName: entity.albumName, - description: entity.description, + // TODO: return null instead of '' in v4 + description: entity.description ?? '', albumThumbnailAssetId: entity.albumThumbnailAssetId, createdAt: asDateTimeString(entity.createdAt), updatedAt: asDateTimeString(entity.updatedAt), diff --git a/server/src/schema/migrations/1784664555996-AlbumDescriptionNullable.ts b/server/src/schema/migrations/1784664555996-AlbumDescriptionNullable.ts new file mode 100644 index 0000000000..3be799f498 --- /dev/null +++ b/server/src/schema/migrations/1784664555996-AlbumDescriptionNullable.ts @@ -0,0 +1,13 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + await sql`ALTER TABLE "album" ALTER COLUMN "description" DROP NOT NULL;`.execute(db); + await sql`ALTER TABLE "album" ALTER COLUMN "description" SET DEFAULT NULL;`.execute(db); + await sql`UPDATE "album" SET "description" = NULL WHERE "description" = '';`.execute(db); +} + +export async function down(db: Kysely): Promise { + await sql`UPDATE "album" SET "description" = '' WHERE "description" IS NULL;`.execute(db); + await sql`ALTER TABLE "album" ALTER COLUMN "description" SET DEFAULT ''::text;`.execute(db); + await sql`ALTER TABLE "album" ALTER COLUMN "description" SET NOT NULL;`.execute(db); +} diff --git a/server/src/schema/tables/album.table.ts b/server/src/schema/tables/album.table.ts index f54658be65..c0d13d4902 100644 --- a/server/src/schema/tables/album.table.ts +++ b/server/src/schema/tables/album.table.ts @@ -36,8 +36,8 @@ export class AlbumTable { @UpdateDateColumn() updatedAt!: Generated; - @Column({ type: 'text', default: '' }) - description!: Generated; + @Column({ type: 'text', nullable: true }) + description!: string | null; @DeleteDateColumn() deletedAt!: Timestamp | null; diff --git a/server/src/services/sync.service.ts b/server/src/services/sync.service.ts index 87fc40306f..e3842b1503 100644 --- a/server/src/services/sync.service.ts +++ b/server/src/services/sync.service.ts @@ -441,7 +441,12 @@ export class SyncService extends BaseService { const upserts = this.syncRepository.album.getUpserts({ ...options, ack: checkpointMap[upsertType] }); for await (const { updateId, ...data } of upserts) { const albumUsers = await this.syncRepository.album.getAlbumUsers(data.id); - send(response, { type: upsertType, ids: [updateId], data: syncAlbumV2ToV1(data, albumUsers) }); + send(response, { + type: upsertType, + ids: [updateId], + // TODO: return null instead of '' in v4 + data: syncAlbumV2ToV1({ ...data, description: data.description ?? '' }, albumUsers), + }); } } @@ -455,7 +460,8 @@ export class SyncService extends BaseService { const upsertType = SyncEntityType.AlbumV2; const upserts = this.syncRepository.album.getUpserts({ ...options, ack: checkpointMap[upsertType] }); for await (const { updateId, ...data } of upserts) { - send(response, { type: upsertType, ids: [updateId], data }); + // TODO: return null instead of '' in v4 + send(response, { type: upsertType, ids: [updateId], data: { ...data, description: data.description ?? '' } }); } } diff --git a/web/src/lib/modals/AlbumEditModal.svelte b/web/src/lib/modals/AlbumEditModal.svelte index 7c4ee9b626..c5386a6a0d 100644 --- a/web/src/lib/modals/AlbumEditModal.svelte +++ b/web/src/lib/modals/AlbumEditModal.svelte @@ -17,7 +17,7 @@ let description = $state(album.description); const onSubmit = async () => { - const success = await handleUpdateAlbum(album, { albumName, description }); + const success = await handleUpdateAlbum(album, { albumName, description: description || null }); if (success) { onClose(); } diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.svelte b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.svelte index 1d80fcb766..cb2fb2a9bb 100644 --- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.svelte +++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.svelte @@ -20,7 +20,7 @@ const response = await updateAlbumInfo({ id, updateAlbumDto: { - description, + description: description || null, }, }); eventManager.emit('AlbumUpdate', response); From aa565f5ca0773c6e76b100d9b2fa99924a6dec45 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:47:34 -0400 Subject: [PATCH 30/69] chore(deps): update github-actions (major) (#30309) chore(deps): update github-actions Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pr-labeler.yml | 2 +- .github/workflows/prepare-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index c2664839e3..d924c84596 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -19,6 +19,6 @@ jobs: permission-contents: read permission-pull-requests: write - - uses: actions/labeler@b8dd2d9be0f68b860e7dae5dae7d772984eacd6d # v6.2.0 + - uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0 with: repo-token: ${{ steps.token.outputs.token }} diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 05c6f82977..5150896192 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -74,7 +74,7 @@ jobs: # TODO move to mise - name: Install uv - uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 - name: Bump version env: From 2fa07c0a4283a2158f55b146c6e64d25d497611f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:49:32 -0400 Subject: [PATCH 31/69] chore(deps): update grafana/grafana docker tag to v12.4.6-ubuntu (#30304) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docker/docker-compose.prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml index aecb6b1dad..013ff266fa 100644 --- a/docker/docker-compose.prod.yml +++ b/docker/docker-compose.prod.yml @@ -97,7 +97,7 @@ services: command: ['./run.sh', '-disable-reporting'] ports: - 3000:3000 - image: grafana/grafana:12.4.5-ubuntu@sha256:00396460e499415c828b7c298f19287c8a0f95e72412ee37ac11723655c2d6b9 + image: grafana/grafana:12.4.6-ubuntu@sha256:35c75489ff2e2e69c53977a180de491643d51fdb32108f9335317527978daed7 volumes: - grafana-data:/var/lib/grafana From 0f4dddaf84636731212ed65ae41a2762d617484b Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Thu, 30 Jul 2026 15:55:21 -0400 Subject: [PATCH 32/69] fix: migration order (#30424) --- ...ptionNullable.ts => 1784986754474-AlbumDescriptionNullable.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename server/src/schema/migrations/{1784664555996-AlbumDescriptionNullable.ts => 1784986754474-AlbumDescriptionNullable.ts} (100%) diff --git a/server/src/schema/migrations/1784664555996-AlbumDescriptionNullable.ts b/server/src/schema/migrations/1784986754474-AlbumDescriptionNullable.ts similarity index 100% rename from server/src/schema/migrations/1784664555996-AlbumDescriptionNullable.ts rename to server/src/schema/migrations/1784986754474-AlbumDescriptionNullable.ts From 56ce7176b1d0e573a09134a9ea019dc096034067 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:56:24 -0400 Subject: [PATCH 33/69] chore(deps): update dependency opentofu to v1.12.5 (#30299) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- deployment/mise.lock | 44 ++++++++++++++++++++++---------------------- deployment/mise.toml | 2 +- mise.lock | 44 ++++++++++++++++++++++---------------------- mise.toml | 2 +- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/deployment/mise.lock b/deployment/mise.lock index 663ae4985d..018620a4a5 100644 --- a/deployment/mise.lock +++ b/deployment/mise.lock @@ -1,43 +1,43 @@ # @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html [[tools.opentofu]] -version = "1.11.6" +version = "1.12.5" backend = "aqua:opentofu/opentofu" [tools.opentofu."platforms.linux-arm64"] -checksum = "sha256:d4f2ab15776925864b049bb329d69682851de6f5204f256e9fa86d07a0308850" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_arm64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/391536382" +checksum = "sha256:e67e9da2b1ddf5050ebee62a584cb826eafe1dfd3827d7ec20899ac62791ed1a" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602545" [tools.opentofu."platforms.linux-arm64-musl"] -checksum = "sha256:d4f2ab15776925864b049bb329d69682851de6f5204f256e9fa86d07a0308850" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_arm64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/391536382" +checksum = "sha256:e67e9da2b1ddf5050ebee62a584cb826eafe1dfd3827d7ec20899ac62791ed1a" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602545" [tools.opentofu."platforms.linux-x64"] -checksum = "sha256:02800fafa2753a9f50c38483e2fdf5bc353fd62895eb9e25eec9a5145df3a69e" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_amd64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/391536401" +checksum = "sha256:a6894d45ae7a17ce83189cce8fe04b5a65f68cefceb62455b5a6a89fa53ab38f" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602624" [tools.opentofu."platforms.linux-x64-musl"] -checksum = "sha256:02800fafa2753a9f50c38483e2fdf5bc353fd62895eb9e25eec9a5145df3a69e" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_linux_amd64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/391536401" +checksum = "sha256:a6894d45ae7a17ce83189cce8fe04b5a65f68cefceb62455b5a6a89fa53ab38f" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602624" [tools.opentofu."platforms.macos-arm64"] -checksum = "sha256:62d7fa8539e13b444827aa0a3b90c5972da5c47e8f8882d9dcf2e430e78840c1" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_darwin_arm64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/391536399" +checksum = "sha256:2ae38150a667f5c0bd57b318d18ad8091d08f93fcca40345f3d88998661de5a9" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602544" [tools.opentofu."platforms.macos-x64"] -checksum = "sha256:1408cdef1c380f914565e6b4bb70794c6b163f195fcb233357f3d6c5745906b6" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_darwin_amd64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/391536384" +checksum = "sha256:1012d8f3d4567bcbcd1f2c7d766feca39a30bced32fb8be47e1887fbbee2456d" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_darwin_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602621" [tools.opentofu."platforms.windows-x64"] -checksum = "sha256:27323f70c875b8251bfd7e61a4cffc3ebff4e56ed1e611b955016f0c7077367e" -url = "https://github.com/opentofu/opentofu/releases/download/v1.11.6/tofu_1.11.6_windows_amd64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/391536406" +checksum = "sha256:af11850b496f3720e0184084c56d8b43aa74ea92d2338978bf368d70c96473f1" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_windows_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602547" [[tools.terragrunt]] version = "1.0.3" diff --git a/deployment/mise.toml b/deployment/mise.toml index 2e26da09f6..7098b79c99 100644 --- a/deployment/mise.toml +++ b/deployment/mise.toml @@ -1,6 +1,6 @@ [tools] terragrunt = "1.1.1" -opentofu = "1.12.4" +opentofu = "1.12.5" [tasks."tg:fmt"] run = "terragrunt hclfmt" diff --git a/mise.lock b/mise.lock index 656d11b3eb..3b05f22889 100644 --- a/mise.lock +++ b/mise.lock @@ -252,43 +252,43 @@ version = "7.5.0" backend = "npm:oazapfts" [[tools.opentofu]] -version = "1.12.4" +version = "1.12.5" backend = "aqua:opentofu/opentofu" [tools.opentofu."platforms.linux-arm64"] -checksum = "sha256:dc7bfcd93ce9795a86c58fbf71efd013c39dcd1febb13c9cd3555c43b9c2403a" -url = "https://github.com/opentofu/opentofu/releases/download/v1.12.4/tofu_1.12.4_linux_arm64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/475646678" +checksum = "sha256:e67e9da2b1ddf5050ebee62a584cb826eafe1dfd3827d7ec20899ac62791ed1a" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602545" [tools.opentofu."platforms.linux-arm64-musl"] -checksum = "sha256:dc7bfcd93ce9795a86c58fbf71efd013c39dcd1febb13c9cd3555c43b9c2403a" -url = "https://github.com/opentofu/opentofu/releases/download/v1.12.4/tofu_1.12.4_linux_arm64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/475646678" +checksum = "sha256:e67e9da2b1ddf5050ebee62a584cb826eafe1dfd3827d7ec20899ac62791ed1a" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602545" [tools.opentofu."platforms.linux-x64"] -checksum = "sha256:81836d0f12b4fe9013b85586349f993def9429b6383bb77cdd6c2f3a9d9aac24" -url = "https://github.com/opentofu/opentofu/releases/download/v1.12.4/tofu_1.12.4_linux_amd64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/475646677" +checksum = "sha256:a6894d45ae7a17ce83189cce8fe04b5a65f68cefceb62455b5a6a89fa53ab38f" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602624" [tools.opentofu."platforms.linux-x64-musl"] -checksum = "sha256:81836d0f12b4fe9013b85586349f993def9429b6383bb77cdd6c2f3a9d9aac24" -url = "https://github.com/opentofu/opentofu/releases/download/v1.12.4/tofu_1.12.4_linux_amd64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/475646677" +checksum = "sha256:a6894d45ae7a17ce83189cce8fe04b5a65f68cefceb62455b5a6a89fa53ab38f" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602624" [tools.opentofu."platforms.macos-arm64"] -checksum = "sha256:7c06e4390d9ccd467773e37ff1c3d833c7ca0c24742cd9e9ad47284bea472247" -url = "https://github.com/opentofu/opentofu/releases/download/v1.12.4/tofu_1.12.4_darwin_arm64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/475646544" +checksum = "sha256:2ae38150a667f5c0bd57b318d18ad8091d08f93fcca40345f3d88998661de5a9" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602544" [tools.opentofu."platforms.macos-x64"] -checksum = "sha256:ead1d2ce643addb4ffeb93240b9377ae1c2fd793a6bd22d65922ac37adfdf546" -url = "https://github.com/opentofu/opentofu/releases/download/v1.12.4/tofu_1.12.4_darwin_amd64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/475646688" +checksum = "sha256:1012d8f3d4567bcbcd1f2c7d766feca39a30bced32fb8be47e1887fbbee2456d" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_darwin_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602621" [tools.opentofu."platforms.windows-x64"] -checksum = "sha256:a4d86a07755c8d151f20f945e6cfb5b40deeed942af36a9bd385c5c2e965d5dd" -url = "https://github.com/opentofu/opentofu/releases/download/v1.12.4/tofu_1.12.4_windows_amd64.tar.gz" -url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/475646543" +checksum = "sha256:af11850b496f3720e0184084c56d8b43aa74ea92d2338978bf368d70c96473f1" +url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12.5_windows_amd64.tar.gz" +url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602547" [[tools.pnpm]] version = "11.13.1" diff --git a/mise.toml b/mise.toml index 5ff9db5819..d069dc1b99 100644 --- a/mise.toml +++ b/mise.toml @@ -18,7 +18,7 @@ config_roots = [ node = "24.15.0" pnpm = "11.13.1" terragrunt = "1.1.1" -opentofu = "1.12.4" +opentofu = "1.12.5" "npm:@openapitools/openapi-generator-cli" = "2.40.1" "npm:oazapfts" = "7.5.0" "github:extism/cli" = "1.6.3" From 405020eeeed88f803543eabbd2547350e172be3f Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Fri, 31 Jul 2026 01:40:36 +0530 Subject: [PATCH 34/69] chore: enable use_build_context_synchronously lint (#30367) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- mobile/analysis_options.yaml | 2 +- mobile/lib/main.dart | 29 ++++--- .../drift_backup_album_selection.page.dart | 4 + .../drift_backup_asset_detail.page.dart | 4 + .../backup/drift_backup_options.page.dart | 2 +- .../lib/pages/common/app_log_detail.page.dart | 4 + .../lib/pages/common/splash_screen.page.dart | 85 ++++++++++--------- .../pages/library/locked/pin_auth.page.dart | 22 ++--- .../presentation/actions/action.widget.dart | 4 + .../pages/drift_album_options.page.dart | 24 ++++-- .../pages/drift_create_album.page.dart | 12 ++- .../pages/drift_partner_detail.page.dart | 5 +- .../pages/drift_remote_album.page.dart | 66 +++++++++----- .../pages/edit/drift_edit.page.dart | 10 ++- .../profile/profile_picture_crop.page.dart | 8 +- .../pages/search/drift_search.page.dart | 4 + .../add_action_button.widget.dart | 4 +- .../archive_action_button.widget.dart | 19 +++-- .../delete_action_button.widget.dart | 18 ++-- .../delete_local_action_button.widget.dart | 19 +++-- ...delete_permanent_action_button.widget.dart | 18 ++-- .../delete_trash_action_button.widget.dart | 18 ++-- .../edit_date_time_action_button.widget.dart | 18 ++-- .../edit_location_action_button.widget.dart | 18 ++-- .../favorite_action_button.widget.dart | 18 ++-- ...e_to_lock_folder_action_button.widget.dart | 18 ++-- ...emove_from_album_action_button.widget.dart | 18 ++-- ...from_lock_folder_action_button.widget.dart | 18 ++-- .../restore_action_button.widget.dart | 19 +++-- .../restore_trash_action_button.widget.dart | 18 ++-- .../set_album_cover.widget.dart | 18 ++-- .../stack_action_button.widget.dart | 18 ++-- .../trash_action_button.widget.dart | 18 ++-- .../unarchive_action_button.widget.dart | 19 +++-- .../unfavorite_action_button.widget.dart | 18 ++-- .../unstack_action_button.widget.dart | 18 ++-- .../widgets/album/album_selector.widget.dart | 10 ++- .../date_time_details.widget.dart | 4 + .../favorite_bottom_sheet.widget.dart | 3 + .../presentation/widgets/map/map_utils.dart | 10 ++- .../person_edit_birthday_modal.widget.dart | 6 +- .../people/person_edit_name_modal.widget.dart | 6 +- .../widgets/timeline/fixed/segment.model.dart | 4 + .../repositories/asset_media.repository.dart | 2 +- mobile/lib/services/action.service.dart | 8 ++ .../lib/services/immich_logger.service.dart | 4 + mobile/lib/utils/map_utils.dart | 10 ++- .../widgets/activities/comment_bubble.dart | 4 + .../common/app_bar_dialog/app_bar_dialog.dart | 8 ++ .../lib/widgets/common/date_time_picker.dart | 2 +- .../widgets/forms/change_password_form.dart | 29 ++++--- .../lib/widgets/forms/login/login_form.dart | 44 ++++++++++ .../widgets/forms/pin_registration_form.dart | 4 + .../widgets/settings/advanced_settings.dart | 6 +- .../sync_status_and_actions.dart | 39 ++++++--- .../widgets/settings/language_settings.dart | 4 + .../local_network_preference.dart | 3 + .../networking_settings.dart | 12 +++ .../primary_color_setting.dart | 4 + 59 files changed, 552 insertions(+), 309 deletions(-) diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml index 3f5a33b2b2..e828760789 100644 --- a/mobile/analysis_options.yaml +++ b/mobile/analysis_options.yaml @@ -65,7 +65,7 @@ linter: avoid_type_to_string: true # Flutter specific - use_build_context_synchronously: false + use_build_context_synchronously: true sized_box_for_whitespace: true use_colored_box: true use_decorated_box: true diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index 58e93891a2..317733f1de 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -147,20 +147,9 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve Future initApp() async { WidgetsBinding.instance.addObserver(this); - // Draw the app from edge to edge unawaited(SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge)); - - // Sets the navigation bar color - SystemUiOverlayStyle overlayStyle = const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent); - if (Platform.isAndroid) { - // Android 8 does not support transparent app bars - final info = await DeviceInfoPlugin().androidInfo; - if (info.version.sdkInt <= 26) { - overlayStyle = context.isDarkTheme ? SystemUiOverlayStyle.dark : SystemUiOverlayStyle.light; - } - } - SystemChrome.setSystemUIOverlayStyle(overlayStyle); + await _setNavigationBarColor(); await FlutterLocalNotificationsPlugin().initialize( const InitializationSettings( @@ -170,6 +159,22 @@ class ImmichAppState extends ConsumerState with WidgetsBindingObserve ); } + Future _setNavigationBarColor() async { + SystemUiOverlayStyle overlayStyle = const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent); + if (Platform.isAndroid) { + // Android 8 does not support transparent app bars + final info = await DeviceInfoPlugin().androidInfo; + if (!mounted) { + return; + } + + if (info.version.sdkInt <= 26) { + overlayStyle = context.isDarkTheme ? SystemUiOverlayStyle.dark : SystemUiOverlayStyle.light; + } + } + SystemChrome.setSystemUIOverlayStyle(overlayStyle); + } + Future _deepLinkBuilder(PlatformDeepLink deepLink) async { final deepLinkHandler = ref.read(deepLinkServiceProvider); final currentRouteName = ref.read(currentRouteNameProvider.notifier).state; diff --git a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart index 396f4224a7..7667dbc3f1 100644 --- a/mobile/lib/pages/backup/drift_backup_album_selection.page.dart +++ b/mobile/lib/pages/backup/drift_backup_album_selection.page.dart @@ -132,6 +132,10 @@ class _DriftBackupAlbumSelectionPageState extends ConsumerState { return; } - if (mounted) { - setState(() => _cleared = true); + if (!mounted) { + return; } + + setState(() => _cleared = true); } @override @@ -312,46 +314,53 @@ class SplashScreenPageState extends ConsumerState { final viewIntentHandler = ref.read(viewIntentHandlerProvider); unawaited( - ref.read(authProvider.notifier).saveAuthInfo(accessToken: accessToken).then( - (_) async { - try { - wsProvider.connect(); - unawaited(infoProvider.getServerInfo()); + ref + .read(authProvider.notifier) + .saveAuthInfo(accessToken: accessToken) + .then( + (_) async { + try { + wsProvider.connect(); + unawaited(infoProvider.getServerInfo()); - bool syncSuccess = false; - await Future.wait([ - backgroundManager.syncLocal(full: true), - backgroundManager.syncRemote().then((success) => syncSuccess = success), - ]); + bool syncSuccess = false; + await Future.wait([ + backgroundManager.syncLocal(full: true), + backgroundManager.syncRemote().then((success) => syncSuccess = success), + ]); - await viewIntentHandler.flushDeferredViewIntent(); + await viewIntentHandler.flushDeferredViewIntent(); - if (syncSuccess) { - await Future.wait([ - backgroundManager.hashAssets().then((_) { - unawaited(_resumeBackup(backupProvider)); - }), - _resumeBackup(backupProvider), - // TODO: Bring back when the soft freeze issue is addressed - // backgroundManager.syncCloudIds(), - ]); - } else { - await backgroundManager.hashAssets(); - } + if (syncSuccess) { + await Future.wait([ + backgroundManager.hashAssets().then((_) { + unawaited(_resumeBackup(backupProvider)); + }), + _resumeBackup(backupProvider), + // TODO: Bring back when the soft freeze issue is addressed + // backgroundManager.syncCloudIds(), + ]); + } else { + await backgroundManager.hashAssets(); + } - if (SettingsRepository.instance.appConfig.backup.syncAlbums) { - await backgroundManager.syncLinkedAlbum(); - } - } catch (e) { - log.severe('Failed establishing connection to the server: $e'); - } - }, - onError: (exception) => { - log.severe('Failed to update auth info with access token: $accessToken'), - ref.read(authProvider.notifier).logout(), - context.router.replaceAll([const LoginRoute()]), - }, - ), + if (SettingsRepository.instance.appConfig.backup.syncAlbums) { + await backgroundManager.syncLinkedAlbum(); + } + } catch (e) { + log.severe('Failed establishing connection to the server: $e'); + } + }, + onError: (exception) { + log.severe('Failed to update auth info with access token: $accessToken'); + unawaited(ref.read(authProvider.notifier).logout()); + if (!mounted) { + return; + } + + unawaited(context.router.replaceAll([const LoginRoute()])); + }, + ), ); } else { log.severe('Missing crucial offline login info - Logging out completely'); diff --git a/mobile/lib/pages/library/locked/pin_auth.page.dart b/mobile/lib/pages/library/locked/pin_auth.page.dart index 2da9a8ddab..81e08d853b 100644 --- a/mobile/lib/pages/library/locked/pin_auth.page.dart +++ b/mobile/lib/pages/library/locked/pin_auth.page.dart @@ -25,17 +25,19 @@ class PinAuthPage extends HookConsumerWidget { Future registerBiometric(String pinCode) async { final isRegistered = await ref.read(localAuthProvider.notifier).registerBiometric(context, pinCode); - if (isRegistered) { - context.showSnackBar( - SnackBar( - content: Text('biometric_auth_enabled'.tr(), style: context.textTheme.labelLarge), - duration: const Duration(seconds: 3), - backgroundColor: context.colorScheme.primaryContainer, - ), - ); - - unawaited(context.replaceRoute(const DriftLockedFolderRoute())); + if (!isRegistered || !context.mounted) { + return; } + + context.showSnackBar( + SnackBar( + content: Text('biometric_auth_enabled'.tr(), style: context.textTheme.labelLarge), + duration: const Duration(seconds: 3), + backgroundColor: context.colorScheme.primaryContainer, + ), + ); + + unawaited(context.replaceRoute(const DriftLockedFolderRoute())); } Future enableBiometricAuth() { diff --git a/mobile/lib/presentation/actions/action.widget.dart b/mobile/lib/presentation/actions/action.widget.dart index eba5e3939c..f96dc2bc2f 100644 --- a/mobile/lib/presentation/actions/action.widget.dart +++ b/mobile/lib/presentation/actions/action.widget.dart @@ -23,6 +23,10 @@ class _ActionWidget extends ConsumerWidget { try { await action.onAction(scope); } catch (error, stackTrace) { + if (!scope.context.mounted) { + return; + } + handleError(scope.context, stack: stackTrace, description: 'Action failed: ${action.runtimeType}'); } } diff --git a/mobile/lib/presentation/pages/drift_album_options.page.dart b/mobile/lib/presentation/pages/drift_album_options.page.dart index 37c0273fae..9c5161fa8a 100644 --- a/mobile/lib/presentation/pages/drift_album_options.page.dart +++ b/mobile/lib/presentation/pages/drift_album_options.page.dart @@ -46,6 +46,10 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { Future leaveAlbum() async { try { await ref.read(remoteAlbumProvider.notifier).leaveAlbum(album.id, userId: userId); + if (!context.mounted) { + return; + } + unawaited(context.navigateTo(const DriftAlbumsRoute())); } catch (_) { showErrorMessage(); @@ -72,17 +76,21 @@ class DriftAlbumOptionsPage extends HookConsumerWidget { try { await ref.read(remoteAlbumProvider.notifier).addUsers(album.id, newUsers); - - if (newUsers.isNotEmpty) { - ImmichToast.show( - context: context, - msg: "users_added_to_album_count".t(context: context, args: {'count': newUsers.length}), - toastType: ToastType.success, - ); + ref.invalidate(remoteAlbumSharedUsersProvider(album.id)); + if (!context.mounted) { + return; } - ref.invalidate(remoteAlbumSharedUsersProvider(album.id)); + ImmichToast.show( + context: context, + msg: "users_added_to_album_count".t(context: context, args: {'count': newUsers.length}), + toastType: ToastType.success, + ); } catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show(context: context, msg: "Failed to add users to album: $e", toastType: ToastType.error); } } diff --git a/mobile/lib/presentation/pages/drift_create_album.page.dart b/mobile/lib/presentation/pages/drift_create_album.page.dart index 0dfae062dc..93534d62a5 100644 --- a/mobile/lib/presentation/pages/drift_create_album.page.dart +++ b/mobile/lib/presentation/pages/drift_create_album.page.dart @@ -186,13 +186,17 @@ class _DriftCreateAlbumPageState extends ConsumerState { assets: selectedAssets, ); - if (album != null && context.mounted) { - unawaited(context.replaceRoute(RemoteAlbumRoute(album: album))); + if (!mounted || album == null) { + return; } + + unawaited(context.replaceRoute(RemoteAlbumRoute(album: album))); } catch (_) { - if (context.mounted) { - ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.t()); + if (!mounted) { + return; } + + ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.t()); } finally { if (mounted) { setState(() => isCreatingAlbum = false); diff --git a/mobile/lib/presentation/pages/drift_partner_detail.page.dart b/mobile/lib/presentation/pages/drift_partner_detail.page.dart index 53353ce689..70de434d9f 100644 --- a/mobile/lib/presentation/pages/drift_partner_detail.page.dart +++ b/mobile/lib/presentation/pages/drift_partner_detail.page.dart @@ -72,13 +72,16 @@ class _InfoBoxState extends ConsumerState<_InfoBox> { }); } catch (error, stack) { dPrint(() => "Failed to toggle in timeline: $error $stack"); + if (!mounted) { + return; + } + ImmichToast.show( context: context, toastType: ToastType.error, durationInSecond: 1, msg: "Failed to toggle the timeline setting", ); - return; } } diff --git a/mobile/lib/presentation/pages/drift_remote_album.page.dart b/mobile/lib/presentation/pages/drift_remote_album.page.dart index 5e4e525e06..5d018561cc 100644 --- a/mobile/lib/presentation/pages/drift_remote_album.page.dart +++ b/mobile/lib/presentation/pages/drift_remote_album.page.dart @@ -42,6 +42,9 @@ class _RemoteAlbumPageState extends ConsumerState { Future addAssets(BuildContext context) async { final notifier = ref.read(remoteAlbumProvider.notifier); final albumAssets = await notifier.getAssets(_album.id); + if (!context.mounted) { + return; + } final newAssets = await context.pushRoute>( DriftAssetSelectionTimelineRoute(lockedSelectionAssets: albumAssets.toSet()), @@ -52,8 +55,11 @@ class _RemoteAlbumPageState extends ConsumerState { } final added = await notifier.addAssetsToAlbum(_album.id, newAssets); + if (!context.mounted) { + return; + } - if (added > 0 && context.mounted) { + if (added > 0) { ImmichToast.show( context: context, msg: "assets_added_to_album_count".t(context: context, args: {'count': added.toString()}), @@ -71,17 +77,21 @@ class _RemoteAlbumPageState extends ConsumerState { try { await ref.read(remoteAlbumProvider.notifier).addUsers(_album.id, newUsers); - - if (newUsers.isNotEmpty) { - ImmichToast.show( - context: context, - msg: "users_added_to_album_count".t(context: context, args: {'count': newUsers.length}), - toastType: ToastType.success, - ); + ref.invalidate(remoteAlbumSharedUsersProvider(_album.id)); + if (!context.mounted) { + return; } - ref.invalidate(remoteAlbumSharedUsersProvider(_album.id)); + ImmichToast.show( + context: context, + msg: "users_added_to_album_count".t(context: context, args: {'count': newUsers.length}), + toastType: ToastType.success, + ); } catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show(context: context, msg: "Failed to add users to album: $e", toastType: ToastType.error); } } @@ -124,6 +134,9 @@ class _RemoteAlbumPageState extends ConsumerState { if (confirmed == true) { try { await ref.read(remoteAlbumProvider.notifier).deleteAlbum(_album.id); + if (!context.mounted) { + return; + } ImmichToast.show( context: context, @@ -133,6 +146,10 @@ class _RemoteAlbumPageState extends ConsumerState { unawaited(context.pushRoute(const DriftAlbumsRoute())); } catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, msg: 'album_viewer_appbar_share_err_delete'.t(context: context), @@ -149,7 +166,11 @@ class _RemoteAlbumPageState extends ConsumerState { builder: (context) => _EditAlbumDialog(album: _album), ); - if (result != null && context.mounted) { + if (!context.mounted) { + return; + } + + if (result != null) { setState(() { _album = _album.copyWith(name: result.name, description: result.description ?? ''); }); @@ -247,20 +268,23 @@ class _EditAlbumDialogState extends ConsumerState<_EditAlbumDialog> { await ref .read(remoteAlbumProvider.notifier) .updateAlbum(widget.album.id, name: newTitle, description: newDescription); + if (!mounted) { + return; + } - if (mounted) { - Navigator.of( - context, - ).pop(_EditAlbumData(name: newTitle, description: newDescription.isEmpty ? null : newDescription)); - } + Navigator.of( + context, + ).pop(_EditAlbumData(name: newTitle, description: newDescription.isEmpty ? null : newDescription)); } catch (e) { - if (mounted) { - ImmichToast.show( - context: context, - msg: 'album_update_error'.t(context: context), - toastType: ToastType.error, - ); + if (!mounted) { + return; } + + ImmichToast.show( + context: context, + msg: 'album_update_error'.t(context: context), + toastType: ToastType.error, + ); } } diff --git a/mobile/lib/presentation/pages/edit/drift_edit.page.dart b/mobile/lib/presentation/pages/edit/drift_edit.page.dart index 0ce9985c19..ec7d8ac3d7 100644 --- a/mobile/lib/presentation/pages/edit/drift_edit.page.dart +++ b/mobile/lib/presentation/pages/edit/drift_edit.page.dart @@ -59,9 +59,17 @@ class _DriftEditImagePageState extends ConsumerState with Ti try { await widget.applyEdits(edits); + if (!mounted) { + return; + } + ImmichToast.show(context: context, msg: 'success'.tr(), toastType: ToastType.success); Navigator.of(context).pop(); } catch (e) { + if (!mounted) { + return; + } + ImmichToast.show(context: context, msg: 'error_title'.tr(), toastType: ToastType.error); } finally { ref.read(editorStateProvider.notifier).setIsEditing(false); @@ -99,7 +107,7 @@ class _DriftEditImagePageState extends ConsumerState with Ti return; } final shouldDiscard = await _showDiscardChangesDialog() ?? false; - if (shouldDiscard && mounted) { + if (shouldDiscard && context.mounted) { Navigator.of(context).pop(); } }, diff --git a/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart b/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart index e6ae6ad44f..a987c9ca29 100644 --- a/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart +++ b/mobile/lib/presentation/pages/profile/profile_picture_crop.page.dart @@ -74,7 +74,7 @@ class _ProfilePictureCropPageState extends ConsumerState .read(uploadProfileImageProvider.notifier) .upload(xFile, fileName: 'profile-picture.png'); - if (!context.mounted) { + if (!mounted) { return; } @@ -94,9 +94,7 @@ class _ProfilePictureCropPageState extends ConsumerState toastType: ToastType.success, ); - if (context.mounted) { - unawaited(context.maybePop()); - } + unawaited(context.maybePop()); } else { ImmichToast.show( context: context, @@ -106,7 +104,7 @@ class _ProfilePictureCropPageState extends ConsumerState ); } } catch (e) { - if (!context.mounted) { + if (!mounted) { return; } diff --git a/mobile/lib/presentation/pages/search/drift_search.page.dart b/mobile/lib/presentation/pages/search/drift_search.page.dart index 8d6122804a..39588cf051 100644 --- a/mobile/lib/presentation/pages/search/drift_search.page.dart +++ b/mobile/lib/presentation/pages/search/drift_search.page.dart @@ -107,6 +107,10 @@ class DriftSearchPage extends HookConsumerWidget { unawaited( Future.microtask(() { + if (!context.mounted) { + return; + } + textSearchController.clear(); peopleCurrentFilterWidget.value = null; dateRangeCurrentFilterWidget.value = null; diff --git a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart index bcd3b20df6..533bc72971 100644 --- a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart @@ -144,7 +144,7 @@ class _AddActionButtonState extends ConsumerState { final result = await ref.read(actionProvider.notifier).addToAlbum(ActionSource.viewer, album); - if (!context.mounted) { + if (!mounted) { return; } @@ -175,7 +175,7 @@ class _AddActionButtonState extends ConsumerState { ); } - if (!context.mounted) { + if (!mounted) { return; } await Navigator.of(context).maybePop(); diff --git a/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart index bb2cae21ad..3322dd3a85 100644 --- a/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart @@ -23,16 +23,17 @@ Future performArchiveAction(BuildContext context, WidgetRef ref, {required final result = await ref.read(actionProvider.notifier).archive(source); ref.read(multiSelectProvider.notifier).reset(); - final successMessage = 'archive_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); + if (!context.mounted) { + return; } + + final successMessage = 'archive_action_prompt'.t(context: context, args: {'count': result.count.toString()}); + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } class ArchiveActionButton extends ConsumerWidget { diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart index 45dc5ec699..a6ed4c4246 100644 --- a/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart @@ -73,17 +73,17 @@ class DeleteActionButton extends ConsumerWidget { shouldRefreshStack ? ViewerStackAssetDeletedEvent(stackIndex: stackIndex) : const ViewerReloadAssetEvent(), ); } + if (!context.mounted) { + return; + } final successMessage = 'delete_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart index 5a94d9807e..09969d8b8a 100644 --- a/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart @@ -42,16 +42,17 @@ class DeleteLocalActionButton extends ConsumerWidget { ref.invalidate(localAlbumProvider); - final successMessage = 'delete_local_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); + if (!context.mounted) { + return; } + + final successMessage = 'delete_local_action_prompt'.t(context: context, args: {'count': result.count.toString()}); + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart index 922f8593fa..c02fcf8f79 100644 --- a/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart @@ -50,20 +50,20 @@ class DeletePermanentActionButton extends ConsumerWidget { final result = await ref.read(actionProvider.notifier).deleteRemoteAndLocal(source); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'delete_permanently_action_prompt'.t( context: context, args: {'count': result.count.toString()}, ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart index f3e048f06f..3312e4f2a3 100644 --- a/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart @@ -37,20 +37,20 @@ class DeleteTrashActionButton extends ConsumerWidget { final result = await ref.read(actionProvider.notifier).deleteRemoteAndLocal(source); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'assets_permanently_deleted_count'.t( context: context, args: {'count': result.count.toString()}, ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart index b2b5050a8e..e93720186b 100644 --- a/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart @@ -24,20 +24,20 @@ class EditDateTimeActionButton extends ConsumerWidget { } ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'edit_date_and_time_action_prompt'.t( context: context, args: {'count': result.count.toString()}, ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart index cc8e15617c..b250e325ce 100644 --- a/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart @@ -24,17 +24,17 @@ class EditLocationActionButton extends ConsumerWidget { } ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'edit_location_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart index 0365335fd2..0f3ce47122 100644 --- a/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart @@ -35,17 +35,17 @@ class FavoriteActionButton extends ConsumerWidget { } ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'favorite_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart index 56191e9055..6d5f5b387a 100644 --- a/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart @@ -22,20 +22,20 @@ Future performMoveToLockFolderAction(BuildContext context, WidgetRef ref, final result = await ref.read(actionProvider.notifier).moveToLockFolder(source); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'move_to_lock_folder_action_prompt'.t( context: context, args: {'count': result.count.toString()}, ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } class MoveToLockFolderActionButton extends ConsumerWidget { diff --git a/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart index ebcfbaa1e5..7049da13f8 100644 --- a/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart @@ -35,20 +35,20 @@ class RemoveFromAlbumActionButton extends ConsumerWidget { final result = await ref.read(actionProvider.notifier).removeFromAlbum(source, albumId); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'remove_from_album_action_prompt'.t( context: context, args: {'count': result.count.toString()}, ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart index 75deef9ccb..ea0d9f384f 100644 --- a/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart @@ -27,20 +27,20 @@ class RemoveFromLockFolderActionButton extends ConsumerWidget { final result = await ref.read(actionProvider.notifier).removeFromLockFolder(source); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'remove_from_lock_folder_action_prompt'.t( context: context, args: {'count': result.count.toString()}, ); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart index b752a77c89..9270ce8351 100644 --- a/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart @@ -29,16 +29,17 @@ class RestoreActionButton extends ConsumerWidget { EventStream.shared.emit(const ViewerReloadAssetEvent()); } - final successMessage = 'assets_restored_count'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); + if (!context.mounted) { + return; } + + final successMessage = 'assets_restored_count'.t(context: context, args: {'count': result.count.toString()}); + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart index 82a9d98549..f6cd26c189 100644 --- a/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart @@ -19,17 +19,17 @@ class RestoreTrashActionButton extends ConsumerWidget { final result = await ref.read(actionProvider.notifier).restoreTrash(source); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'assets_restored_count'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart b/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart index d080efc5b2..e6e572110e 100644 --- a/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart @@ -29,17 +29,17 @@ class SetAlbumCoverActionButton extends ConsumerWidget { final result = await ref.read(actionProvider.notifier).setAlbumCover(source, albumId); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'album_cover_updated'.t(context: context); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart index b87d288a3e..026268fe52 100644 --- a/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart @@ -26,17 +26,17 @@ class StackActionButton extends ConsumerWidget { final result = await ref.read(actionProvider.notifier).stack(user.id, source); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'stack_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart index a320d3b1b1..2be2049a07 100644 --- a/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart @@ -31,17 +31,17 @@ class TrashActionButton extends ConsumerWidget { final result = await ref.read(actionProvider.notifier).trash(source); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'trash_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart index 78984f9ef1..552608f83f 100644 --- a/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart @@ -25,16 +25,17 @@ Future performUnArchiveAction(BuildContext context, WidgetRef ref, {requir final result = await ref.read(actionProvider.notifier).unArchive(source); ref.read(multiSelectProvider.notifier).reset(); - final successMessage = 'unarchive_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); + if (!context.mounted) { + return; } + + final successMessage = 'unarchive_action_prompt'.t(context: context, args: {'count': result.count.toString()}); + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } class UnArchiveActionButton extends ConsumerWidget { diff --git a/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart index 94d6588074..be6c3b0180 100644 --- a/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart @@ -35,17 +35,17 @@ class UnFavoriteActionButton extends ConsumerWidget { } ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'unfavorite_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart index c9a5102a9b..47cdfe9b5f 100644 --- a/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart @@ -22,17 +22,17 @@ class UnStackActionButton extends ConsumerWidget { final result = await ref.read(actionProvider.notifier).unStack(source); ref.read(multiSelectProvider.notifier).reset(); + if (!context.mounted) { + return; + } final successMessage = 'unstack_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - - if (context.mounted) { - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } + ImmichToast.show( + context: context, + msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), + gravity: ToastGravity.BOTTOM, + toastType: result.success ? ToastType.success : ToastType.error, + ); } @override diff --git a/mobile/lib/presentation/widgets/album/album_selector.widget.dart b/mobile/lib/presentation/widgets/album/album_selector.widget.dart index bf5de5611d..f30796e406 100644 --- a/mobile/lib/presentation/widgets/album/album_selector.widget.dart +++ b/mobile/lib/presentation/widgets/album/album_selector.widget.dart @@ -755,6 +755,10 @@ class AddToAlbumHeader extends ConsumerWidget { .read(remoteAlbumProvider.notifier) .createAlbumWithAssets(title: albumName, assets: selectedAssets); + if (!context.mounted) { + return; + } + if (newAlbum == null) { ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.tr()); return; @@ -798,7 +802,7 @@ class CreateAlbumButton extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { Future onCreateAlbum() async { final albumName = await showDialog(context: context, builder: (context) => const NewAlbumNameModal()); - if (albumName == null) { + if (albumName == null || !context.mounted) { return; } @@ -813,6 +817,10 @@ class CreateAlbumButton extends ConsumerWidget { .read(remoteAlbumProvider.notifier) .createAlbum(title: albumName, assetIds: [asset.remoteId!]); + if (!context.mounted) { + return; + } + if (album == null) { ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.tr()); return; diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart index 27bac68310..2dc1c40456 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -93,6 +94,9 @@ class _SheetAssetDescriptionState extends ConsumerState<_SheetAssetDescription> if (!editAction.success) { _controller.text = previousDescription ?? ''; + if (!mounted) { + return; + } ImmichToast.show( context: context, diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index bcb9fc6fe3..4382eeba5d 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -44,6 +44,9 @@ class FavoriteBottomSheet extends ConsumerWidget { final result = await ref .read(remoteAlbumProvider.notifier) .addAssets(album.id, remoteAssets.map((e) => e.id).toList()); + if (!context.mounted) { + return; + } if (selectedAssets.length != remoteAssets.length) { ImmichToast.show( diff --git a/mobile/lib/presentation/widgets/map/map_utils.dart b/mobile/lib/presentation/widgets/map/map_utils.dart index 3ce7b2e055..34116b144b 100644 --- a/mobile/lib/presentation/widgets/map/map_utils.dart +++ b/mobile/lib/presentation/widgets/map/map_utils.dart @@ -71,7 +71,11 @@ class MapUtils { bool silent = false, }) async { try { - final bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); + final serviceEnabled = await Geolocator.isLocationServiceEnabled(); + if (!context.mounted) { + return (null, LocationPermission.unableToDetermine); + } + if (!serviceEnabled && !silent) { unawaited(showDialog(context: context, builder: (context) => _LocationServiceDisabledDialog(context))); return (null, LocationPermission.deniedForever); @@ -81,6 +85,10 @@ class MapUtils { bool shouldRequestPermission = false; if (permission == LocationPermission.denied && !silent) { + if (!context.mounted) { + return (null, LocationPermission.unableToDetermine); + } + shouldRequestPermission = await showDialog( context: context, builder: (context) => _LocationPermissionDisabledDialog(context), diff --git a/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart b/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart index 6e66ff47ce..b5a9dd235c 100644 --- a/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart +++ b/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart @@ -34,12 +34,16 @@ class _DriftPersonNameEditFormState extends ConsumerState(_selectedDate); } } catch (error) { dPrint(() => 'Error updating birthday: $error'); - if (!context.mounted) { + if (!mounted) { return; } diff --git a/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart b/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart index 2eaac2ebf5..bb63de3695 100644 --- a/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart +++ b/mobile/lib/presentation/widgets/people/person_edit_name_modal.widget.dart @@ -32,12 +32,16 @@ class _DriftPersonNameEditFormState extends ConsumerState(newName); } } catch (error) { dPrint(() => 'Error updating name: $error'); - if (!context.mounted) { + if (!mounted) { return; } diff --git a/mobile/lib/presentation/widgets/timeline/fixed/segment.model.dart b/mobile/lib/presentation/widgets/timeline/fixed/segment.model.dart index 7712983fde..16c947ca5e 100644 --- a/mobile/lib/presentation/widgets/timeline/fixed/segment.model.dart +++ b/mobile/lib/presentation/widgets/timeline/fixed/segment.model.dart @@ -211,6 +211,10 @@ class _AssetTileWidget extends ConsumerWidget { ref.read(multiSelectProvider.notifier).toggleAssetSelection(asset); } else { await ref.read(timelineServiceProvider).loadAssets(assetIndex, 1); + if (!ctx.mounted) { + return; + } + ref.read(isPlayingMotionVideoProvider.notifier).playing = false; AssetViewer.setAsset(ref, asset); unawaited( diff --git a/mobile/lib/repositories/asset_media.repository.dart b/mobile/lib/repositories/asset_media.repository.dart index 5bfb18a00f..6058883544 100644 --- a/mobile/lib/repositories/asset_media.repository.dart +++ b/mobile/lib/repositories/asset_media.repository.dart @@ -324,7 +324,7 @@ class AssetMediaRepository { return 0; } - if (_isCancelled(cancelCompleter)) { + if (_isCancelled(cancelCompleter) || !context.mounted) { await _cleanupTempFiles(tempFiles); return 0; } diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index 19782c8512..5986f0407d 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -157,6 +157,10 @@ class ActionService { } } + if (!context.mounted) { + return false; + } + final location = await showLocationPicker(context: context, initialLatLng: initialLatLng); if (location == null) { @@ -195,6 +199,10 @@ class ActionService { initialDate = dt; } + if (!context.mounted) { + return false; + } + final dateTime = await showDateTimePicker( context: context, initialDateTime: initialDate, diff --git a/mobile/lib/services/immich_logger.service.dart b/mobile/lib/services/immich_logger.service.dart index fab4b9966a..bfc9bd9b51 100644 --- a/mobile/lib/services/immich_logger.service.dart +++ b/mobile/lib/services/immich_logger.service.dart @@ -39,6 +39,10 @@ abstract final class ImmichLogger { await io.close(); } + if (!context.mounted) { + return; + } + final box = context.findRenderObject() as RenderBox?; // Share file diff --git a/mobile/lib/utils/map_utils.dart b/mobile/lib/utils/map_utils.dart index 19c66e51e9..d5e6f957a5 100644 --- a/mobile/lib/utils/map_utils.dart +++ b/mobile/lib/utils/map_utils.dart @@ -68,7 +68,11 @@ class MapUtils { bool silent = false, }) async { try { - final bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); + final serviceEnabled = await Geolocator.isLocationServiceEnabled(); + if (!context.mounted) { + return (null, LocationPermission.unableToDetermine); + } + if (!serviceEnabled && !silent) { unawaited(showDialog(context: context, builder: (context) => _LocationServiceDisabledDialog())); return (null, LocationPermission.deniedForever); @@ -78,6 +82,10 @@ class MapUtils { bool shouldRequestPermission = false; if (permission == LocationPermission.denied && !silent) { + if (!context.mounted) { + return (null, LocationPermission.unableToDetermine); + } + shouldRequestPermission = await showDialog( context: context, builder: (context) => _LocationPermissionDisabledDialog(), diff --git a/mobile/lib/widgets/activities/comment_bubble.dart b/mobile/lib/widgets/activities/comment_bubble.dart index 95cff7b87d..fcaff8bfc3 100644 --- a/mobile/lib/widgets/activities/comment_bubble.dart +++ b/mobile/lib/widgets/activities/comment_bubble.dart @@ -35,6 +35,10 @@ class CommentBubble extends ConsumerWidget { Future openAssetViewer() async { final activityService = ref.read(activityServiceProvider); final route = await activityService.buildAssetViewerRoute(activity.assetId!, ref); + if (!context.mounted) { + return; + } + if (route != null) { await context.pushRoute(route); } diff --git a/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart b/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart index 085f4e2120..53c1eb1af9 100644 --- a/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart +++ b/mobile/lib/widgets/common/app_bar_dialog/app_bar_dialog.dart @@ -126,6 +126,10 @@ class ImmichAppBarDialog extends HookConsumerWidget { await ref.read(authProvider.notifier).logout().whenComplete(() => isLoggingOut.value = false); ref.read(websocketProvider.notifier).disconnect(); + if (!context.mounted) { + return; + } + unawaited(context.replaceRoute(const LoginRoute())); }, ); @@ -199,6 +203,10 @@ class ImmichAppBarDialog extends HookConsumerWidget { onTap: () async { ContextHelper(context).pop(); final packageInfo = await PackageInfo.fromPlatform(); + if (!context.mounted) { + return; + } + showLicensePage( context: context, applicationIcon: const Padding( diff --git a/mobile/lib/widgets/common/date_time_picker.dart b/mobile/lib/widgets/common/date_time_picker.dart index 679241fc1b..3aedd55de5 100644 --- a/mobile/lib/widgets/common/date_time_picker.dart +++ b/mobile/lib/widgets/common/date_time_picker.dart @@ -90,7 +90,7 @@ class _DateTimePicker extends HookWidget { firstDate: DateTime(1800), lastDate: now, ); - if (newDate == null) { + if (newDate == null || !context.mounted) { return; } diff --git a/mobile/lib/widgets/forms/change_password_form.dart b/mobile/lib/widgets/forms/change_password_form.dart index 7ab556b292..dd307f4ede 100644 --- a/mobile/lib/widgets/forms/change_password_form.dart +++ b/mobile/lib/widgets/forms/change_password_form.dart @@ -59,26 +59,29 @@ class ChangePasswordForm extends HookConsumerWidget { .read(authProvider.notifier) .changePassword(passwordController.value.text); - if (isSuccess) { - await ref.read(authProvider.notifier).logout(); - ref.read(websocketProvider.notifier).disconnect(); - - AutoRouter.of(context).back(); - - ImmichToast.show( - context: context, - msg: "login_password_changed_success".tr(), - toastType: ToastType.success, - gravity: ToastGravity.TOP, - ); - } else { + if (!isSuccess && context.mounted) { ImmichToast.show( context: context, msg: "login_password_changed_error".tr(), toastType: ToastType.error, gravity: ToastGravity.TOP, ); + return; } + + await ref.read(authProvider.notifier).logout(); + ref.read(websocketProvider.notifier).disconnect(); + if (!context.mounted) { + return; + } + + AutoRouter.of(context).back(); + ImmichToast.show( + context: context, + msg: "login_password_changed_success".tr(), + toastType: ToastType.success, + gravity: ToastGravity.TOP, + ); } }, ), diff --git a/mobile/lib/widgets/forms/login/login_form.dart b/mobile/lib/widgets/forms/login/login_form.dart index 969c311bfb..18963f0cfd 100644 --- a/mobile/lib/widgets/forms/login/login_form.dart +++ b/mobile/lib/widgets/forms/login/login_form.dart @@ -115,6 +115,10 @@ class LoginForm extends HookConsumerWidget { serverEndpoint.value = endpoint; } on ApiException catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, msg: e.message ?? 'login_form_api_exception'.tr(), @@ -124,6 +128,10 @@ class LoginForm extends HookConsumerWidget { isOauthEnable.value = false; isPasswordLoginEnable.value = true; } on HandshakeException { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, msg: 'login_form_handshake_exception'.tr(), @@ -133,6 +141,10 @@ class LoginForm extends HookConsumerWidget { isOauthEnable.value = false; isPasswordLoginEnable.value = true; } catch (e) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, msg: 'login_form_server_error'.tr(), @@ -180,6 +192,10 @@ class LoginForm extends HookConsumerWidget { Future getManageMediaPermission() async { final hasPermission = await ref.read(permissionRepositoryProvider).hasManageMediaPermission(); + if (!context.mounted) { + return; + } + if (!hasPermission) { await showDialog( context: context, @@ -236,6 +252,10 @@ class LoginForm extends HookConsumerWidget { try { final result = await ref.read(authProvider.notifier).login(emailController.text, passwordController.text); + if (!context.mounted) { + return; + } + if (result.shouldChangePassword && !result.isAdmin) { unawaited(context.pushRoute(const ChangePasswordRoute())); } else { @@ -246,10 +266,18 @@ class LoginForm extends HookConsumerWidget { unawaited(handleSyncFlow()); ref.read(websocketProvider.notifier).connect(); unawaited(ref.read(featureMessageServiceProvider).markSeen()); + if (!context.mounted) { + return; + } + unawaited(context.router.replaceAll([const TabShellRoute()])); return; } } catch (error) { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, msg: "login_form_failed_login".tr(), @@ -304,6 +332,10 @@ class LoginForm extends HookConsumerWidget { } catch (error, stack) { log.severe('Error getting OAuth server Url: $error', stack); + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, msg: "login_form_failed_get_oauth_server_config".tr(), @@ -334,12 +366,20 @@ class LoginForm extends HookConsumerWidget { } unawaited(handleSyncFlow()); unawaited(ref.read(featureMessageServiceProvider).markSeen()); + if (!context.mounted) { + return; + } + unawaited(context.router.replaceAll([const TabShellRoute()])); return; } } catch (error, stack) { log.severe('Error logging in with OAuth: $error', stack); + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, msg: error.toString(), @@ -348,6 +388,10 @@ class LoginForm extends HookConsumerWidget { ); } finally {} } else { + if (!context.mounted) { + return; + } + ImmichToast.show( context: context, msg: "login_form_failed_get_oauth_server_disable".tr(), diff --git a/mobile/lib/widgets/forms/pin_registration_form.dart b/mobile/lib/widgets/forms/pin_registration_form.dart index b3270ec524..ebd299bcce 100644 --- a/mobile/lib/widgets/forms/pin_registration_form.dart +++ b/mobile/lib/widgets/forms/pin_registration_form.dart @@ -42,6 +42,10 @@ class PinRegistrationForm extends HookConsumerWidget { onDone(); } catch (error) { hasError.value = true; + if (!context.mounted) { + return; + } + context.showSnackBar(SnackBar(content: Text(error.toString()))); } } diff --git a/mobile/lib/widgets/settings/advanced_settings.dart b/mobile/lib/widgets/settings/advanced_settings.dart index dbf54fd082..bf8673ccc5 100644 --- a/mobile/lib/widgets/settings/advanced_settings.dart +++ b/mobile/lib/widgets/settings/advanced_settings.dart @@ -145,6 +145,10 @@ class AdvancedSettings extends HookConsumerWidget { try { clearedBytes = await remoteImageApi.clearCache(); } catch (e) { + if (!context.mounted) { + return; + } + context.scaffoldMessenger.showSnackBar( SnackBar( duration: const Duration(seconds: 2), @@ -157,7 +161,7 @@ class AdvancedSettings extends HookConsumerWidget { return; } - if (clearedBytes < 0) { + if (clearedBytes < 0 || !context.mounted) { return; } diff --git a/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart b/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart index 1871dc8a62..58a044cea4 100644 --- a/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart +++ b/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart @@ -41,11 +41,13 @@ class SyncStatusAndActions extends HookConsumerWidget { // ignore: avoid_slow_async_io if (!await dbFile.exists()) { - if (context.mounted) { - context.scaffoldMessenger.showSnackBar( - SnackBar(content: Text("Database file not found".t(context: context))), - ); + if (!context.mounted) { + return; } + + context.scaffoldMessenger.showSnackBar( + SnackBar(content: Text("Database file not found".t(context: context))), + ); return; } @@ -54,6 +56,10 @@ class SyncStatusAndActions extends HookConsumerWidget { await dbFile.copy(exportFile.path); + if (!context.mounted) { + return; + } + final size = MediaQuery.of(context).size; await Share.shareXFiles( [XFile(exportFile.path)], @@ -67,18 +73,21 @@ class SyncStatusAndActions extends HookConsumerWidget { await exportFile.delete(); } }); + if (!context.mounted) { + return; + } - if (context.mounted) { - context.scaffoldMessenger.showSnackBar( - SnackBar(content: Text("Database exported successfully".t(context: context))), - ); - } + context.scaffoldMessenger.showSnackBar( + SnackBar(content: Text("Database exported successfully".t(context: context))), + ); } catch (e) { - if (context.mounted) { - context.scaffoldMessenger.showSnackBar( - SnackBar(content: Text("Failed to export database: $e".t(context: context))), - ); + if (!context.mounted) { + return; } + + context.scaffoldMessenger.showSnackBar( + SnackBar(content: Text("Failed to export database: $e".t(context: context))), + ); } } @@ -98,6 +107,10 @@ class SyncStatusAndActions extends HookConsumerWidget { TextButton( onPressed: () async { await ref.read(driftProvider).reset(); + if (!context.mounted) { + return; + } + context.pop(); unawaited( showDialog( diff --git a/mobile/lib/widgets/settings/language_settings.dart b/mobile/lib/widgets/settings/language_settings.dart index 2482801923..b12d1476f5 100644 --- a/mobile/lib/widgets/settings/language_settings.dart +++ b/mobile/lib/widgets/settings/language_settings.dart @@ -21,6 +21,10 @@ class LanguageSettings extends HookConsumerWidget { isLoading.value = true; await Future.delayed(const Duration(milliseconds: 500)); try { + if (!context.mounted) { + return; + } + await context.setLocale(selectedLocale.value); await loadTranslations(); } finally { diff --git a/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart b/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart index f8b6b087a3..8b787bcaea 100644 --- a/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart +++ b/mobile/lib/widgets/settings/networking_settings/local_network_preference.dart @@ -96,6 +96,9 @@ class LocalNetworkPreference extends HookConsumerWidget { Future autofillCurrentNetwork() async { final wifiName = await ref.read(networkProvider.notifier).getWifiName(); + if (!context.mounted) { + return; + } if (wifiName == null) { context.showSnackBar( diff --git a/mobile/lib/widgets/settings/networking_settings/networking_settings.dart b/mobile/lib/widgets/settings/networking_settings/networking_settings.dart index e7510053e3..513648f030 100644 --- a/mobile/lib/widgets/settings/networking_settings/networking_settings.dart +++ b/mobile/lib/widgets/settings/networking_settings/networking_settings.dart @@ -46,6 +46,10 @@ class NetworkingSettings extends HookConsumerWidget { onPressed: () async { final isGrant = await ref.read(networkProvider.notifier).requestWifiReadPermission(); + if (!context.mounted) { + return; + } + Navigator.pop(context, isGrant); }, child: Text("grant_permission".tr()), @@ -56,6 +60,10 @@ class NetworkingSettings extends HookConsumerWidget { ); } + if (!context.mounted) { + return; + } + if (!hasLocationAlways) { isGrantLocationAlwaysPermission = await showDialog( context: context, @@ -68,6 +76,10 @@ class NetworkingSettings extends HookConsumerWidget { onPressed: () async { final isGrant = await ref.read(networkProvider.notifier).requestWifiReadBackgroundPermission(); + if (!context.mounted) { + return; + } + Navigator.pop(context, isGrant); }, child: Text("grant_permission".tr()), diff --git a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart index b0624dca23..b1564b4145 100644 --- a/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/primary_color_setting.dart @@ -23,6 +23,10 @@ class PrimaryColorSetting extends HookConsumerWidget { void popBottomSheet() { Future.delayed(const Duration(milliseconds: 200), () { + if (!context.mounted) { + return; + } + Navigator.pop(context); }); } From fe5c8ed0fb80a741a12338b6e14dede5d5add457 Mon Sep 17 00:00:00 2001 From: shenlong Date: Fri, 31 Jul 2026 02:32:14 +0530 Subject: [PATCH 35/69] refactor: base action (#29617) * refactor: existing actions to new structure # Conflicts: # mobile/lib/presentation/actions/action.widget.dart # mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart # mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart # mobile/test/unit/presentation/partner_page_test.dart * rename to actionitem * more cleanup * review changes * lint changes --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- mobile/lib/domain/services/asset.service.dart | 9 -- .../repositories/remote_asset.repository.dart | 12 -- .../pages/library/partner/partner.page.dart | 6 +- mobile/lib/presentation/actions/action.dart | 60 +++++++--- .../presentation/actions/action.widget.dart | 104 ++++++----------- .../actions/asset_debug.action.dart | 29 ++--- .../presentation/actions/favorite.action.dart | 72 ++++++++---- .../presentation/actions/partner.action.dart | 51 +++++---- .../presentation/actions/timeline.action.dart | 24 ---- .../favorite_action_button.widget.dart | 61 ---------- .../unfavorite_action_button.widget.dart | 61 ---------- .../viewer_top_app_bar.widget.dart | 3 +- .../archive_bottom_sheet.widget.dart | 6 +- .../favorite_bottom_sheet.widget.dart | 6 +- .../general_bottom_sheet.widget.dart | 11 +- .../remote_album_bottom_sheet.widget.dart | 6 +- .../infrastructure/action.provider.dart | 22 ---- .../infrastructure/toast.provider.dart | 4 +- mobile/lib/providers/user.provider.dart | 8 ++ .../repositories/asset_api.repository.dart | 5 - mobile/lib/services/action.service.dart | 10 -- .../toast.service.dart} | 4 +- mobile/lib/utils/action_button.utils.dart | 2 +- mobile/test/repository.mocks.dart | 3 - mobile/test/service.mocks.dart | 3 + mobile/test/unit/mocks.dart | 4 +- .../actions/asset_debug_action_test.dart | 12 +- .../actions/favorite_action_test.dart | 50 +++++--- .../actions/timeline_action_test.dart | 108 ------------------ .../unit/presentation/partner_page_test.dart | 12 +- .../presentation/presentation_context.dart | 12 +- 31 files changed, 252 insertions(+), 528 deletions(-) delete mode 100644 mobile/lib/presentation/actions/timeline.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart rename mobile/lib/{repositories/toast.repository.dart => services/toast.service.dart} (91%) delete mode 100644 mobile/test/unit/presentation/actions/timeline_action_test.dart diff --git a/mobile/lib/domain/services/asset.service.dart b/mobile/lib/domain/services/asset.service.dart index f4c4a519d3..f35c962ff0 100644 --- a/mobile/lib/domain/services/asset.service.dart +++ b/mobile/lib/domain/services/asset.service.dart @@ -171,13 +171,4 @@ class AssetService { Future getLocalAsset(String id) { return _localRepository.get(id); } - - Future updateFavorite(List remoteIds, bool isFavorite) async { - if (remoteIds.isEmpty) { - return; - } - - await _apiRepository.updateFavorite(remoteIds, isFavorite); - await _remoteRepository.updateFavorite(remoteIds, isFavorite); - } } diff --git a/mobile/lib/infrastructure/repositories/remote_asset.repository.dart b/mobile/lib/infrastructure/repositories/remote_asset.repository.dart index cdf8bfa15b..e97b05465b 100644 --- a/mobile/lib/infrastructure/repositories/remote_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/remote_asset.repository.dart @@ -117,18 +117,6 @@ class RemoteAssetRepository extends DriftDatabaseRepository { }).get(); } - Future updateFavorite(List ids, bool isFavorite) { - return _db.batch((batch) async { - for (final id in ids) { - batch.update( - _db.remoteAssetEntity, - RemoteAssetEntityCompanion(isFavorite: Value(isFavorite)), - where: (e) => e.id.equals(id), - ); - } - }); - } - Future updateVisibility(List ids, AssetVisibility visibility) { return _db.batch((batch) async { for (final id in ids) { diff --git a/mobile/lib/pages/library/partner/partner.page.dart b/mobile/lib/pages/library/partner/partner.page.dart index 7274b8a14e..afe64d24f4 100644 --- a/mobile/lib/pages/library/partner/partner.page.dart +++ b/mobile/lib/pages/library/partner/partner.page.dart @@ -33,7 +33,7 @@ class PartnerPage extends ConsumerWidget { title: Text(context.t.partners), elevation: 0, centerTitle: false, - actions: const [ActionIconButtonWidget(action: PartnerAddAction())], + actions: const [ActionIconButton(action: PartnerAddAction())], ), body: sharedByAsync.when( data: (partners) => PartnerSharedByList(partners: partners.toList(growable: false)), @@ -60,7 +60,7 @@ class _EmptyPartners extends StatelessWidget { ), const Align( alignment: .center, - child: ActionButtonWidget(action: PartnerAddAction()), + child: ActionButton(action: PartnerAddAction()), ), ], ), @@ -88,7 +88,7 @@ class PartnerSharedByList extends StatelessWidget { leading: PartnerUserAvatar(userId: partner.id, name: partner.name), title: Text(partner.name), subtitle: Text(partner.email), - trailing: ActionIconButtonWidget( + trailing: ActionIconButton( action: PartnerRemoveAction(sharedWithId: partner.id, partnerName: partner.name), ), ); diff --git a/mobile/lib/presentation/actions/action.dart b/mobile/lib/presentation/actions/action.dart index 5ceb2f855d..072c2524be 100644 --- a/mobile/lib/presentation/actions/action.dart +++ b/mobile/lib/presentation/actions/action.dart @@ -1,32 +1,54 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/user.model.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; +import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/utils/asset_filter.dart'; -class ActionScope { - final BuildContext context; - final WidgetRef ref; - final UserDto authUser; +class ActionItem { + final IconData icon; + final String label; + final FutureOr Function() onAction; + final FutureOr Function()? onSecondaryAction; - const ActionScope({required this.context, required this.ref, required this.authUser}); + const ActionItem({required this.icon, required this.label, required this.onAction, this.onSecondaryAction}); } -abstract class BaseAction { - const BaseAction(); +abstract class ActionBuilder { + const ActionBuilder(); - IconData get icon; - - String label(ActionScope scope); - - bool isVisible(ActionScope scope) => true; - - Future onAction(ActionScope scope); + // null when the action is not applicable for the current context + ActionItem? create(BuildContext context, WidgetRef ref); } -abstract class AssetAction extends BaseAction { - final Iterable assets; +final assetsActionProvider = Provider.family.autoDispose, ActionSource>( + (ref, source) => AssetFilter(switch (source) { + .timeline => ref.watch(multiSelectProvider.select((s) => s.selectedAssets)), + .viewer => switch (ref.watch(assetViewerProvider.select((s) => s.currentAsset))) { + final BaseAsset asset => {asset}, + null => const {}, + }, + }), +); - const AssetAction({required this.assets}); +final clearSelectionProvider = Provider.family.autoDispose((ref, source) { + if (source == .timeline) { + return ref.read(multiSelectProvider.notifier).reset; + } - Iterable filter(ActionScope scope) => assets.whereType(); + return () {}; +}); + +final ownedAssetsActionProvider = Provider.family.autoDispose, ActionSource>( + (ref, source) => ref.watch(assetsActionProvider(source)).owned(ref.watch(authUserProvider).id), +); + +abstract class AssetActionBuilder extends ActionBuilder { + final ActionSource source; + + const AssetActionBuilder({required this.source}); } diff --git a/mobile/lib/presentation/actions/action.widget.dart b/mobile/lib/presentation/actions/action.widget.dart index f96dc2bc2f..a865528440 100644 --- a/mobile/lib/presentation/actions/action.widget.dart +++ b/mobile/lib/presentation/actions/action.widget.dart @@ -1,99 +1,71 @@ import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/utils/error_handler.dart'; import 'package:immich_ui/immich_ui.dart'; -class _ActionWidgetScope { - final String label; - final VoidCallback onAction; +abstract class ActionWidget extends ConsumerWidget { + final ActionBuilder action; - const _ActionWidgetScope({required this.label, required this.onAction}); -} + const ActionWidget({super.key, required this.action}); -class _ActionWidget extends ConsumerWidget { - final BaseAction action; - final Widget Function(_ActionWidgetScope context) builder; - - const _ActionWidget({required this.action, required this.builder}); - - Future _onAction(ActionScope scope) async { - try { - await action.onAction(scope); - } catch (error, stackTrace) { - if (!scope.context.mounted) { - return; - } - - handleError(scope.context, stack: stackTrace, description: 'Action failed: ${action.runtimeType}'); - } - } + Widget builder(BuildContext context, WidgetRef ref, ActionItem action); @override Widget build(BuildContext context, WidgetRef ref) { - final authUser = ref.watch(currentUserProvider); - if (authUser == null) { + final actionItem = action.create(context, ref); + if (actionItem == null) { return const SizedBox.shrink(); } - final scope = ActionScope(context: context, ref: ref, authUser: authUser); - if (!action.isVisible(scope)) { - return const SizedBox.shrink(); - } - - return builder(.new(label: action.label(scope), onAction: () => _onAction(scope))); + return builder(context, ref, actionItem); } } -class ActionIconButtonWidget extends StatelessWidget { - final BaseAction action; +class ActionColumnButton extends ActionWidget { + const ActionColumnButton({super.key, required super.action}); + + @override + Widget builder(BuildContext context, WidgetRef ref, ActionItem action) => ImmichColumnButton( + icon: action.icon, + label: action.label, + onPressed: action.onAction, + onLongPress: action.onSecondaryAction, + ); +} + +class ActionIconButton extends ActionWidget { final ImmichVariant variant; - const ActionIconButtonWidget({super.key, required this.action, this.variant = .ghost}); + const ActionIconButton({super.key, required super.action, this.variant = .ghost}); @override - Widget build(BuildContext context) => _ActionWidget( - action: action, - builder: (ctx) => ImmichIconButton(icon: action.icon, onPressed: ctx.onAction, variant: variant), + Widget builder(BuildContext context, WidgetRef ref, ActionItem action) => ImmichIconButton( + icon: action.icon, + onPressed: action.onAction, + onLongPress: action.onSecondaryAction, + variant: variant, ); } -class ActionButtonWidget extends StatelessWidget { - final BaseAction action; +class ActionButton extends ActionWidget { final ImmichVariant variant; - const ActionButtonWidget({super.key, required this.action, this.variant = .ghost}); + const ActionButton({super.key, required super.action, this.variant = .ghost}); @override - Widget build(BuildContext context) => _ActionWidget( - action: action, - builder: (ctx) => - ImmichTextButton(labelText: ctx.label, icon: action.icon, onPressed: ctx.onAction, variant: variant), + Widget builder(BuildContext context, WidgetRef ref, ActionItem action) => ImmichTextButton( + labelText: action.label, + icon: action.icon, + onPressed: action.onAction, + onLongPress: action.onSecondaryAction, + variant: variant, ); } -class ActionColumnButtonWidget extends StatelessWidget { - final BaseAction action; - - const ActionColumnButtonWidget({super.key, required this.action}); +class ActionMenuItem extends ActionWidget { + const ActionMenuItem({super.key, required super.action}); @override - Widget build(BuildContext context) => _ActionWidget( - action: action, - builder: (ctx) => ImmichColumnButton(icon: action.icon, label: ctx.label, onPressed: ctx.onAction), - ); -} - -class ActionMenuItemWidget extends StatelessWidget { - final BaseAction action; - - const ActionMenuItemWidget({super.key, required this.action}); - - @override - Widget build(BuildContext context) => _ActionWidget( - action: action, - builder: (ctx) => ImmichMenuItem(icon: action.icon, label: ctx.label, onPressed: ctx.onAction), - ); + Widget builder(BuildContext context, WidgetRef ref, ActionItem action) => + ImmichMenuItem(icon: action.icon, label: action.label, onPressed: action.onAction); } diff --git a/mobile/lib/presentation/actions/asset_debug.action.dart b/mobile/lib/presentation/actions/asset_debug.action.dart index aec99fc90b..ff2935fc96 100644 --- a/mobile/lib/presentation/actions/asset_debug.action.dart +++ b/mobile/lib/presentation/actions/asset_debug.action.dart @@ -2,26 +2,27 @@ import 'dart:async'; import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/providers/infrastructure/setting.provider.dart'; import 'package:immich_mobile/routing/router.dart'; -class AssetDebugAction extends AssetAction { - const AssetDebugAction({required super.assets}); +class AssetDebugAction extends AssetActionBuilder { + const AssetDebugAction({required super.source}); @override - IconData get icon => Icons.help_outline_rounded; + ActionItem? create(BuildContext context, WidgetRef ref) { + final assets = ref.watch(assetsActionProvider(source)).assets; + final troubleshootEnabled = ref.watch(settingsProvider.notifier).get(.advancedTroubleshooting); + if (!troubleshootEnabled || assets.length != 1) { + return null; + } - @override - String label(ActionScope scope) => scope.context.t.troubleshoot; - - @override - bool isVisible(ActionScope scope) => - assets.length == 1 && scope.ref.watch(settingsProvider.notifier).get(.advancedTroubleshooting); - - @override - Future onAction(ActionScope scope) async => - unawaited(scope.context.pushRoute(AssetTroubleshootRoute(asset: assets.first))); + return .new( + icon: Icons.help_outline_rounded, + label: context.t.troubleshoot, + onAction: () => unawaited(context.pushRoute(AssetTroubleshootRoute(asset: assets.single))), + ); + } } diff --git a/mobile/lib/presentation/actions/favorite.action.dart b/mobile/lib/presentation/actions/favorite.action.dart index a480e10a5f..9ab3770163 100644 --- a/mobile/lib/presentation/actions/favorite.action.dart +++ b/mobile/lib/presentation/actions/favorite.action.dart @@ -1,38 +1,62 @@ import 'package:flutter/material.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/generated/translations.g.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; -import 'package:immich_mobile/utils/asset_filter.dart'; -import 'package:immich_ui/immich_ui.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; -class FavoriteAction extends AssetAction { - final bool favorite; +typedef _State = ({bool shouldFavorite, List assetIds}); - FavoriteAction({required super.assets}) : favorite = assets.any((asset) => !asset.isFavorite); +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + if (assets.isEmpty) { + return null; + } + + final shouldFavorite = assets.favorite(isFavorite: false).isNotEmpty; + final assetIds = assets.favorite(isFavorite: !shouldFavorite).map((asset) => asset.id).toList(growable: false); + return (shouldFavorite: shouldFavorite, assetIds: assetIds); +}); + +class FavoriteAction extends AssetActionBuilder { + const FavoriteAction({required super.source}); @override - IconData get icon => favorite ? Icons.favorite_border_rounded : Icons.favorite_rounded; + ActionItem? create(BuildContext context, WidgetRef ref) { + final shouldFavorite = ref.watch(_stateProvider(source).select((state) => state?.shouldFavorite)); + if (shouldFavorite == null) { + return null; + } - @override - String label(ActionScope scope) => favorite ? scope.context.t.favorite : scope.context.t.unfavorite; + return .new( + icon: shouldFavorite ? Icons.favorite_border_rounded : Icons.favorite_rounded, + label: shouldFavorite ? context.t.favorite : context.t.unfavorite, + onAction: () => _favorite(context, ref), + ); + } - @override - Iterable filter(ActionScope scope) => - AssetFilter(assets).owned(scope.authUser.id).favorite(isFavorite: !favorite); + Future _favorite(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } - @override - bool isVisible(ActionScope scope) => filter(scope).isNotEmpty; + final _State(:shouldFavorite, :assetIds) = state; + final message = shouldFavorite + ? context.t.favorite_action_prompt(count: assetIds.length) + : context.t.unfavorite_action_prompt(count: assetIds.length); + final assertService = ref.read(assetServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); - @override - Future onAction(ActionScope scope) async { - final ActionScope(:ref) = scope; - final assets = filter(scope).map((asset) => asset.id).toList(growable: false); - - await ref.read(assetServiceProvider).updateFavorite(assets, favorite); - final message = favorite - ? StaticTranslations.instance.favorite_action_prompt(count: assets.length) - : StaticTranslations.instance.unfavorite_action_prompt(count: assets.length); - snackbar.success(message); + try { + await assertService.update(assetIds, isFavorite: .some(shouldFavorite)); + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update favorite status for assets"); + } } } diff --git a/mobile/lib/presentation/actions/partner.action.dart b/mobile/lib/presentation/actions/partner.action.dart index 11fb69ee75..012340c1d8 100644 --- a/mobile/lib/presentation/actions/partner.action.dart +++ b/mobile/lib/presentation/actions/partner.action.dart @@ -6,44 +6,46 @@ import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/presentation/widgets/people/partner_user_avatar.widget.dart'; import 'package:immich_mobile/providers/infrastructure/user.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; import 'package:immich_mobile/widgets/common/confirm_dialog.dart'; -class PartnerAddAction extends BaseAction { +class PartnerAddAction extends ActionBuilder { const PartnerAddAction(); @override - IconData get icon => Icons.person_add_rounded; + ActionItem create(BuildContext context, WidgetRef ref) => + ActionItem(icon: Icons.person_add_rounded, label: context.t.add_partner, onAction: () => _add(context, ref)); - @override - String label(ActionScope scope) => scope.context.t.add_partner; + Future _add(BuildContext context, WidgetRef ref) async { + final partnerService = ref.read(partnerServiceProvider); + final authUserId = ref.read(authUserProvider).id; - @override - Future onAction(ActionScope scope) async { - final ActionScope(:context, :ref, :authUser) = scope; final selected = await showDialog(context: context, builder: (_) => const PartnerSelectionDialog()); if (selected == null) { return; } - await ref.read(partnerServiceProvider).create(sharedById: authUser.id, sharedWithId: selected.id); + try { + await partnerService.create(sharedById: authUserId, sharedWithId: selected.id); + } catch (error, stack) { + handleError(error, stack: stack, description: 'Failed to add partner'); + } } } -class PartnerRemoveAction extends BaseAction { +class PartnerRemoveAction extends ActionBuilder { const PartnerRemoveAction({required this.sharedWithId, required this.partnerName}); final String sharedWithId; final String partnerName; @override - IconData get icon => Icons.person_remove_rounded; + ActionItem create(BuildContext context, WidgetRef ref) => + ActionItem(icon: Icons.person_remove_rounded, label: context.t.remove, onAction: () => _remove(context, ref)); - @override - String label(ActionScope scope) => scope.context.t.remove; - - @override - Future onAction(ActionScope scope) async { - final ActionScope(:context, :ref, :authUser) = scope; + Future _remove(BuildContext context, WidgetRef ref) async { + final partnerService = ref.read(partnerServiceProvider); + final authUserId = ref.read(authUserProvider).id; final confirmed = await showDialog( context: context, @@ -56,19 +58,18 @@ class PartnerRemoveAction extends BaseAction { return; } - await ref.read(partnerServiceProvider).delete(sharedById: authUser.id, sharedWithId: sharedWithId); + try { + await partnerService.delete(sharedById: authUserId, sharedWithId: sharedWithId); + } catch (error, stack) { + handleError(error, stack: stack, description: 'Failed to remove partner'); + } } } @visibleForTesting -final candidatesStateProvider = StreamProvider.autoDispose>((ref) { - final currentUser = ref.watch(currentUserProvider); - // TODO: Refactor with a route guard to avoid this check in every provider - if (currentUser == null) { - return const Stream.empty(); - } - return ref.watch(partnerServiceProvider).getCandidates(currentUser.id); -}); +final candidatesStateProvider = StreamProvider.autoDispose>( + (ref) => ref.watch(partnerServiceProvider).getCandidates(ref.watch(authUserProvider).id), +); @visibleForTesting class PartnerSelectionDialog extends ConsumerWidget { diff --git a/mobile/lib/presentation/actions/timeline.action.dart b/mobile/lib/presentation/actions/timeline.action.dart deleted file mode 100644 index d8d367f674..0000000000 --- a/mobile/lib/presentation/actions/timeline.action.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:immich_mobile/presentation/actions/action.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; - -class TimelineAction extends BaseAction { - final BaseAction action; - - const TimelineAction({required this.action}); - - @override - IconData get icon => action.icon; - - @override - String label(ActionScope scope) => action.label(scope); - - @override - bool isVisible(ActionScope scope) => action.isVisible(scope); - - @override - Future onAction(ActionScope scope) async { - await action.onAction(scope); - scope.ref.read(multiSelectProvider.notifier).reset(); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart deleted file mode 100644 index 0f3ce47122..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/favorite_action_button.widget.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class FavoriteActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const FavoriteActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).favorite(source); - - if (source == ActionSource.viewer) { - if (result.success) { - final currentAsset = ref.read(assetViewerProvider).currentAsset; - if (currentAsset is RemoteAsset && !currentAsset.isFavorite) { - ref.read(assetViewerProvider.notifier).setAsset(currentAsset.copyWith(isFavorite: true)); - } - } - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'favorite_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.favorite_border_rounded, - label: "favorite".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart deleted file mode 100644 index be6c3b0180..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/unfavorite_action_button.widget.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class UnFavoriteActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const UnFavoriteActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).unFavorite(source); - - if (source == ActionSource.viewer) { - if (result.success) { - final currentAsset = ref.read(assetViewerProvider).currentAsset; - if (currentAsset is RemoteAsset && currentAsset.isFavorite) { - ref.read(assetViewerProvider.notifier).setAsset(currentAsset.copyWith(isFavorite: false)); - } - } - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'unfavorite_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.favorite_rounded, - label: "unfavorite".t(context: context), - onPressed: () => _onTap(context, ref), - iconOnly: iconOnly, - menuItem: menuItem, - ); - } -} diff --git a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart index 9c9f8f7139..deae9cbd07 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart @@ -46,7 +46,6 @@ class ViewerTopAppBar extends ConsumerWidget implements PreferredSizeWidget { ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)) * (showingControls ? 1 : 0); final originalTheme = context.themeData; - final assetForAction = [asset]; final actions = [ if (asset.isMotionPhoto) const MotionPhotoActionButton(iconOnly: true), @@ -66,7 +65,7 @@ class ViewerTopAppBar extends ConsumerWidget implements PreferredSizeWidget { }, ), - ActionIconButtonWidget(action: FavoriteAction(assets: assetForAction)), + const ActionIconButton(action: FavoriteAction(source: .viewer)), ImmichColorOverride(color: null, child: ViewerKebabMenu(originalTheme: originalTheme)), ]; diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index 3c9c0c692e..85fa8b4563 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -5,7 +5,6 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; @@ -76,9 +75,6 @@ class _ArchiveBottomSheetState extends ConsumerState { return sheetController.animateTo(0.85, duration: const Duration(milliseconds: 200), curve: Curves.easeInOut); } - final assets = multiselect.selectedAssets.toList(growable: false); - final actions = [FavoriteAction(assets: assets)]; - return BaseBottomSheet( controller: sheetController, initialChildSize: 0.25, @@ -89,7 +85,7 @@ class _ArchiveBottomSheetState extends ConsumerState { if (multiselect.hasRemote) ...[ const ShareLinkActionButton(source: ActionSource.timeline), const UnArchiveActionButton(source: ActionSource.timeline), - ...actions.map((action) => ActionColumnButtonWidget(action: TimelineAction(action: action))), + const ActionColumnButton(action: FavoriteAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), isTrashEnable ? const TrashActionButton(source: ActionSource.timeline) diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index 4382eeba5d..6447c5ccf8 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -6,7 +6,6 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; @@ -77,9 +76,6 @@ class FavoriteBottomSheet extends ConsumerWidget { ref.read(multiSelectProvider.notifier).reset(); } - final assets = multiselect.selectedAssets.toList(growable: false); - final actions = [FavoriteAction(assets: assets)]; - return BaseBottomSheet( initialChildSize: 0.4, maxChildSize: 0.7, @@ -88,7 +84,7 @@ class FavoriteBottomSheet extends ConsumerWidget { const ShareActionButton(source: ActionSource.timeline), if (multiselect.hasRemote) ...[ const ShareLinkActionButton(source: ActionSource.timeline), - ...actions.map((action) => ActionColumnButtonWidget(action: TimelineAction(action: action))), + const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ArchiveActionButton(source: ActionSource.timeline), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), isTrashEnable diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index 1949a79495..2f1ffe4cbc 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -4,8 +4,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; -import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; +import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; @@ -14,7 +13,6 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permane import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/favorite_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; @@ -83,9 +81,6 @@ class _GeneralBottomSheetState extends ConsumerState { return sheetController.animateTo(0.85, duration: const Duration(milliseconds: 200), curve: Curves.easeInOut); } - final assets = multiselect.selectedAssets.toList(growable: false); - final actions = [AssetDebugAction(assets: assets)]; - return BaseBottomSheet( controller: sheetController, initialChildSize: widget.minChildSize ?? 0.15, @@ -93,7 +88,7 @@ class _GeneralBottomSheetState extends ConsumerState { maxChildSize: 0.85, shouldCloseOnMinExtent: false, actions: [ - ...actions.map((action) => ActionColumnButtonWidget(action: TimelineAction(action: action))), + const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ShareActionButton(source: ActionSource.timeline), if (multiselect.hasRemote) ...[ const ShareLinkActionButton(source: ActionSource.timeline), @@ -101,7 +96,7 @@ class _GeneralBottomSheetState extends ConsumerState { isTrashEnable ? const TrashActionButton(source: ActionSource.timeline) : const DeletePermanentActionButton(source: ActionSource.timeline), - const FavoriteActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ArchiveActionButton(source: ActionSource.timeline), if (tagsEnabled) const BulkTagAssetsActionButton(source: ActionSource.timeline), const EditDateTimeActionButton(source: ActionSource.timeline), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart index a292c1899c..f6cbc5eac9 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart @@ -5,7 +5,6 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; @@ -85,9 +84,6 @@ class _RemoteAlbumBottomSheetState extends ConsumerState return sheetController.animateTo(0.85, duration: const Duration(milliseconds: 200), curve: Curves.easeInOut); } - final assets = multiselect.selectedAssets.toList(growable: false); - final actions = [FavoriteAction(assets: assets)]; - return BaseBottomSheet( controller: sheetController, initialChildSize: 0.22, @@ -101,7 +97,7 @@ class _RemoteAlbumBottomSheetState extends ConsumerState if (ownsAlbum) ...[ const ArchiveActionButton(source: ActionSource.timeline), - ...actions.map((action) => ActionColumnButtonWidget(action: TimelineAction(action: action))), + const ActionColumnButton(action: FavoriteAction(source: .timeline)), ], const DownloadActionButton(source: ActionSource.timeline), if (ownsAlbum) ...[ diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index 7e08686078..d4cd39bbd3 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -137,28 +137,6 @@ class ActionNotifier extends Notifier { } } - Future favorite(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.favorite(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to favorite assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future unFavorite(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.unFavorite(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to unfavorite assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future archive(ActionSource source) async { final ids = _getOwnedRemoteIdsForSource(source); try { diff --git a/mobile/lib/providers/infrastructure/toast.provider.dart b/mobile/lib/providers/infrastructure/toast.provider.dart index 27d1cf9e6b..eaaffd6fca 100644 --- a/mobile/lib/providers/infrastructure/toast.provider.dart +++ b/mobile/lib/providers/infrastructure/toast.provider.dart @@ -1,4 +1,4 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/repositories/toast.repository.dart'; +import 'package:immich_mobile/services/toast.service.dart'; -final toastRepositoryProvider = Provider((ref) => const .new()); +final toastServiceProvider = Provider((ref) => const .new()); diff --git a/mobile/lib/providers/user.provider.dart b/mobile/lib/providers/user.provider.dart index 2feb39ce5c..427a1bf1c7 100644 --- a/mobile/lib/providers/user.provider.dart +++ b/mobile/lib/providers/user.provider.dart @@ -30,3 +30,11 @@ class CurrentUserProvider extends StateNotifier { final currentUserProvider = StateNotifierProvider((ref) { return CurrentUserProvider(ref.watch(userServiceProvider)); }); + +final authUserProvider = Provider((ref) { + final user = ref.watch(currentUserProvider); + if (user == null) { + throw Exception('User must be logged in to access this provider'); + } + return user; +}); diff --git a/mobile/lib/repositories/asset_api.repository.dart b/mobile/lib/repositories/asset_api.repository.dart index 2024b75c6e..9b92b491bf 100644 --- a/mobile/lib/repositories/asset_api.repository.dart +++ b/mobile/lib/repositories/asset_api.repository.dart @@ -111,11 +111,6 @@ class AssetApiRepository extends ApiRepository { ); } - // TODO(shenlong): remove after action migration - Future updateFavorite(List ids, bool isFavorite) async { - return _api.updateAssets(AssetBulkUpdateDto(ids: ids, isFavorite: Optional.present(isFavorite))); - } - Future updateLocation(List ids, LatLng location) async { return _api.updateAssets( AssetBulkUpdateDto( diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index 5986f0407d..dd1b3e8496 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -68,16 +68,6 @@ class ActionService { unawaited(context.pushRoute(SharedLinkEditRoute(assetsList: remoteIds))); } - Future favorite(List remoteIds) async { - await _assetApiRepository.updateFavorite(remoteIds, true); - await _remoteAssetRepository.updateFavorite(remoteIds, true); - } - - Future unFavorite(List remoteIds) async { - await _assetApiRepository.updateFavorite(remoteIds, false); - await _remoteAssetRepository.updateFavorite(remoteIds, false); - } - Future archive(List remoteIds) async { await _assetApiRepository.updateVisibility(remoteIds, .archive); await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.archive); diff --git a/mobile/lib/repositories/toast.repository.dart b/mobile/lib/services/toast.service.dart similarity index 91% rename from mobile/lib/repositories/toast.repository.dart rename to mobile/lib/services/toast.service.dart index 0cca50fdec..2b61a945ff 100644 --- a/mobile/lib/repositories/toast.repository.dart +++ b/mobile/lib/services/toast.service.dart @@ -9,8 +9,8 @@ class ToastOption { const ToastOption({this.timeout, this.onUndo}); } -class ToastRepository { - const ToastRepository(); +class ToastService { + const ToastService(); FutureOr success(String message, {ToastOption? toast}) { snackbar.success(message, duration: toast?.timeout); diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 0e5a3123e7..4219e0aed7 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -192,7 +192,7 @@ enum ActionButtonType { bool menuItem = false, ]) { return switch (this) { - ActionButtonType.advancedInfo => ActionMenuItemWidget(action: AssetDebugAction(assets: [context.asset])), + ActionButtonType.advancedInfo => ActionMenuItem(action: AssetDebugAction(source: context.source)), ActionButtonType.share => ShareActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), ActionButtonType.shareLink => ShareLinkActionButton( source: context.source, diff --git a/mobile/test/repository.mocks.dart b/mobile/test/repository.mocks.dart index 82c9395b58..b56a8a098a 100644 --- a/mobile/test/repository.mocks.dart +++ b/mobile/test/repository.mocks.dart @@ -6,7 +6,6 @@ import 'package:immich_mobile/repositories/auth.repository.dart'; import 'package:immich_mobile/repositories/auth_api.repository.dart'; import 'package:immich_mobile/repositories/download.repository.dart'; import 'package:immich_mobile/repositories/permission.repository.dart'; -import 'package:immich_mobile/repositories/toast.repository.dart'; import 'package:mocktail/mocktail.dart'; class MockAssetApiRepository extends Mock implements AssetApiRepository {} @@ -24,5 +23,3 @@ class MockTagService extends Mock implements TagService {} class MockDownloadRepository extends Mock implements DownloadRepository {} class MockRemoteExifRepository extends Mock implements RemoteExifRepository {} - -class MockToastRepository extends Mock implements ToastRepository {} diff --git a/mobile/test/service.mocks.dart b/mobile/test/service.mocks.dart index 300c54dcbb..785567de56 100644 --- a/mobile/test/service.mocks.dart +++ b/mobile/test/service.mocks.dart @@ -12,6 +12,7 @@ import 'package:immich_mobile/services/foreground_upload.service.dart'; import 'package:immich_mobile/services/gcast.service.dart'; import 'package:immich_mobile/services/network.service.dart'; import 'package:immich_mobile/services/server_info.service.dart'; +import 'package:immich_mobile/services/toast.service.dart'; import 'package:mocktail/mocktail.dart'; class MockApiService extends Mock implements ApiService {} @@ -43,3 +44,5 @@ class MockServerInfoService extends Mock implements ServerInfoService {} class MockCleanupService extends Mock implements CleanupService {} class MockBackgroundSyncManager extends Mock implements BackgroundSyncManager {} + +class MockToastService extends Mock implements ToastService {} diff --git a/mobile/test/unit/mocks.dart b/mobile/test/unit/mocks.dart index d8eadda7ae..7dd15eb9a3 100644 --- a/mobile/test/unit/mocks.dart +++ b/mobile/test/unit/mocks.dart @@ -30,7 +30,6 @@ class RepositoryMocks { final remoteAsset = RemoteAssetRepositoryStub(MockRemoteAssetRepository()); final remoteExif = RemoteExifRepositoryStub(MockRemoteExifRepository()); final trashedAsset = MockTrashedLocalAssetRepository(); - final toast = MockToastRepository(); final remoteAlbum = MockRemoteAlbumRepository(); final albumApi = MockDriftAlbumApiRepository(); @@ -56,7 +55,6 @@ class RepositoryMocks { assetApi.reset(); assetMedia.reset(); download.reset(); - reset(toast); _stubLocalAlbumRepository(); _stubLocalAssetRepository(); _stubRemoteAssetRepository(); @@ -115,6 +113,7 @@ class ServiceMocks { final upload = MockForegroundUploadService(); final cast = MockGCastService(); final serverInfo = MockServerInfoService(); + final toast = MockToastService(); ServiceMocks() { resetAll(); @@ -132,6 +131,7 @@ class ServiceMocks { reset(serverInfo); reset(backgroundSync); reset(upload); + reset(toast); _stubUserService(); _stubPartnerService(); _stubAssetService(); diff --git a/mobile/test/unit/presentation/actions/asset_debug_action_test.dart b/mobile/test/unit/presentation/actions/asset_debug_action_test.dart index 4e84c100cb..1644df0396 100644 --- a/mobile/test/unit/presentation/actions/asset_debug_action_test.dart +++ b/mobile/test/unit/presentation/actions/asset_debug_action_test.dart @@ -24,7 +24,8 @@ void main() { testWidgets('visible for a single asset when advanced troubleshooting is on', (tester) async { await tester.pumpTestWidget( context, - ActionIconButtonWidget(action: AssetDebugAction(assets: [RemoteAssetFactory.create()])), + const ActionIconButton(action: AssetDebugAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), ); expect(find.byType(ImmichIconButton), findsOneWidget); @@ -33,9 +34,8 @@ void main() { testWidgets('hidden for multiple assets', (tester) async { await tester.pumpTestWidget( context, - ActionIconButtonWidget( - action: AssetDebugAction(assets: [RemoteAssetFactory.create(), RemoteAssetFactory.create()]), - ), + const ActionIconButton(action: AssetDebugAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create(), RemoteAssetFactory.create()}), ); expect(find.byType(ImmichIconButton), findsNothing); @@ -43,9 +43,11 @@ void main() { testWidgets('hidden when advanced troubleshooting is off', (tester) async { await StoreService.I.put(StoreKey.advancedTroubleshooting, false); + await tester.pumpTestWidget( context, - ActionIconButtonWidget(action: AssetDebugAction(assets: [RemoteAssetFactory.create()])), + const ActionIconButton(action: AssetDebugAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), ); expect(find.byType(ImmichIconButton), findsNothing); diff --git a/mobile/test/unit/presentation/actions/favorite_action_test.dart b/mobile/test/unit/presentation/actions/favorite_action_test.dart index 722d9d1dc7..cb4d6130ab 100644 --- a/mobile/test/unit/presentation/actions/favorite_action_test.dart +++ b/mobile/test/unit/presentation/actions/favorite_action_test.dart @@ -1,7 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/utils/option.dart'; +import 'package:immich_ui/immich_ui.dart'; import 'package:mocktail/mocktail.dart'; import '../../../service.mocks.dart'; @@ -24,55 +27,66 @@ void main() { RemoteAsset owned({bool isFavorite = false}) => RemoteAssetFactory.create(ownerId: context.currentUser.id, isFavorite: isFavorite); + Future pumpFavorite(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const FavoriteAction(source: .timeline), overrides: context.selected(selection)); + group('FavoriteAction', () { testWidgets('favorites the eligible owned assets', (tester) async { final asset = owned(); - await tester.pumpTestAction(context, FavoriteAction(assets: [asset])); + await pumpFavorite(tester, {asset}); - verify(() => assetService.updateFavorite([asset.id], true)).called(1); + verify(() => assetService.update([asset.id], isFavorite: const Option.some(true))).called(1); }); testWidgets('unfavorite the eligible owned assets', (tester) async { final asset = owned(isFavorite: true); - await tester.pumpTestAction(context, FavoriteAction(assets: [asset])); + await pumpFavorite(tester, {asset}); - verify(() => assetService.updateFavorite([asset.id], false)).called(1); + verify(() => assetService.update([asset.id], isFavorite: const Option.some(false))).called(1); }); testWidgets('ignores assets owned by someone else', (tester) async { final mine = owned(); final theirs = RemoteAssetFactory.create(); - await tester.pumpTestAction(context, FavoriteAction(assets: [mine, theirs])); + await pumpFavorite(tester, {mine, theirs}); - verify(() => assetService.updateFavorite([mine.id], true)).called(1); - }); - - testWidgets('batches every eligible owned asset into a single call', (tester) async { - final first = owned(); - final second = owned(); - - await tester.pumpTestAction(context, FavoriteAction(assets: [first, second])); - - verify(() => assetService.updateFavorite([first.id, second.id], true)).called(1); + verify(() => assetService.update([mine.id], isFavorite: const Option.some(true))).called(1); }); testWidgets('skips owned assets already in the target state', (tester) async { final stale = owned(); final alreadyFavorite = owned(isFavorite: true); - await tester.pumpTestAction(context, FavoriteAction(assets: [stale, alreadyFavorite])); + await pumpFavorite(tester, {stale, alreadyFavorite}); - verify(() => assetService.updateFavorite([stale.id], true)).called(1); + verify(() => assetService.update([stale.id], isFavorite: const Option.some(true))).called(1); }); testWidgets('shows a confirmation snackbar on success', (tester) async { - await tester.pumpTestAction(context, FavoriteAction(assets: [owned()])); + await pumpFavorite(tester, {owned()}); await tester.pumpUntilFound(find.byType(SnackBar)); expect(find.byType(SnackBar), findsOneWidget); }); + + testWidgets('clears the selection once the update succeeds', (tester) async { + await pumpFavorite(tester, {owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden when none of the selected assets are owned', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: FavoriteAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); }); } diff --git a/mobile/test/unit/presentation/actions/timeline_action_test.dart b/mobile/test/unit/presentation/actions/timeline_action_test.dart deleted file mode 100644 index 5661be72c0..0000000000 --- a/mobile/test/unit/presentation/actions/timeline_action_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/presentation/actions/action.dart'; -import 'package:immich_mobile/presentation/actions/action.widget.dart'; -import 'package:immich_mobile/presentation/actions/timeline.action.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; - -import '../../factories/remote_asset_factory.dart'; -import '../presentation_context.dart'; - -class _FakeAction extends BaseAction { - _FakeAction({this.visible = true, this.error}); - - final bool visible; - final Object? error; - - bool ran = false; - bool? selectionDuringOnAction; - - @override - IconData get icon => Icons.bolt; - - @override - String label(ActionScope scope) => 'fake'; - - @override - bool isVisible(ActionScope scope) => visible; - - @override - Future onAction(ActionScope scope) async { - ran = true; - selectionDuringOnAction = scope.ref.read(multiSelectProvider).isEnabled; - if (error != null) { - throw error!; - } - } -} - -void main() { - late PresentationContext context; - - setUp(() async { - context = await PresentationContext.create(); - }); - - tearDown(() { - context.dispose(); - }); - - List overrides() => [ - multiSelectProvider.overrideWith( - () => MultiSelectNotifier( - MultiSelectState(selectedAssets: {RemoteAssetFactory.create()}, lockedSelectionAssets: const {}), - ), - ), - ]; - - Future<(ActionScope, ProviderContainer)> pumpScope(WidgetTester tester) async { - late ActionScope scope; - late ProviderContainer container; - await tester.pumpTestWidget( - context, - Consumer( - builder: (innerContext, ref, _) { - scope = ActionScope(context: innerContext, ref: ref, authUser: context.currentUser); - container = ProviderScope.containerOf(innerContext, listen: false); - return const SizedBox.shrink(); - }, - ), - overrides: overrides(), - ); - return (scope, container); - } - - group('TimelineAction', () { - testWidgets('runs the wrapped action and then clears the selection', (tester) async { - final inner = _FakeAction(); - final (scope, container) = await pumpScope(tester); - await TimelineAction(action: inner).onAction(scope); - - expect(inner.ran, isTrue); - expect(inner.selectionDuringOnAction, isTrue, reason: 'reset must run after the inner action, not before'); - expect(container.read(multiSelectProvider).isEnabled, isFalse); - }); - - testWidgets('rethrows and keeps the selection when the wrapped action throws', (tester) async { - final error = Exception('boom'); - final inner = _FakeAction(error: error); - final (scope, container) = await pumpScope(tester); - - await expectLater(TimelineAction(action: inner).onAction(scope), throwsA(same(error))); - - expect(inner.ran, isTrue); - expect(container.read(multiSelectProvider).isEnabled, isTrue); - }); - - testWidgets('delegates visibility to the wrapped action', (tester) async { - await tester.pumpTestWidget( - context, - ActionIconButtonWidget(action: TimelineAction(action: _FakeAction(visible: false))), - ); - - expect(find.byType(ActionIconButtonWidget), findsOneWidget); - expect(find.byIcon(Icons.bolt), findsNothing); - }); - }); -} diff --git a/mobile/test/unit/presentation/partner_page_test.dart b/mobile/test/unit/presentation/partner_page_test.dart index ee9c6a3575..e6ff8fc83f 100644 --- a/mobile/test/unit/presentation/partner_page_test.dart +++ b/mobile/test/unit/presentation/partner_page_test.dart @@ -3,7 +3,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/pages/library/partner/partner.page.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/partner.action.dart'; +import 'package:immich_ui/immich_ui.dart'; import '../factories/partner_user_factory.dart'; import '../factories/user_factory.dart'; @@ -17,12 +19,10 @@ void main() { group('PartnerSharedByList', () { testWidgets('shows the empty-state add button when there are no partners', (tester) async { - const action = PartnerAddAction(); - await tester.pumpTestWidget(context, const PartnerSharedByList(partners: [])); expect(find.byType(ListView), findsNothing); - expect(find.widgetWithIcon(TextButton, action.icon), findsOneWidget); + expect(find.descendant(of: find.byType(ActionButton), matching: find.byType(ImmichTextButton)), findsOneWidget); }); testWidgets('renders a tile per partner with name and email', (tester) async { @@ -39,9 +39,11 @@ void main() { testWidgets('renders a remove action for each partner', (tester) async { final partner1 = PartnerFactory.create(inTimeline: true); final partner2 = PartnerFactory.create(); - const action = PartnerRemoveAction(sharedWithId: '', partnerName: ''); await tester.pumpTestWidget(context, PartnerSharedByList(partners: [partner1, partner2])); - expect(find.byIcon(action.icon), findsNWidgets(2)); + expect( + find.descendant(of: find.byType(ActionIconButton), matching: find.byType(ImmichIconButton)), + findsNWidgets(2), + ); }); }); diff --git a/mobile/test/unit/presentation/presentation_context.dart b/mobile/test/unit/presentation/presentation_context.dart index 25de583049..a45c1c14f9 100644 --- a/mobile/test/unit/presentation/presentation_context.dart +++ b/mobile/test/unit/presentation/presentation_context.dart @@ -5,6 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/locales.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/domain/services/store.service.dart'; @@ -16,6 +17,7 @@ import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/providers/infrastructure/user.provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; +import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/services/gcast.service.dart'; import 'package:immich_mobile/services/server_info.service.dart'; @@ -52,6 +54,12 @@ class PresentationContext { inLockedViewProvider.overrideWithValue(false), ]; + List selected(Set assets) => [ + multiSelectProvider.overrideWith( + () => MultiSelectNotifier(MultiSelectState(selectedAssets: assets, lockedSelectionAssets: const {})), + ), + ]; + static Future create() async { TestUtils.init(); if (_db == null) { @@ -103,10 +111,10 @@ extension PumpPresentationWidget on WidgetTester { Future pumpTestAction( PresentationContext context, - BaseAction action, { + ActionBuilder action, { List overrides = const [], }) async { - await pumpTestWidget(context, ActionIconButtonWidget(action: action), overrides: overrides); + await pumpTestWidget(context, ActionIconButton(action: action), overrides: overrides); await tap(find.byType(ImmichIconButton)); await pump(); } From 8e0ad9b2c4b6579eb6082a6d65e23a715ec42bfe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 12:55:30 +0200 Subject: [PATCH 36/69] fix(deps): update typescript-projects (#30305) Co-authored-by: Daniel Dietzler --- docs/mise.toml | 2 +- mise.lock | 80 +- mise.toml | 2 +- package.json | 2 +- packages/e2e-auth-server/package.json | 2 +- packages/plugin-sdk/package.json | 2 +- packages/scripts/package.json | 2 +- pnpm-lock.yaml | 5102 ++++++++--------- server/package.json | 12 +- web/package.json | 2 +- web/src/lib/components/timeline/Month.svelte | 6 +- .../modals/PersonMergeSuggestionModal.svelte | 1 + 12 files changed, 2567 insertions(+), 2648 deletions(-) diff --git a/docs/mise.toml b/docs/mise.toml index 1236b21160..c4fe5f1b68 100644 --- a/docs/mise.toml +++ b/docs/mise.toml @@ -28,4 +28,4 @@ run = "prettier --write ." run = "wrangler pages deploy build --project-name=${PROJECT_NAME} --branch=${BRANCH_NAME}" [tools] -wrangler = "4.111.0" +wrangler = "4.114.0" diff --git a/mise.lock b/mise.lock index 3b05f22889..a4b395500b 100644 --- a/mise.lock +++ b/mise.lock @@ -82,6 +82,15 @@ url_api = "https://api.github.com/repos/extism/js-pdk/releases/assets/353224133" version = "7.1.3-6" backend = "github:jellyfin/jellyfin-ffmpeg" +[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.windows-x64"] +checksum = "sha256:7b7168149689610296f3a187c717056ce0786cc125a31caf28056737e9ba1cc1" +url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_win64-clang-gpl.zip" +url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/409036094" + +[[tools."github:jellyfin/jellyfin-ffmpeg"]] +version = "7.1.3-6" +backend = "github:jellyfin/jellyfin-ffmpeg" + [tools."github:jellyfin/jellyfin-ffmpeg".options] asset_pattern = "jellyfin-ffmpeg_*_portable_macarm64-gpl.tar.xz" @@ -111,23 +120,6 @@ url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets version = "7.1.3-6" backend = "github:jellyfin/jellyfin-ffmpeg" -[tools."github:jellyfin/jellyfin-ffmpeg".options] -asset_pattern = "jellyfin-ffmpeg_*_portable_linux64-gpl.tar.xz" - -[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.linux-x64"] -checksum = "sha256:39e99a7927468a6abec5f65d00f55010e8ff2ae3c2605294f179c94f6ae21af2" -url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_linux64-gpl.tar.xz" -url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/409048879" - -[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.linux-x64-musl"] -checksum = "sha256:39e99a7927468a6abec5f65d00f55010e8ff2ae3c2605294f179c94f6ae21af2" -url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_linux64-gpl.tar.xz" -url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/409048879" - -[[tools."github:jellyfin/jellyfin-ffmpeg"]] -version = "7.1.3-6" -backend = "github:jellyfin/jellyfin-ffmpeg" - [tools."github:jellyfin/jellyfin-ffmpeg".options] asset_pattern = "jellyfin-ffmpeg_*_portable_mac64-gpl.tar.xz" @@ -140,10 +132,18 @@ url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets version = "7.1.3-6" backend = "github:jellyfin/jellyfin-ffmpeg" -[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.windows-x64"] -checksum = "sha256:7b7168149689610296f3a187c717056ce0786cc125a31caf28056737e9ba1cc1" -url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_win64-clang-gpl.zip" -url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/409036094" +[tools."github:jellyfin/jellyfin-ffmpeg".options] +asset_pattern = "jellyfin-ffmpeg_*_portable_linux64-gpl.tar.xz" + +[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.linux-x64"] +checksum = "sha256:39e99a7927468a6abec5f65d00f55010e8ff2ae3c2605294f179c94f6ae21af2" +url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_linux64-gpl.tar.xz" +url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/409048879" + +[tools."github:jellyfin/jellyfin-ffmpeg"."platforms.linux-x64-musl"] +checksum = "sha256:39e99a7927468a6abec5f65d00f55010e8ff2ae3c2605294f179c94f6ae21af2" +url = "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.1.3-6/jellyfin-ffmpeg_7.1.3-6_portable_linux64-gpl.tar.xz" +url_api = "https://api.github.com/repos/jellyfin/jellyfin-ffmpeg/releases/assets/409048879" [[tools."github:webassembly/binaryen"]] version = "version_124" @@ -291,43 +291,43 @@ url = "https://github.com/opentofu/opentofu/releases/download/v1.12.5/tofu_1.12. url_api = "https://api.github.com/repos/opentofu/opentofu/releases/assets/484602547" [[tools.pnpm]] -version = "11.13.1" +version = "11.17.0" backend = "aqua:pnpm/pnpm" [tools.pnpm."platforms.linux-arm64"] -checksum = "sha256:b52db99d215ed7dc9563aed815953c62a6c1ffd7cd75803d3a07ad7e4f246aed" -url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-linux-arm64.tar.gz" -url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563983" +checksum = "sha256:730d17de742a3efbb020ba91d7acfc0456c6ba6ad1cd8eb49f4c229fe9f504d3" +url = "https://github.com/pnpm/pnpm/releases/download/v11.17.0/pnpm-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/487422123" provenance = "github-attestations" [tools.pnpm."platforms.linux-arm64-musl"] -checksum = "sha256:2cadd4fc815c591f498a0a84c9e74a836e3e8c1236275f6e1cfd355bae6ae957" -url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-linux-arm64-musl.tar.gz" -url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563985" +checksum = "sha256:cc072c0e7bdd290f52fb9afdcea778ede69f96f0f4dae63623163fc11d4beec3" +url = "https://github.com/pnpm/pnpm/releases/download/v11.17.0/pnpm-linux-arm64-musl.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/487422121" provenance = "github-attestations" [tools.pnpm."platforms.linux-x64"] -checksum = "sha256:bd6d4b0e14536207ad76bc838f5980cecd968da15f69aae0b207380cca3f2e98" -url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-linux-x64.tar.gz" -url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563986" +checksum = "sha256:bdb1db01bf0f757495405a59a09c5c287f315889dc98d3b14bc374b9fe43a0bf" +url = "https://github.com/pnpm/pnpm/releases/download/v11.17.0/pnpm-linux-x64.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/487422122" provenance = "github-attestations" [tools.pnpm."platforms.linux-x64-musl"] -checksum = "sha256:ba19690f4ed1b64f1203ade14e9216352b46232d5582468b26a0160e0c9618c5" -url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-linux-x64-musl.tar.gz" -url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563980" +checksum = "sha256:db2e4eeecab336bd41bbbc7a39626b166f1a15bb189efcf6a1dafdf159f23fe7" +url = "https://github.com/pnpm/pnpm/releases/download/v11.17.0/pnpm-linux-x64-musl.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/487422116" provenance = "github-attestations" [tools.pnpm."platforms.macos-arm64"] -checksum = "sha256:765c2bf04e8129cb58c0f946e324262e418370b35a203b50b1f06a0567ef8bc1" -url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-darwin-arm64.tar.gz" -url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563984" +checksum = "sha256:1e9a35d76f9d382af365d95c64f3abf7815e24350653f5bb1a37e4546265bc2b" +url = "https://github.com/pnpm/pnpm/releases/download/v11.17.0/pnpm-darwin-arm64.tar.gz" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/487422117" provenance = "github-attestations" [tools.pnpm."platforms.windows-x64"] -checksum = "sha256:d8bebbc71df2702961c1d34a5e61196bc0aa3bbde33c33253f6afa3dd4546a6d" -url = "https://github.com/pnpm/pnpm/releases/download/v11.13.1/pnpm-win32-x64.zip" -url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/478563981" +checksum = "sha256:3025c174a6dcffec14a071a5c854cb0c350a09a8c7c2857a75f75cc7b29b939c" +url = "https://github.com/pnpm/pnpm/releases/download/v11.17.0/pnpm-win32-x64.zip" +url_api = "https://api.github.com/repos/pnpm/pnpm/releases/assets/487422118" provenance = "github-attestations" [[tools.terragrunt]] diff --git a/mise.toml b/mise.toml index d069dc1b99..f01c07f980 100644 --- a/mise.toml +++ b/mise.toml @@ -16,7 +16,7 @@ config_roots = [ [tools] node = "24.15.0" -pnpm = "11.13.1" +pnpm = "11.17.0" terragrunt = "1.1.1" opentofu = "1.12.5" "npm:@openapitools/openapi-generator-cli" = "2.40.1" diff --git a/package.json b/package.json index 817988a100..2464012cee 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "format": "prettier --cache --check i18n/", "format:fix": "prettier --cache --write --list-different i18n" }, - "packageManager": "pnpm@11.13.1", + "packageManager": "pnpm@11.17.0", "engines": { "pnpm": ">=10.0.0" }, diff --git a/packages/e2e-auth-server/package.json b/packages/e2e-auth-server/package.json index 5e88465de4..b872dfe36d 100644 --- a/packages/e2e-auth-server/package.json +++ b/packages/e2e-auth-server/package.json @@ -13,5 +13,5 @@ "oidc-provider": "^9.0.0", "tsx": "^4.20.6" }, - "packageManager": "pnpm@11.13.1" + "packageManager": "pnpm@11.17.0" } diff --git a/packages/plugin-sdk/package.json b/packages/plugin-sdk/package.json index 51fee7efda..8afa00cfb4 100644 --- a/packages/plugin-sdk/package.json +++ b/packages/plugin-sdk/package.json @@ -27,7 +27,7 @@ "keywords": [], "author": "", "license": "GNU Affero General Public License version 3", - "packageManager": "pnpm@11.13.1", + "packageManager": "pnpm@11.17.0", "devDependencies": { "@extism/js-pdk": "^1.1.1", "@immich/sdk": "workspace:*", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index c2128db479..66327e6150 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -32,5 +32,5 @@ "vite": "^8.0.16", "vitest": "^4.1.8" }, - "packageManager": "pnpm@11.13.1" + "packageManager": "pnpm@11.17.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4d3e4246a..1f9120825d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,31 +19,31 @@ importers: devDependencies: prettier: specifier: ^3.8.3 - version: 3.9.5 + version: 3.9.6 prettier-plugin-sort-json: specifier: ^4.2.0 - version: 4.2.0(prettier@3.9.5) + version: 4.2.0(prettier@3.9.6) .github: devDependencies: prettier: specifier: ^3.7.4 - version: 3.9.5 + version: 3.9.6 docs: dependencies: '@docusaurus/core': specifier: ~3.10.0 - version: 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/preset-classic': specifier: ~3.10.0 - version: 3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3) + version: 3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/theme-common': specifier: ~3.10.0 - version: 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/theme-mermaid': specifier: ~3.10.0 - version: 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@mdi/js': specifier: ^7.3.67 version: 7.4.47 @@ -52,31 +52,31 @@ importers: version: 1.6.1 '@mdx-js/react': specifier: ^3.0.0 - version: 3.1.1(@types/react@19.2.17)(react@19.2.7) + version: 3.1.1(@types/react@19.2.17)(react@19.2.8) autoprefixer: specifier: ^10.4.17 - version: 10.5.4(postcss@8.5.19) + version: 10.5.4(postcss@8.5.25) docusaurus-lunr-search: specifier: ^3.3.2 - version: 3.6.0(@docusaurus/core@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.6.0(@docusaurus/core@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(react-dom@19.2.8(react@19.2.8))(react@19.2.8) lunr: specifier: ^2.3.9 version: 2.3.9 postcss: specifier: ^8.4.25 - version: 8.5.19 + version: 8.5.25 prism-react-renderer: specifier: ^2.3.1 - version: 2.4.1(react@19.2.7) + version: 2.4.1(react@19.2.8) raw-loader: specifier: ^4.0.2 - version: 4.0.2(webpack@5.108.4(postcss@8.5.19)) + version: 4.0.2(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) react: specifier: ^19.0.0 - version: 19.2.7 + version: 19.2.8 react-dom: specifier: ^19.0.0 - version: 19.2.7(react@19.2.7) + version: 19.2.8(react@19.2.8) tailwindcss: specifier: ^3.2.4 version: 3.4.19(tsx@4.23.1)(yaml@2.9.0) @@ -86,19 +86,19 @@ importers: devDependencies: '@docusaurus/module-type-aliases': specifier: ~3.10.0 - version: 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/tsconfig': specifier: ^3.10.0 version: 3.10.2 '@docusaurus/types': specifier: ^3.10.0 - version: 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@typescript/native': specifier: npm:typescript@^7.0.2 version: typescript@7.0.2 prettier: specifier: ^3.7.4 - version: 3.9.5 + version: 3.9.6 typescript: specifier: npm:@typescript/typescript6@^6.0.2 version: '@typescript/typescript6@6.0.2' @@ -107,7 +107,7 @@ importers: devDependencies: '@eslint/js': specifier: ^10.0.0 - version: 10.0.1(eslint@10.7.0(jiti@2.7.0)) + version: 10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@faker-js/faker': specifier: ^10.1.0 version: 10.5.0 @@ -122,7 +122,7 @@ importers: version: link:../packages/sdk '@playwright/test': specifier: ^1.44.1 - version: 1.61.1 + version: 1.62.0 '@socket.io/component-emitter': specifier: ^3.1.2 version: 3.1.2 @@ -149,16 +149,16 @@ importers: version: 17.4.2 eslint: specifier: ^10.0.0 - version: 10.7.0(jiti@2.7.0) + version: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.7.0(jiti@2.7.0)) + version: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0))(prettier@3.9.5) + version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.6) eslint-plugin-unicorn: specifier: ^72.0.0 - version: 72.0.0(eslint@10.7.0(jiti@2.7.0)) + version: 72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) exiftool-vendored: specifier: ^35.0.0 version: 35.21.0 @@ -176,31 +176,31 @@ importers: version: 7.0.0 prettier: specifier: ^3.7.4 - version: 3.9.5 + version: 3.9.6 prettier-plugin-organize-imports: specifier: ^4.0.0 - version: 4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.5) + version: 4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.6) sharp: specifier: ^0.34.5 version: 0.34.5 socket.io-client: specifier: ^4.7.4 - version: 4.8.3 + version: 4.8.3(supports-color@8.1.1) supertest: specifier: ^7.0.0 - version: 7.2.2 + version: 7.2.2(supports-color@8.1.1) typescript: specifier: npm:@typescript/typescript6@^6.0.2 version: '@typescript/typescript6@6.0.2' typescript-eslint: specifier: ^8.28.0 - version: 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) + version: 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) utimes: specifier: ^5.2.1 - version: 5.2.1 + version: 5.2.1(supports-color@8.1.1) vitest: specifier: ^4.0.0 - version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.10.6)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) packages/cli: dependencies: @@ -222,7 +222,7 @@ importers: devDependencies: '@eslint/js': specifier: ^10.0.0 - version: 10.0.1(eslint@10.7.0(jiti@2.7.0)) + version: 10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@immich/sdk': specifier: workspace:* version: link:../sdk @@ -261,16 +261,16 @@ importers: version: 15.0.0 eslint: specifier: ^10.0.0 - version: 10.7.0(jiti@2.7.0) + version: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.7.0(jiti@2.7.0)) + version: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0))(prettier@3.9.5) + version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.6) eslint-plugin-unicorn: specifier: ^72.0.0 - version: 72.0.0(eslint@10.7.0(jiti@2.7.0)) + version: 72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) globals: specifier: ^17.0.0 version: 17.7.0 @@ -279,22 +279,22 @@ importers: version: 5.5.0 prettier: specifier: ^3.7.4 - version: 3.9.5 + version: 3.9.6 prettier-plugin-organize-imports: specifier: ^4.0.0 - version: 4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.5) + version: 4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.6) typescript: specifier: npm:@typescript/typescript6@^6.0.2 version: '@typescript/typescript6@6.0.2' typescript-eslint: specifier: ^8.58.0 - version: 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) + version: 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) vite: specifier: ^8.0.0 - version: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + version: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) vitest: specifier: ^4.0.0 - version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.10.6)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) vitest-fetch-mock: specifier: ^0.4.0 version: 0.4.5(vitest@4.1.10) @@ -309,10 +309,10 @@ importers: version: 9.5.0 jose: specifier: ^6.0.0 - version: 6.2.3 + version: 6.2.4 oidc-provider: specifier: ^9.0.0 - version: 9.9.1 + version: 9.10.0(supports-color@8.1.1) tsx: specifier: ^4.20.6 version: 4.23.1 @@ -377,10 +377,10 @@ importers: version: 7.7.1 vite: specifier: ^8.0.16 - version: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + version: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) vitest: specifier: ^4.1.8 - version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.10.6)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) packages/sdk: dependencies: @@ -408,70 +408,70 @@ importers: version: 0.5.2 '@nestjs/bullmq': specifier: ^11.0.1 - version: 11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(bullmq@5.80.5) + version: 11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(bullmq@5.81.2(supports-color@8.1.1)) '@nestjs/common': specifier: ^11.0.4 - version: 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) '@nestjs/core': specifier: ^11.0.4 - version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nestjs/platform-express': specifier: ^11.0.4 - version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(supports-color@8.1.1) '@nestjs/platform-socket.io': specifier: ^11.0.4 - version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.28)(rxjs@7.8.2) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/websockets@11.1.28)(rxjs@7.8.2)(supports-color@8.1.1) '@nestjs/schedule': specifier: ^6.0.0 - version: 6.1.3(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28) + version: 6.1.3(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28) '@nestjs/swagger': specifier: ^11.4.2 - version: 11.4.5(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2) + version: 11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2) '@nestjs/websockets': specifier: ^11.0.4 - version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@opentelemetry/api': specifier: ^1.9.0 version: 1.9.1 '@opentelemetry/context-async-hooks': specifier: ^2.0.0 - version: 2.9.0(@opentelemetry/api@1.9.1) + version: 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/exporter-prometheus': - specifier: ^0.220.0 - version: 0.220.0(@opentelemetry/api@1.9.1) + specifier: ^0.221.0 + version: 0.221.0(@opentelemetry/api@1.9.1) '@opentelemetry/instrumentation-http': - specifier: ^0.220.0 - version: 0.220.0(@opentelemetry/api@1.9.1) + specifier: ^0.221.0 + version: 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/instrumentation-ioredis': - specifier: ^0.68.0 - version: 0.68.0(@opentelemetry/api@1.9.1) + specifier: ^0.69.0 + version: 0.69.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/instrumentation-nestjs-core': - specifier: ^0.66.0 - version: 0.66.0(@opentelemetry/api@1.9.1) + specifier: ^0.67.0 + version: 0.67.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/instrumentation-pg': - specifier: ^0.72.0 - version: 0.72.0(@opentelemetry/api@1.9.1) + specifier: ^0.73.0 + version: 0.73.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/resources': specifier: ^2.0.1 - version: 2.9.0(@opentelemetry/api@1.9.1) + version: 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/sdk-metrics': specifier: ^2.0.1 - version: 2.9.0(@opentelemetry/api@1.9.1) + version: 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/sdk-node': - specifier: ^0.220.0 - version: 0.220.0(@opentelemetry/api@1.9.1) + specifier: ^0.221.0 + version: 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/semantic-conventions': specifier: ^1.34.0 version: 1.43.0 '@react-email/components': specifier: ^1.0.0 - version: 1.0.12(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 1.0.12(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@react-email/render': specifier: ^2.0.0 - version: 2.1.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + version: 2.1.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@socket.io/redis-adapter': specifier: ^8.3.0 - version: 8.3.0(socket.io-adapter@2.5.7) + version: 8.3.0(socket.io-adapter@2.5.7(supports-color@8.1.1))(supports-color@8.1.1) archiver: specifier: ^7.0.0 version: 7.0.1 @@ -483,16 +483,16 @@ importers: version: 6.0.0 body-parser: specifier: ^2.2.0 - version: 2.3.0 + version: 2.3.0(supports-color@8.1.1) bullmq: specifier: ^5.51.0 - version: 5.80.5 + version: 5.81.2(supports-color@8.1.1) chokidar: specifier: ^4.0.3 version: 4.0.3 compression: specifier: ^1.8.0 - version: 1.8.1 + version: 1.8.1(supports-color@8.1.1) cookie: specifier: ^1.0.2 version: 1.1.1 @@ -507,7 +507,7 @@ importers: version: 35.21.0 express: specifier: ^5.1.0 - version: 5.2.1 + version: 5.2.1(supports-color@8.1.1) fast-glob: specifier: ^3.3.2 version: 3.3.3 @@ -531,10 +531,10 @@ importers: version: 7.14.0 ioredis: specifier: ^5.8.2 - version: 5.11.1 + version: 5.11.1(supports-color@8.1.1) jose: specifier: ^6.0.0 - version: 6.2.3 + version: 6.2.4 js-yaml: specifier: ^4.1.0 version: 4.3.0 @@ -561,19 +561,19 @@ importers: version: 2.2.0 nest-commander: specifier: ^3.16.0 - version: 3.20.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@types/inquirer@8.2.13)(@types/node@24.13.3)(@typescript/typescript6@6.0.2) + version: 3.20.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@types/inquirer@8.2.13)(@types/node@24.13.3)(@typescript/typescript6@6.0.2) nestjs-cls: specifier: ^6.0.0 - version: 6.2.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 6.2.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) nestjs-kysely: specifier: 3.1.2 - version: 3.1.2(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(kysely@0.28.17)(reflect-metadata@0.2.2) + version: 3.1.2(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(kysely@0.28.17)(reflect-metadata@0.2.2) nestjs-otel: specifier: ^8.0.0 - version: 8.1.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(rxjs@7.8.2) + version: 8.1.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(rxjs@7.8.2) nestjs-zod: specifier: ^5.3.0 - version: 5.4.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/swagger@11.4.5(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2))(rxjs@7.8.2)(zod@4.3.6) + version: 5.5.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/swagger@11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2))(rxjs@7.8.2)(zod@4.3.6) nodemailer: specifier: ^9.0.0 version: 9.0.3 @@ -591,13 +591,13 @@ importers: version: 3.4.9 react: specifier: ^19.0.0 - version: 19.2.7 + version: 19.2.8 react-dom: specifier: ^19.0.0 - version: 19.2.7(react@19.2.7) + version: 19.2.8(react@19.2.8) react-email: specifier: ^5.0.0 - version: 5.2.11 + version: 5.2.11(supports-color@8.1.1) reflect-metadata: specifier: ^0.2.0 version: 0.2.2 @@ -618,7 +618,7 @@ importers: version: 3.0.2 socket.io: specifier: ^4.8.1 - version: 4.8.3 + version: 4.8.3(supports-color@8.1.1) tailwindcss-preset-email: specifier: ^1.4.0 version: 1.4.1(tailwindcss@3.4.19(tsx@4.23.1)(yaml@2.9.0)) @@ -643,19 +643,19 @@ importers: devDependencies: '@eslint/js': specifier: ^10.0.0 - version: 10.0.1(eslint@10.7.0(jiti@2.7.0)) + version: 10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@nestjs/cli': specifier: ^11.0.2 - version: 11.0.24(@swc/core@1.15.43(@swc/helpers@0.5.23))(@types/node@24.13.3)(esbuild@0.28.1)(lightningcss@1.33.0)(prettier@3.9.5) + version: 11.0.24(@swc/core@1.15.46(@swc/helpers@0.5.23))(@types/node@24.13.3)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(prettier@3.9.6)(uglify-js@3.19.3) '@nestjs/schematics': specifier: ^11.0.0 - version: 11.1.0(@typescript/typescript6@6.0.2)(chokidar@4.0.3)(prettier@3.9.5) + version: 11.1.0(@typescript/typescript6@6.0.2)(chokidar@4.0.3)(prettier@3.9.6) '@nestjs/testing': specifier: ^11.0.4 - version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@nestjs/platform-express@11.1.28) + version: 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-express@11.1.28) '@swc/core': specifier: ^1.4.14 - version: 1.15.43(@swc/helpers@0.5.23) + version: 1.15.46(@swc/helpers@0.5.23) '@types/archiver': specifier: ^7.0.0 version: 7.0.0 @@ -730,19 +730,19 @@ importers: version: typescript@7.0.2 '@vitest/coverage-v8': specifier: ^4.0.0 - version: 4.1.10(vitest@3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.10.6)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 4.1.10(vitest@3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) eslint: specifier: ^10.0.0 - version: 10.7.0(jiti@2.7.0) + version: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.7.0(jiti@2.7.0)) + version: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0))(prettier@3.9.5) + version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.6) eslint-plugin-unicorn: specifier: ^72.0.0 - version: 72.0.0(eslint@10.7.0(jiti@2.7.0)) + version: 72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) globals: specifier: ^17.0.0 version: 17.7.0 @@ -754,37 +754,37 @@ importers: version: 7.0.0 prettier: specifier: ^3.7.4 - version: 3.9.5 + version: 3.9.6 prettier-plugin-organize-imports: specifier: ^4.0.0 - version: 4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.5) + version: 4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.6) sql-formatter: specifier: ^15.0.0 version: 15.8.2 supertest: specifier: ^7.1.0 - version: 7.2.2 + version: 7.2.2(supports-color@8.1.1) tailwindcss: specifier: ^3.4.0 version: 3.4.19(tsx@4.23.1)(yaml@2.9.0) testcontainers: specifier: ^12.0.0 - version: 12.0.4 + version: 12.0.4(supports-color@8.1.1) typescript: specifier: npm:@typescript/typescript6@^6.0.2 version: '@typescript/typescript6@6.0.2' typescript-eslint: specifier: ^8.28.0 - version: 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) + version: 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) unplugin-swc: specifier: ^1.4.5 - version: 1.5.9(@swc/core@1.15.43(@swc/helpers@0.5.23))(rollup@4.62.0) + version: 1.5.9(@swc/core@1.15.46(@swc/helpers@0.5.23))(rollup@4.62.0) vite-tsconfig-paths: specifier: ^6.0.0 - version: 6.1.1(@typescript/typescript6@6.0.2)(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 6.1.1(@typescript/typescript6@6.0.2)(supports-color@8.1.1)(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) vitest: specifier: ^3.0.0 - version: 3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.10.6)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + version: 3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) web: dependencies: @@ -799,7 +799,7 @@ importers: version: link:../packages/sdk '@immich/ui': specifier: ^0.83.0 - version: 0.83.0(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 0.83.0(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.65.0)) '@mapbox/mapbox-gl-rtl-text': specifier: 0.4.0 version: 0.4.0 @@ -811,22 +811,22 @@ importers: version: 2.2.0 '@photo-sphere-viewer/core': specifier: ^5.14.0 - version: 5.14.3 + version: 5.15.0 '@photo-sphere-viewer/equirectangular-video-adapter': specifier: ^5.14.0 - version: 5.14.3(@photo-sphere-viewer/core@5.14.3)(@photo-sphere-viewer/video-plugin@5.14.3(@photo-sphere-viewer/core@5.14.3)) + version: 5.15.0(@photo-sphere-viewer/core@5.15.0)(@photo-sphere-viewer/video-plugin@5.15.0(@photo-sphere-viewer/core@5.15.0)) '@photo-sphere-viewer/markers-plugin': specifier: ^5.14.0 - version: 5.14.3(@photo-sphere-viewer/core@5.14.3) + version: 5.15.0(@photo-sphere-viewer/core@5.15.0) '@photo-sphere-viewer/resolution-plugin': specifier: ^5.14.0 - version: 5.14.3(@photo-sphere-viewer/core@5.14.3)(@photo-sphere-viewer/settings-plugin@5.14.3(@photo-sphere-viewer/core@5.14.3)) + version: 5.15.0(@photo-sphere-viewer/core@5.15.0)(@photo-sphere-viewer/settings-plugin@5.15.0(@photo-sphere-viewer/core@5.15.0)) '@photo-sphere-viewer/settings-plugin': specifier: ^5.14.0 - version: 5.14.3(@photo-sphere-viewer/core@5.14.3) + version: 5.15.0(@photo-sphere-viewer/core@5.15.0) '@photo-sphere-viewer/video-plugin': specifier: ^5.14.0 - version: 5.14.3(@photo-sphere-viewer/core@5.14.3) + version: 5.15.0(@photo-sphere-viewer/core@5.15.0) '@types/geojson': specifier: ^7946.0.16 version: 7946.0.16 @@ -835,13 +835,13 @@ importers: version: 0.42.0 '@zoom-image/svelte': specifier: ^0.3.0 - version: 0.3.9(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 0.3.9(svelte@5.56.8(@typescript-eslint/types@8.65.0)) dom-to-image: specifier: ^2.6.0 version: 2.6.0 fabric: specifier: ^7.0.0 - version: 7.4.0 + version: 7.4.0(supports-color@8.1.1) geo-coordinates-parser: specifier: ^1.7.4 version: 1.7.4 @@ -853,7 +853,7 @@ importers: version: 4.7.9 happy-dom: specifier: ^20.0.0 - version: 20.10.6 + version: 20.11.1 hls-video-element: specifier: ^1.5.11 version: 1.5.11 @@ -877,7 +877,7 @@ importers: version: 5.24.0 media-chrome: specifier: ^4.19.0 - version: 4.19.2(react@19.2.7) + version: 4.19.2(react@19.2.8) pmtiles: specifier: ^4.3.0 version: 4.4.1 @@ -886,25 +886,25 @@ importers: version: 1.5.4 simple-icons: specifier: ^16.0.0 - version: 16.26.0 + version: 16.27.1 socket.io-client: specifier: ~4.8.0 - version: 4.8.3 + version: 4.8.3(supports-color@8.1.1) svelte-gestures: specifier: ^5.2.2 version: 5.2.2 svelte-i18n: specifier: ^4.0.1 - version: 4.0.1(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 4.0.1(svelte@5.56.8(@typescript-eslint/types@8.65.0)) svelte-jsoneditor: specifier: ^3.10.0 - version: 3.12.0(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 3.13.0(svelte@5.56.8(@typescript-eslint/types@8.65.0)) svelte-maplibre: specifier: ^1.2.5 - version: 1.3.0(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 1.3.0(svelte@5.56.8(@typescript-eslint/types@8.65.0)) svelte-persisted-store: specifier: ^0.12.0 - version: 0.12.0(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 0.12.0(svelte@5.56.8(@typescript-eslint/types@8.65.0)) tabbable: specifier: ^6.2.0 version: 6.5.0 @@ -913,7 +913,7 @@ importers: version: 3.6.0 tailwind-variants: specifier: ^3.2.2 - version: 3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.2) + version: 3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.3) thumbhash: specifier: ^0.1.1 version: 0.1.1 @@ -926,43 +926,43 @@ importers: devDependencies: '@eslint/js': specifier: ^10.0.0 - version: 10.0.1(eslint@10.7.0(jiti@2.7.0)) + version: 10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@faker-js/faker': specifier: ^10.0.0 version: 10.5.0 '@koddsson/eslint-plugin-tscompat': specifier: ^0.2.0 - version: 0.2.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) + version: 0.2.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) '@socket.io/component-emitter': specifier: ^3.1.0 version: 3.1.2 '@sveltejs/adapter-static': specifier: ^3.0.8 - version: 3.0.10(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))) + version: 3.0.10(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))) '@sveltejs/enhanced-img': specifier: ^0.11.0 - version: 0.11.0(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(rollup@4.62.0)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 0.11.0(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(rollup@4.62.0)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@sveltejs/kit': specifier: ^2.56.1 - version: 2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@sveltejs/vite-plugin-svelte': specifier: 7.2.0 - version: 7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@tailwindcss/vite': specifier: ^4.2.4 - version: 4.3.2(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 4.3.3(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@testing-library/jest-dom': specifier: ^6.4.2 version: 6.9.1 '@testing-library/svelte': specifier: ^5.2.8 - version: 5.4.2(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))(vitest@4.1.10) + version: 5.4.2(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))(vitest@4.1.10) '@testing-library/user-event': specifier: ^14.5.2 version: 14.6.1(@testing-library/dom@10.4.1) '@trivago/prettier-plugin-sort-imports': specifier: ^6.0.2 - version: 6.0.2(prettier-plugin-svelte@4.1.1(prettier@3.9.5)(svelte@5.56.5(@typescript-eslint/types@8.64.0)))(prettier@3.9.5)(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 6.0.2(prettier-plugin-svelte@4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.65.0)))(prettier@3.9.6)(supports-color@8.1.1)(svelte@5.56.8(@typescript-eslint/types@8.65.0)) '@types/chromecast-caf-sender': specifier: ^1.0.11 version: 1.0.11 @@ -992,22 +992,22 @@ importers: version: 17.4.2 eslint: specifier: ^10.2.1 - version: 10.7.0(jiti@2.7.0) + version: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.7.0(jiti@2.7.0)) + version: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-better-tailwindcss: specifier: ^4.5.0 - version: 4.6.1(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))(tailwindcss@4.3.2) + version: 4.7.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(tailwindcss@4.3.3) eslint-plugin-compat: specifier: ^7.0.0 - version: 7.0.2(eslint@10.7.0(jiti@2.7.0)) + version: 7.0.2(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-svelte: specifier: ^3.12.4 - version: 3.20.0(eslint@10.7.0(jiti@2.7.0))(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 3.22.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(svelte@5.56.8(@typescript-eslint/types@8.65.0)) eslint-plugin-unicorn: specifier: ^72.0.0 - version: 72.0.0(eslint@10.7.0(jiti@2.7.0)) + version: 72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) factory.ts: specifier: ^1.4.1 version: 1.4.2 @@ -1016,40 +1016,40 @@ importers: version: 17.7.0 prettier: specifier: ^3.7.4 - version: 3.9.5 + version: 3.9.6 prettier-plugin-sort-json: specifier: ^4.1.1 - version: 4.2.0(prettier@3.9.5) + version: 4.2.0(prettier@3.9.6) prettier-plugin-svelte: specifier: ^4.0.0 - version: 4.1.1(prettier@3.9.5)(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.65.0)) rollup-plugin-visualizer: specifier: ^7.0.0 version: 7.0.1(rolldown@1.1.5)(rollup@4.62.0) svelte: - specifier: 5.56.5 - version: 5.56.5(@typescript-eslint/types@8.64.0) + specifier: 5.56.8 + version: 5.56.8(@typescript-eslint/types@8.65.0) svelte-check: specifier: ^4.4.6 - version: 4.7.3(@typescript/typescript6@6.0.2)(picomatch@4.0.5)(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 4.7.3(@typescript/typescript6@6.0.2)(picomatch@4.0.5)(svelte@5.56.8(@typescript-eslint/types@8.65.0)) svelte-eslint-parser: specifier: ^1.3.3 - version: 1.8.0(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + version: 1.8.0(svelte@5.56.8(@typescript-eslint/types@8.65.0)) tailwindcss: specifier: ^4.2.4 - version: 4.3.2 + version: 4.3.3 typescript: specifier: npm:@typescript/typescript6@^6.0.2 version: '@typescript/typescript6@6.0.2' typescript-eslint: specifier: ^8.45.0 - version: 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) + version: 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) vite: specifier: ^8.0.0 - version: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + version: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) vitest: specifier: ^4.0.0 - version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.10.6)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + version: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) packages: @@ -1788,26 +1788,26 @@ packages: '@codemirror/autocomplete@6.20.3': resolution: {integrity: sha512-tlosUqb+3BbxCxZdu4tKeRghPFC+QM7q4X5YhKV2eCmPG+1r2F3f4AaSz5sCrFqUtX4Jh20VFTKecl16MgiV9g==} - '@codemirror/commands@6.10.3': - resolution: {integrity: sha512-JFRiqhKu+bvSkDLI+rUhJwSxQxYb759W5GBezE8Uc8mHLqC9aV/9aTC7yJSqCtB3F00pylrLCwnyS91Ap5ej4Q==} + '@codemirror/commands@6.10.4': + resolution: {integrity: sha512-Ryk9y9T0FFVF0cUGhAknveAyUOl/A1qReTFi+qPKtOh2Z9F4AUBz3XOrYD4ZEgZirdugVzHvd/2/Wcwy5OliTg==} '@codemirror/lang-json@6.0.2': resolution: {integrity: sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==} - '@codemirror/language@6.12.3': - resolution: {integrity: sha512-QwCZW6Tt1siP37Jet9Tb02Zs81TQt6qQrZR2H+eGMcFsL1zMrk2/b9CLC7/9ieP1fjIUMgviLWMmgiHoJrj+ZA==} + '@codemirror/language@6.12.4': + resolution: {integrity: sha512-1q4PaT+o6PbgpkJt4Q8Fv5XJxTy4FUZ4MWETtyiDw3J0Pyr9E2vqcKL+k9wcvjNTIsauxvE7OfmWj3FRPHQ76A==} '@codemirror/lint@6.9.7': resolution: {integrity: sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==} - '@codemirror/search@6.7.0': - resolution: {integrity: sha512-ZvGm99wc/s2cITtMT15LFdn8aH/aS+V+DqyGq/N5ZlV5vWtH+nILvC2nw0zX7ByNoHHDZ2IxxdW38O0tc5nVHg==} + '@codemirror/search@6.7.1': + resolution: {integrity: sha512-uMe5UO6PamJtSHrXhhHOzSX3ReWtiJrva6GnPMwSOrZtiExb5X5eExhr2OUZQVvdxPsKpY3Ro2mFbQadpPWmHA==} - '@codemirror/state@6.6.0': - resolution: {integrity: sha512-4nbvra5R5EtiCzr9BTHiTLc+MLXK2QGiAVYMyi8PkQd3SR+6ixar/Q/01Fa21TBIDOZXgeWV4WppsQolSreAPQ==} + '@codemirror/state@6.7.1': + resolution: {integrity: sha512-9QzNDgE4EYDnAHfrTlR2lwiPciiOymLtwKK+8yHQzCc7GXhAP9xdEbEJFy2IWB1j9UGUl9BsgMmTo/ImA02T7A==} - '@codemirror/view@6.43.1': - resolution: {integrity: sha512-+BIjw/AG3tDQ4pJgTLPYdAW25eDE66YsvM4LKyVPgGzVgZ4a9Wj1SRX8kPVKgBDdPt8oHtZ15F0qx7p0oOHdHw==} + '@codemirror/view@6.43.7': + resolution: {integrity: sha512-FZsExxkoxnAN+d9TgqXLg5g4A1oQwzX9WlkOT5i2PKkcW7xx3Bmu0vs90g6fo9Mpdsb/l96dnAraQ8932aO4/g==} '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} @@ -2795,8 +2795,8 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.9.1': - resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -2809,16 +2809,16 @@ packages: resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/config-helpers@0.6.0': - resolution: {integrity: sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==} + '@eslint/config-helpers@0.7.0': + resolution: {integrity: sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@eslint/core@1.2.1': resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/css-tree@4.0.4': - resolution: {integrity: sha512-nxMparyhqVWQvadx9x8dIfubfIPOE+X2b2waua8fzdnM9vdp9rgVtwEZlG0TmCwEUz/d/f40fzvO/eqBwdxz0A==} + '@eslint/css-tree@4.0.5': + resolution: {integrity: sha512-iPmijIAq4hlIJB86PYmY/fcZORHtjphSqICDbwuw32A/JmkhZQ/K/6TjHE03zqf3n5yABpVcbRAMG8Mi9ojy8g==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@eslint/js@10.0.1': @@ -2853,14 +2853,14 @@ packages: peerDependencies: commander: ^11.1.0 - '@floating-ui/core@1.7.5': - resolution: {integrity: sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==} + '@floating-ui/core@1.8.0': + resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==} - '@floating-ui/dom@1.7.6': - resolution: {integrity: sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==} + '@floating-ui/dom@1.8.0': + resolution: {integrity: sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==} - '@floating-ui/utils@0.2.11': - resolution: {integrity: sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==} + '@floating-ui/utils@0.2.12': + resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==} '@formatjs/ecma402-abstract@2.3.6': resolution: {integrity: sha512-HJnTFeRM2kVFVr5gr5kH1XP6K0JcJtE7Lzvtr3FS/so5f1kpsqqqxy5JF+FRaO6H2qmcMfAUIox7AJteieRtVw==} @@ -2886,16 +2886,16 @@ packages: '@formatjs/intl-localematcher@0.6.2': resolution: {integrity: sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==} - '@fortawesome/fontawesome-common-types@7.2.0': - resolution: {integrity: sha512-IpR0bER9FY25p+e7BmFH25MZKEwFHTfRAfhOyJubgiDnoJNsSvJ7nigLraHtp4VOG/cy8D7uiV0dLkHOne5Fhw==} + '@fortawesome/fontawesome-common-types@7.3.1': + resolution: {integrity: sha512-k0C0sdHmZtAo6dRDtd1Z/qcpyHbL0CKsjV8seMY/21xGhY5Wsv0XRmiI/xEEH4y2c9b1+jvgNs/3EqhV27yUEA==} engines: {node: '>=6'} - '@fortawesome/free-regular-svg-icons@7.2.0': - resolution: {integrity: sha512-iycmlN51EULlQ4D/UU9WZnHiN0CvjJ2TuuCrAh+1MVdzD+4ViKYH2deNAll4XAAYlZa8WAefHR5taSK8hYmSMw==} + '@fortawesome/free-regular-svg-icons@7.3.1': + resolution: {integrity: sha512-q1EsmL7Q8DDnkRBUjSvrxbq7c9oVwwVjCn/xa5apKmdp65YSgzUg2y0Ltnd5aDbT6GdAQQdXql5Ha90ArqIReQ==} engines: {node: '>=6'} - '@fortawesome/free-solid-svg-icons@7.2.0': - resolution: {integrity: sha512-YTVITFGN0/24PxzXrwqCgnyd7njDuzp5ZvaCx5nq/jg55kUYd94Nj8UTchBdBofi/L0nwRfjGOg0E41d2u9T1w==} + '@fortawesome/free-solid-svg-icons@7.3.1': + resolution: {integrity: sha512-v0BLa0eqg7ubvVWeNSHVBs8fWH/GJicERZoJaxJ3FE/lj67VSqzoMg9pzfZVOfLMX10y0pGwQAuxoRVVH2patg==} engines: {node: '>=6'} '@golevelup/nestjs-discovery@5.0.0': @@ -3517,8 +3517,8 @@ packages: '@maplibre/vt-pbf@4.3.2': resolution: {integrity: sha512-j6p0AdjvAR19Z3XaCysle7A4ZSo08tYOzxD0Y9NQylwPAkwJJeYub5b2eVucdeDh7erhv69DahoLOevDRERRUw==} - '@marijn/find-cluster-break@1.0.2': - resolution: {integrity: sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==} + '@marijn/find-cluster-break@1.0.3': + resolution: {integrity: sha512-FY+MKLBoTsLNJF/eLWaOsXGdz6uh3Iu1axjPf6TUq92IYumcTcXWHoS747JARLkcdlJ/Waiaxc5wQfFO8jC6NA==} '@mdi/js@7.4.47': resolution: {integrity: sha512-KPnNOtm5i2pMabqZxpUz7iQf+mfrYZyKCZ8QNz85czgEt7cuHcGorWfdzUMWYA0SD+a6Hn4FmJ+YhzzzjkTZrQ==} @@ -3684,10 +3684,10 @@ packages: prettier: optional: true - '@nestjs/swagger@11.4.5': - resolution: {integrity: sha512-lvndlJmWBVDOUT0uEtLi6sSpW1syK2/nbAlHBhiELBORMpJGe9+EiWAT9qHtB10jW91L2Jmlwkr0/lttsYZrig==} + '@nestjs/swagger@11.4.6': + resolution: {integrity: sha512-Le136h2WC7HGsd70+WyK1qrm+Zq7kFxBLkYC1JgAVqNRCt8kNh7bMF7Qkn65D5j2t/aks0+VbWmUVlYIwPrs3A==} peerDependencies: - '@fastify/static': ^8.0.0 || ^9.0.0 + '@fastify/static': ^8.0.0 || ^9.0.0 || ^10.0.0 '@nestjs/common': ^11.0.1 '@nestjs/core': ^11.0.1 class-transformer: '*' @@ -3754,94 +3754,94 @@ packages: '@oazapfts/runtime@1.2.0': resolution: {integrity: sha512-fi7dp7dNayyh/vzqhf0ZdoPfC7tJvYfjaE8MBL1yR+iIsH7cFoqHt+DV70VU49OMCqLc7wQa+yVJcSmIRnV4wA==} - '@opentelemetry/api-logs@0.220.0': - resolution: {integrity: sha512-CmVa4ImJ+ynfrPMNaAXHET6Bhb44SwzmfyVJFq9ni2jgXJR/l7C6gfVFddNmHP+ZOkP9cf4f9DBe68qVLTHc9w==} + '@opentelemetry/api-logs@0.221.0': + resolution: {integrity: sha512-OlanaW1vv7ufTqQ3/fPLI4arGt5ZoM+P8abOMki6uEYnpRazepSWDwDnnw+la7kE26SHVC18//SMccrDvLKOXQ==} engines: {node: '>=8.0.0'} '@opentelemetry/api@1.9.1': resolution: {integrity: sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==} engines: {node: '>=8.0.0'} - '@opentelemetry/configuration@0.220.0': - resolution: {integrity: sha512-glfIVKnZevRin8fY/9uES/mhRtMT1lGINLHc9MIo5fTQZXswEEHamJtgjv4MTtzgnhHGC92mIS/0lzAUZMyE0w==} + '@opentelemetry/configuration@0.221.0': + resolution: {integrity: sha512-uE9y56Zdi9Gt/RdxYnVOo3YmFZkKJJMA0gqtBe8wh8gdtF5Asqe+Oh/TWiDtFb1s+31jNY4CWgnfIB1KOITfFA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.9.0 - '@opentelemetry/context-async-hooks@2.9.0': - resolution: {integrity: sha512-OQ0vzvbZBiUhjqLnUaoNfYmP8553Crr3aggB4y0ZUi815mZ7idpdJXQmoKdeBKJelYttoBlLSSHubmyw3wvX4w==} + '@opentelemetry/context-async-hooks@2.10.0': + resolution: {integrity: sha512-bvyMcgLEkozzSzpEEEo1OMoeQ97bxj6Qs2uN3mPrSdDvObMI1myffD/BPqcLlzZO9//d1SqQA/WPw7Cz2AiqhA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/core@2.9.0': - resolution: {integrity: sha512-m2nckMT80NnmjTYSPjJQObBJ+8dgkoajEOUbznL8AHZ3T3yHRk2P7gI1PhEBc1+lOnrYE9UWrWHqJDsmqjmNbw==} + '@opentelemetry/core@2.10.0': + resolution: {integrity: sha512-/wNZ8twnEQQA4HoHu22+vcsdru6pWPWxW+7w+FlxT6Id7PE/WIbZmVKkte+PF72e0F2dnImFeHD2syyE1Mw6MQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/exporter-logs-otlp-grpc@0.220.0': - resolution: {integrity: sha512-s0sRPCSlXYqlgObOpCftomJllp3LfUL9FobQ5csg2172ydVhSEnu1ptpsVBJadazs5nUNp7vDuLE03FAFWTLOQ==} + '@opentelemetry/exporter-logs-otlp-grpc@0.221.0': + resolution: {integrity: sha512-txG1G0IrYSsKKMeiWZfj/i5cQmWB+h+hf3HzPpF3RqZVwp+iQQEIsv8Vtmzy6RWVdHdJZfygmVrBI39YTBvWcw==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-logs-otlp-http@0.220.0': - resolution: {integrity: sha512-8186thl+pTw64iz/qEEen5oJZoZ/gO73XruChdaGlYdWOdBIQ42r+vHLf6a7vIDqTD4b8ZOoMlyxptanECaI9A==} + '@opentelemetry/exporter-logs-otlp-http@0.221.0': + resolution: {integrity: sha512-nKXkr4Tomi6fjYVOf+ytcW3dZAVr4v4Bv5gsT6dr2gvpUPJpKgHB4XbMufMsPotRE3g0XH2GwVVCkN2w6SON+Q==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-logs-otlp-proto@0.220.0': - resolution: {integrity: sha512-8LZAxdJ0ENDAFwr4j0oY35mHBltiSzvlhdQAPGiC7p9VnxtuSq4SW1gfBAdW6t6hiQG6OwUl8w7KHaOdJPKHWg==} + '@opentelemetry/exporter-logs-otlp-proto@0.221.0': + resolution: {integrity: sha512-AH6EY+47gXFaWYgG3hfeOneGiE9xIZGtDBk+9g0sM8NZWzsQhhmqPbQQXJzS7pyCh5jRRr2nYNXVrkCmoojRvQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-metrics-otlp-grpc@0.220.0': - resolution: {integrity: sha512-U128izvJfX/dW9jRGP0gIfadR1Hg7ft3UEGIeRxLFK70m2BWw6AtNCOnsUygpw2zCgR/ygdWbGpcL6TmhW0ZGw==} + '@opentelemetry/exporter-metrics-otlp-grpc@0.221.0': + resolution: {integrity: sha512-KOgCtO15FC6C1T/xOqBcr7EyUs7B+7yomGNb5Y97d3s38rPbCCk5sewkmE2b0/itOkQ/PptX8CLlD+kn2mEtTg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-metrics-otlp-http@0.220.0': - resolution: {integrity: sha512-Yqt3RBw/bRVncaE9qIIhk4WfjbAQqXuP9FgAaU+IKPndnLEp/cUqZlSC324+bpmduRz7DoTjig8Ub0PeILWXUA==} + '@opentelemetry/exporter-metrics-otlp-http@0.221.0': + resolution: {integrity: sha512-sRfCKbOzgy8xZQV2as0RzIZlnCmCseCKZGLfRcrpo2CBngJDr+rPtX0zkG0+oUCV5kfQPUoW3W3C96Ag3Y/Clg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-metrics-otlp-proto@0.220.0': - resolution: {integrity: sha512-lyO+IQBdSvqHN/ZOW/OzrSWemtfD+HgWngn+HBNLhjy0YrCQQTz0OE/kSekH2Pl340dn9DWzhqHdz5Eftr+HLA==} + '@opentelemetry/exporter-metrics-otlp-proto@0.221.0': + resolution: {integrity: sha512-YMF4LveY2I3yhw61rn6nmC9FE8U24IZHPeKU1Duc5+sbwjMd8FwZAwba318ImdThCg/HuVQvhm2y6bfgNPnfYg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-prometheus@0.220.0': - resolution: {integrity: sha512-JZD5DL/NBpVd2BHefvYosm3G40UZ/KzExLv5tc0eZe0CtrsHHtcOk3YPUxR2EINmUeBf8+w5UReTV8fFPn95lA==} + '@opentelemetry/exporter-prometheus@0.221.0': + resolution: {integrity: sha512-kW79a20qWESIuAdDrxzg9WKM98twV/NBWBFRAH57ap/+ssZhiCo0hckzKT0zpuwR/gSHrFAQhJL0bYDrnEM34g==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-grpc@0.220.0': - resolution: {integrity: sha512-bv1xmNhmNwIM6MdUBw4yYuJeVcEViVLk3uD69vOQMwueHBnfyl/u0HnBlB1FNY/Te0UOzJzvcbyR8wN6b+iGbA==} + '@opentelemetry/exporter-trace-otlp-grpc@0.221.0': + resolution: {integrity: sha512-zXminlZedtq9LvOW64CnNkOqk15zV75k8JgtdTuWFge6+jk2m4GmAUm6L2eIiG1o2a2bZxXw2PDrszm+bps0IA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-http@0.220.0': - resolution: {integrity: sha512-/+ExB3lRkf+erv4PnoywyL7RHKITidxtUpUTS55k7OQ0dB42S7gEF1gry7swb9MSm1hYLUhJg4QQh9W8SpwwqA==} + '@opentelemetry/exporter-trace-otlp-http@0.221.0': + resolution: {integrity: sha512-AySXiKoC+meiWm6zdVj5T2LnPDZuatveBby1cMOeQteIWsYXAUxs8Sru13G2pVSPrUXz6vF+og7QVBX6GdC/oQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-proto@0.220.0': - resolution: {integrity: sha512-voTAD8XgJxlK7zLkXh8EzMB09zrQr3tyY/BsnDTlDiQU/UdK58MZ63A3mUjdEDrxMjCVmBHU3WQJhRmQe+Dvzg==} + '@opentelemetry/exporter-trace-otlp-proto@0.221.0': + resolution: {integrity: sha512-Z9i2T7vgZbWe9rSLYxXVIbeW+XyzUq4rZanW3ZyVNwVDqCsh0EJKUgBWWQ0CZfeuUA+RQPzKgJQHMuWAUnKqXw==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-zipkin@2.9.0': - resolution: {integrity: sha512-RwINoce2BH8T4obT5pMcAla2sWma1YZvYuaktWmTluQ0PkQdvv5D060rWI1+kawX+J2qBRcMbwrZJJNcMJUauQ==} + '@opentelemetry/exporter-zipkin@2.10.0': + resolution: {integrity: sha512-7gsvgf0UDoJ4l9ObrwBmz5G/ZogiPk+lq+g5GpLp24YQF/vPM/BSsnOfcLnfinast5ASUgLo78uSC/ObjlnXgg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.0.0 @@ -3852,62 +3852,62 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-http@0.220.0': - resolution: {integrity: sha512-Szt4dO2Boz2CDr38DaSw/lnqwhwKl+IAdgNGEGgSm2Anb+fwPtIAGmIwkhsLLN69QQZQE96JxjMKYY4rlRkYKw==} + '@opentelemetry/instrumentation-http@0.221.0': + resolution: {integrity: sha512-oIP91CPIANuYr09tGFElPFKAh6JUar+awJf1kBRYlaeo9b0gDwZHEB2zBfFlvdNFHm0wAVutMZODVi5smKT30g==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-ioredis@0.68.0': - resolution: {integrity: sha512-M2MWPoKiMlNWzmW7+AwEwiFpTJQ7bhKpZuo9L3MS/z/KFm2yXY6B43IprAVyiszLFg8/JsF39t8b8wkGpxip2g==} + '@opentelemetry/instrumentation-ioredis@0.69.0': + resolution: {integrity: sha512-I9sZtxXWZ1tRXtRNTEVxpokGtXy6RL1SZhtPVh7zxH78t8ar71V5Dx4bnQiUjKTDzItpC73krD8c0/cEWA9oLg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-nestjs-core@0.66.0': - resolution: {integrity: sha512-ZCzcTWXwlmQsLWGARbUz5fCLpYABoo5A/3PuV5+iICV3pmKWT0rRdKDevkRo0prbzJVh9oEyuT1idxI8ipDqXg==} + '@opentelemetry/instrumentation-nestjs-core@0.67.0': + resolution: {integrity: sha512-lXb7pjobd2i/9Gmihf9wrOM0MgnDYBxOJq7uWEhZOqULodNFLyPCRUnWxSIbPQdUzlU36QtHjuAeaEBUJnqXkA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-pg@0.72.0': - resolution: {integrity: sha512-p9xrFc/6R8t6Y293sTYLZ83LnzZo/qY0bBPA4xabdQt0Qjt8i1SlYFsIeGY2Jmf5WcESNUdjQB3NxWnt5Ox7zw==} + '@opentelemetry/instrumentation-pg@0.73.0': + resolution: {integrity: sha512-yf3tBVwLHB9cZNNPSToNrthx36ouPe4FctFxy7ya6vSJ6gaiKjNfA/IgFFeuBpZflEQhy6aesPqzZo8ZjFkvNg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation@0.220.0': - resolution: {integrity: sha512-xQx3E2WxP1mDvKzxLxX+CTCtNLa560YJZ3087qYHerl2YmiKpv7AH+dAy7vmx+eVrZ5BwhfWUAVoKOoxCNHcpw==} + '@opentelemetry/instrumentation@0.221.0': + resolution: {integrity: sha512-cCk80Z/iRDf/5gfsKMB4f74LqVA5yKETB/9ojPzVW/6/f70iu89nJvGxsFCxx4XfSohaOofkU19kiYm84AiAlw==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-exporter-base@0.220.0': - resolution: {integrity: sha512-CXYo8UD5Mn9YbgebO2EL4wejtA+gxLmLiu6HCk2KH2BR7XhFN6/6p1UlCb23DYCjeYkndevLHuejCCN1yx4+OQ==} + '@opentelemetry/otlp-exporter-base@0.221.0': + resolution: {integrity: sha512-UFPIq80OH3Ns/oPFHRj14d4DTOxUo+MUFU8hUiCq5jTqFhdeJnfVSANHT+xp92409cA+oxzvlZCe6NM1wvCuBA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-grpc-exporter-base@0.220.0': - resolution: {integrity: sha512-/eIkBPMBTIvM3x/0mDX4aJeSkYifYClnBPr68PL1h5LV4VQv4+SV6CGrpiZ4fIWDnobVmhTWCm1J/QRdAWUfvA==} + '@opentelemetry/otlp-grpc-exporter-base@0.221.0': + resolution: {integrity: sha512-rQDmNgyiGCTrescjnzH2ntVyUKVIq6I2UjuK8+stT/Xg0ZOT71FVJqwjFdspQl6Yol/Yqsut9bDo+ame8oTmDQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-transformer@0.220.0': - resolution: {integrity: sha512-lXGrv7KXZ0gNH9SVNUaa6vv6phVYGvJxfXAlMbzbakiXru75f5MZl8Z7oqiMMQD77riVHJCFlQvbZs/VVN2/4A==} + '@opentelemetry/otlp-transformer@0.221.0': + resolution: {integrity: sha512-lg6lkOU08Az23jVcn/0Els9HP+V8PnR4Km6p0KgpTggS0n/WuhnmY64rSh83Of9iR9nD+dpWr6adlcX8KzAwjg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/propagator-b3@2.9.0': - resolution: {integrity: sha512-WrOT1WsOUG+B7hstD2RYoMPIOK76G8E9AQHhMjUvrQaGx/oA7rPWQvvr1Rqv7+yy4R0ZMVwWLC4vW2xnkgWPAQ==} + '@opentelemetry/propagator-b3@2.10.0': + resolution: {integrity: sha512-GnA5B24H+1w8BO21J0q+IWNB0z1v+AGbcquTdIt/dufibhnhgxaA8YKvz0I3akRZhB1jHT+/tlzK+qlAjEDybQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/propagator-jaeger@2.9.0': - resolution: {integrity: sha512-4mYGty27rYvSM0jtp1ZUOqd3LfVRCYg9H5G9OFzSx5HViYToU21MFhWfco7x1HwXr7ER8yGOiCIHZUwjPksc0Q==} + '@opentelemetry/propagator-jaeger@2.10.0': + resolution: {integrity: sha512-yw/IX8DL470dSMZJoE82ScfYGp7JWZ/G8kFJo35ZILUVTB2jFPTOaioN+8s09pH0RHsWNhweVZb+ZnjJJpCChg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' @@ -3916,44 +3916,44 @@ packages: resolution: {integrity: sha512-VCghU1JYs/4gP6Gqf/xro9MEsZ7LrMv2uONVsaESKL38ZOB9BqnI98FfS23wjMnHlpuE+TTaWSoAVNpTwYXzjw==} engines: {node: ^18.19.0 || >=20.6.0} - '@opentelemetry/resources@2.9.0': - resolution: {integrity: sha512-jyA5MBLQ+Dkl3+JsZkUoUvL7yHvU64kLsvpXKarWm6347Sl1t1bXFTFykUePNpT5WH5pm9a2Qtt03iIYQhZ1Fg==} + '@opentelemetry/resources@2.10.0': + resolution: {integrity: sha512-q6MMm2zhggzsHVNbabYwut+a6nbuQQe3URUoxaojM/8K1IBfwwPzvxIjNi2/lI1TFe+fMHMW9MWhrtDLEXEnkA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-logs@0.220.0': - resolution: {integrity: sha512-WywcTkQtv2iNmt+6y5Kcd4rzvx9bLVsBa2Nwcmg01IUaBTkTow3W4d9KE5vNBpEDtb9tp21WcRBY/lANRrApYA==} + '@opentelemetry/sdk-logs@0.221.0': + resolution: {integrity: sha512-FaDcazjyMp7TZZZAsqbo4IkovP0UegoCu0EBkiNt+qCqvUf7FPAsfcrZ3+ZEkKgXZ/jHafop+JoGPDk3A0SmLg==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' - '@opentelemetry/sdk-metrics@2.9.0': - resolution: {integrity: sha512-Xx8RGS4H5XEBl01WuCreMIpiah9cCXMbSkeuIePPdD2cUpq/vUzYmj8E/MK1OsbOc93FuAD4jfn2WOacKwLn7Q==} + '@opentelemetry/sdk-metrics@2.10.0': + resolution: {integrity: sha512-t6r1VSvXNtSDnPXU1FbZeetJb7yyovHmgu0wRSoftxtE0g2rSNhQZQUy69sRUCL+iioJpX8SN/S6wq6ZtvLySQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.9.0 <1.10.0' - '@opentelemetry/sdk-node@0.220.0': - resolution: {integrity: sha512-wHtGyHhSKHNH3fym33xRu4Ef/HXTFvX8eQ42xdQdEO9LYx9Y2qNyBDJytyqVlvmo6abWZlNYTUthuAGUMYqYnQ==} + '@opentelemetry/sdk-node@0.221.0': + resolution: {integrity: sha512-UbYuvtBrQQB5Prsh9KOKy4kxzexFxfMs5MkteHeWMoswsEB7kiNhyUVkAOFW/qsEzNHtrkgyghrD2ilZJa+5YA==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-trace-base@2.9.0': - resolution: {integrity: sha512-cp9zmTl62R8PJrpvFcmc8N2JQU/xfa0S+61q511Nji+QxCfZ8Ifvg7H27G8cANe4crg4RTrWsVvanHiXjSp6ag==} + '@opentelemetry/sdk-trace-base@2.10.0': + resolution: {integrity: sha512-GuYQQT7QD2EeO8lcZLRQzcbOyhqAzL+6WWTKTU9mSUBYBazkEDl+VrQcXQhbB08OWM9anD1aHleVadzulpOaUQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-trace-node@2.9.0': - resolution: {integrity: sha512-ec9a7ps37huy5itYk0MalaZdSLlM6AXWp/FhtEjgMpp5leEGojBDvAl/UWttQnkMZOvFHKzRESn8TD3yKTF5nQ==} + '@opentelemetry/sdk-trace-node@2.10.0': + resolution: {integrity: sha512-GZK/G6oZyBLGlH1pUgeDch7D91KoHd2uotUGIkWCPi9GI5T9X0p4L7nNAMDR1BQjkRYoDqo+ddfVx9t5Uhys+Q==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/sdk-trace@2.9.0': - resolution: {integrity: sha512-sGA19HvtrrSKYsseHphluH6j3p6Xa3fqc7c7y8f/7mYWejc1lyDFcpSdD1kYa50HCLUeEo4zA5bW0pniaPszuw==} + '@opentelemetry/sdk-trace@2.10.0': + resolution: {integrity: sha512-MfQGq3GRmTh5fM/y+OjaO0vj6+luCB1XO2gfXCalKCfgKw0eHL++sm75DNweC6ohlp+aFvACqeE0fYayqdRaoQ==} engines: {node: ^18.19.0 || >=20.6.0} peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' @@ -4099,35 +4099,35 @@ packages: resolution: {integrity: sha512-C2Xj8FZ0uHWeCXXqX5B4/gVFQmtSkiuOolzAgutjTfseNOHT3pUjljDZsTSxXFGgio54bCzVFqmEOUrIVk8RDA==} engines: {node: '>=20.0.0'} - '@photo-sphere-viewer/core@5.14.3': - resolution: {integrity: sha512-gSDzM1fuVfWQiDf8Y4AgI+un/wsKmeFO7cY4IFEbjhD1BTXUviSL8GuCXABNfPK2EThZLJqpOXxrbYAhblJrfQ==} + '@photo-sphere-viewer/core@5.15.0': + resolution: {integrity: sha512-Mf72l3R8iBf+Im5duv7IVkX3uiKU1BT6bzzXmdE43KahQgNftt9pYKqTzN1YjaYLAzWDBCFZj/bEK1dIZXk9Gg==} - '@photo-sphere-viewer/equirectangular-video-adapter@5.14.3': - resolution: {integrity: sha512-jgdFMAGkVgtybq0d+zP3Qbu8SNw1Makw/EOpqyeo1klHK+S5JBRp1ibtq/9NRPtYTlf3Ral03iYR6iDgJuxJbg==} + '@photo-sphere-viewer/equirectangular-video-adapter@5.15.0': + resolution: {integrity: sha512-Gro1wUA5qTla71uSeGlQFr9BenNXrI9Xee4a+dveafqrZJ35/n+nDhxrc8I4osykyvC6Foc0qgksAsaNsMKX/w==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.3 - '@photo-sphere-viewer/video-plugin': 5.14.3 + '@photo-sphere-viewer/core': 5.15.0 + '@photo-sphere-viewer/video-plugin': 5.15.0 - '@photo-sphere-viewer/markers-plugin@5.14.3': - resolution: {integrity: sha512-OAXHfXR2riaBwS8+OhqcAT2KZ3ch1QI9mJaBq6R9Abs+hcZ5f6QbWJ0IS9SFIGcdHFgBbz6+ea1FcwA9V3zx4g==} + '@photo-sphere-viewer/markers-plugin@5.15.0': + resolution: {integrity: sha512-r1Kv4BkvcOf+77QU7k0pHzZ3O0IrX+ff7arttmb0D81HQHRl/fUcE+tXu+mGDj9B1zuSi1LcvKOsUI9m96owNw==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.3 + '@photo-sphere-viewer/core': 5.15.0 - '@photo-sphere-viewer/resolution-plugin@5.14.3': - resolution: {integrity: sha512-3W4DMhWcYjZdc65NjjLk49Nr7FTczCeRu6DVApfaN/OXfKW6IEFlWKJyrLpXUdQaNB8LPk6GuD0MFNGp8SHAwQ==} + '@photo-sphere-viewer/resolution-plugin@5.15.0': + resolution: {integrity: sha512-8Rm9r9WJX5m8N0Q7ezUEHUgxWybroj6HhfaksINUm7o8WegqZ+Pp2izEEoXI57kkjfudYOp7abrwA/J3I+QRrA==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.3 - '@photo-sphere-viewer/settings-plugin': 5.14.3 + '@photo-sphere-viewer/core': 5.15.0 + '@photo-sphere-viewer/settings-plugin': 5.15.0 - '@photo-sphere-viewer/settings-plugin@5.14.3': - resolution: {integrity: sha512-EMaBRXIBIfP+jTOQSvkN00Bhh+ia+G8Bcxak0ydoGb5yaDg9w86Q7/NdK0NNpwXFqcQIAaoDzyX6UEi8Udic5g==} + '@photo-sphere-viewer/settings-plugin@5.15.0': + resolution: {integrity: sha512-xZot+fT5R+Jy7D/QEVoylIMg/R+l/iSBykQ1v8wqGkSrUqJdVkNv3w3ksycb9BYFt/78P8HU7AGvJgIF6J3EFQ==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.3 + '@photo-sphere-viewer/core': 5.15.0 - '@photo-sphere-viewer/video-plugin@5.14.3': - resolution: {integrity: sha512-yMUd3JG0ROJpJkPXJbdFiIkz+m6lDMRrIeLm/bwXvaX+Q1uSgyX0ipIkJrQnAtdk/IU5fdyqBwfn9ExlQ27c2A==} + '@photo-sphere-viewer/video-plugin@5.15.0': + resolution: {integrity: sha512-RG70vRu+suV7QT1WbnxVknm8KVU26wCZx4NUofFAENYSvyldlRxmVK3XqCh1WChWhcjrXqj3woz4vnzrykVOzQ==} peerDependencies: - '@photo-sphere-viewer/core': 5.14.3 + '@photo-sphere-viewer/core': 5.15.0 '@photostructure/tz-lookup@11.5.0': resolution: {integrity: sha512-0DVFriinZ7TeOnm9ytXeSL3NMFU87ZqMjgbPNkd8LgHFLcPg1BDyM1eewFYs+pPM+62S4fSP9Mtgijmn+6y95w==} @@ -4140,9 +4140,9 @@ packages: resolution: {integrity: sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==} engines: {node: ^14.18.0 || >=16.0.0} - '@playwright/test@1.61.1': - resolution: {integrity: sha512-8nKv6+0RJSL9FE4jYOEGXnPeM/Hg12qZpmqzZjRh3qM0Y7c3z1mrOTfFLids72RDQYVh9WpLEfR5WdpNX4fkig==} - engines: {node: '>=18'} + '@playwright/test@1.62.0': + resolution: {integrity: sha512-9zOJ6ZQRAena31MpOH9VSzIz8Ou3YJ/wtY/eQm5T2uhfhG7/U3COrMS8xOtUrZrp9OgdmzEnIYODye3nY1VqzA==} + engines: {node: '>=20'} hasBin: true '@pnpm/config.env-replace@1.1.0': @@ -4692,8 +4692,8 @@ packages: svelte: ^5.0.0 vite: ^6.3.0 || >=7.0.0 - '@sveltejs/kit@2.69.3': - resolution: {integrity: sha512-cphwqMRcE19/9VkrIPr5qZhQ0SptSSDfDzRUpYHu9OJDFGuYBFyJzK+KQA27wB4YG32O/yF2QjBkDmTyo0vtCw==} + '@sveltejs/kit@2.70.1': + resolution: {integrity: sha512-nY9SPHGOZro3doud9vZXDBwl9tCZIouuJztjgSHs6PAIrv9M/z5O7eOhPV5xU7CgVHA976Jwu3BA1hIFvXztkA==} engines: {node: '>=18.13'} hasBin: true peerDependencies: @@ -4797,86 +4797,86 @@ packages: resolution: {integrity: sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==} engines: {node: '>=14'} - '@swc/core-darwin-arm64@1.15.43': - resolution: {integrity: sha512-v1aVuvXdo/BHxJzco9V2xpHrvwWmhfS8t6gziY5wJxd+Z2h8AeJRnAwPD8itCDaGXVBwJ/CaKfxEzTkG0Va0OA==} + '@swc/core-darwin-arm64@1.15.46': + resolution: {integrity: sha512-IsISIT22EfktVJrlvIpnAxG2u/A9aob9l99HMlx80x72WlFmFPk1V3UhkEzx86eJP8hw049KTFv/RISho2cq2Q==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.15.43': - resolution: {integrity: sha512-lp3d4Lamc8dt5huYdGLSR+9hLxmfr1jb0l+4XXG2zPqZwYWRN9R0U2qYoTrggiU2RWW0oV9VbWM3kBnqIc2kdQ==} + '@swc/core-darwin-x64@1.15.46': + resolution: {integrity: sha512-4Tj4ppVIPCmUMpmGFiGtyEriwLyJ+yi/US4WfBrP/ok8COGddDZXLEzQETnKyK46mjvr1v0jevrS23zjoff7vA==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.15.43': - resolution: {integrity: sha512-JWTQQELtsG5GgphDrr/XqqmM2pDN3cZqbMS0Mrg+iTiXL3F74sn/S2IyYE/5u4h2KLkTf9qQ7dXyxsbx7YzkeA==} + '@swc/core-linux-arm-gnueabihf@1.15.46': + resolution: {integrity: sha512-i8tUGnNjyOgMmfmgFSg4aeJLQoFyfpIHK5FjpQAwpRyQIqEUB2w1e8zIDQzY1WhOxx8NoS1S5iUL813Un4Sf5A==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.15.43': - resolution: {integrity: sha512-B4otJRdPWIsmiSBf0uG7Z/+vMWmkufjz5MmYxubwKuZazDW14Zd3symga1N62QR4RT+kEFeHEgsXfZGyn/w0hw==} + '@swc/core-linux-arm64-gnu@1.15.46': + resolution: {integrity: sha512-c0OnhqzdhfOvv6qhNCcByepB+sNYOGZyhtr2Qa6ZCHvAWTYhSRw4j/u92Stue9PbZ/6q74b9nHzi76+kVzqQHQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] libc: [glibc] - '@swc/core-linux-arm64-musl@1.15.43': - resolution: {integrity: sha512-6zB6OnpViBxYy4tgY3v2i6AZY9fwkcHZ032UOwtwUuW1d19sdT07qF0kZe6/3UR1tUaK6jjg2rmVcUIBCEYVjQ==} + '@swc/core-linux-arm64-musl@1.15.46': + resolution: {integrity: sha512-imyRpNEcUzFQFV2LE4jL68ErvmKEuZCbvZru77iQREunJ+bR4i658cupTgtG1mLYM3F1Tzy3Sb9xYb02KghWTg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] libc: [musl] - '@swc/core-linux-ppc64-gnu@1.15.43': - resolution: {integrity: sha512-coxE1ZWdB3uSDVNoEtYNrRi/1epvckZx9cTJ8ICUxTMTxGk+yvQ/Twacp3ruZSaMPGCriUjP86C37VhaT6nyRg==} + '@swc/core-linux-ppc64-gnu@1.15.46': + resolution: {integrity: sha512-ctEfcl/HcUeomK33cbySiHZm98GEDIxTm1EkpBsYCiHxElYBzvTXVeuQT2YwbUXn9XCrjiw4ipyUNk33k26qRg==} engines: {node: '>=10'} cpu: [ppc64] os: [linux] libc: [glibc] - '@swc/core-linux-s390x-gnu@1.15.43': - resolution: {integrity: sha512-lXfLhs+LpBsD5inuYx+YDH5WsPPBQ95KPUiy8P5wq9ob9xKDZFqwNfU2QW6bGO8NqRO/H9JQomTSt5Yyh+FGfA==} + '@swc/core-linux-s390x-gnu@1.15.46': + resolution: {integrity: sha512-DxlMdnt84TtRVTv7WL/thWyz9+QU8QZNNoAP9rrk0P68LziuhfePp8MjQ44zIprpTHTsEwyziIuGUUN5iSC1bQ==} engines: {node: '>=10'} cpu: [s390x] os: [linux] libc: [glibc] - '@swc/core-linux-x64-gnu@1.15.43': - resolution: {integrity: sha512-07XnKwTmKy8TGOZG3D9fRnLWGynxPjwQnZLVmBFbo6F+7vHYzBIOuwXEhemrChBWb6yDNZsVCcMWCPX6FDD2xg==} + '@swc/core-linux-x64-gnu@1.15.46': + resolution: {integrity: sha512-SKxI7J6t90XPl8hRUqtJi9NfGdunN/E/vZMc7Bc0figeRdOPDBT+Tm8g7cx9xM0T0mewh2l+8dewa3Am27/P+A==} engines: {node: '>=10'} cpu: [x64] os: [linux] libc: [glibc] - '@swc/core-linux-x64-musl@1.15.43': - resolution: {integrity: sha512-TJc+bsSIaBh+hZvZ5GRtW/K1bw66TJ9vsUwvVIsZdiWxU5ObLwZvfcnZ3UpgVfMnFibRes9uriJrQNBHEEogRQ==} + '@swc/core-linux-x64-musl@1.15.46': + resolution: {integrity: sha512-qj9T6B7bosI0VEsrWOVXZN1OXxS8Tp63ywyrLxNdOycnUtLdkgYcoBsN5y8ImnDDsnwrEWZOy1e+J4xSe7mA3Q==} engines: {node: '>=10'} cpu: [x64] os: [linux] libc: [musl] - '@swc/core-win32-arm64-msvc@1.15.43': - resolution: {integrity: sha512-jfd7s2/bUQYkOHLs+LWQNKZdmDa8+sufKLllhpWAhVQ2GDCwsHe3vR/j+OSiItZNtkzFuaawa3+SAKz9y5gYfw==} + '@swc/core-win32-arm64-msvc@1.15.46': + resolution: {integrity: sha512-8p7l4c3LU+eA5g9Et1JPhNeMC1oQwXTGU+uah8DPIBX7YXzqswvaBtyKVmXefVGi/DJU1x3YJsc3mbAp9aWzSQ==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.15.43': - resolution: {integrity: sha512-rLAE8JvucqEW1ZGohxPQrQWPBQeJG4+ypKbWfdlU/qmKScvCkxf9/Jxnzki1dkUQCQ7P5Enp13RlvqOlvx/32g==} + '@swc/core-win32-ia32-msvc@1.15.46': + resolution: {integrity: sha512-tUEnfr3Bn9u6FOjUb3PN9p+09qZC2j+wNDLKHzXXZn22rqGcUqR/ohCRSS+nG9B9+X+U+3FewNEHJkTmdIvMjQ==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.15.43': - resolution: {integrity: sha512-h8MLDHZcfIukwQWj03rIJZx1I0E81AYj2X7J/nGErG4nz+QAv6G1Z+peotvinL3lqpbo32tLYSMFo32/ySzxKg==} + '@swc/core-win32-x64-msvc@1.15.46': + resolution: {integrity: sha512-Vux7UDzBJYQggSuPfcl2w9iu+IJpgpRCxHzgCaVkELnAXAE4XZMOTX9HNcaNiwfeIDqdu2rkr69RuDm6wY8neA==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.15.43': - resolution: {integrity: sha512-1CuKjFkPxIgGdeHVuNbkxmBxkcbdc08u0aiI43pFq6yY1tTVKmXT9hFEooyyKs/sJ3xf1GPHyEwTtk9Xl8dvQw==} + '@swc/core@1.15.46': + resolution: {integrity: sha512-Ri3em2mBpq3h2zSPliCYl63otDGqek8PPEfv2nWgRQEbZ/VBCNyypVTVQ6cEbTCXBhy+WE2T3fQb08moIyuYaw==} engines: {node: '>=10'} peerDependencies: '@swc/helpers': '>=0.5.17' @@ -4897,69 +4897,69 @@ packages: resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} engines: {node: '>=14.16'} - '@tailwindcss/node@4.3.2': - resolution: {integrity: sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg==} + '@tailwindcss/node@4.3.3': + resolution: {integrity: sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==} - '@tailwindcss/oxide-android-arm64@4.3.2': - resolution: {integrity: sha512-WHxqIuHpvZ5VtdX6GTl1Ik/Vp2YuN42Et+0CdeaVd/frQ9jAvGmvR8vLT+jk3e8/Q3x8kECB9+R17pgpp2BulA==} + '@tailwindcss/oxide-android-arm64@4.3.3': + resolution: {integrity: sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==} engines: {node: '>= 20'} cpu: [arm64] os: [android] - '@tailwindcss/oxide-darwin-arm64@4.3.2': - resolution: {integrity: sha512-GZypeUY/IDJW3877KeM+O67vbXr3MBnbtEL4aYhNErv/JWZhye2vGSWWG9tB6iiqR2MqRNkY8IOUy4NdSZV26w==} + '@tailwindcss/oxide-darwin-arm64@4.3.3': + resolution: {integrity: sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==} engines: {node: '>= 20'} cpu: [arm64] os: [darwin] - '@tailwindcss/oxide-darwin-x64@4.3.2': - resolution: {integrity: sha512-UIIzmefR6KO1sDU7MzRqAxC8iBpft/VhkGjTjnhoS6k7Z3rQ9wEgA1ODSiyH/tcSYssulNm4Ci3hOeK1jH7ccQ==} + '@tailwindcss/oxide-darwin-x64@4.3.3': + resolution: {integrity: sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==} engines: {node: '>= 20'} cpu: [x64] os: [darwin] - '@tailwindcss/oxide-freebsd-x64@4.3.2': - resolution: {integrity: sha512-GN+uAmcI6DNspnCDwtOAZrTz6oukJnp337qZvxqCGLd3BHBzJpO0ZbTLRvJNdztOeAmTzewewGIMPb0tk2R4WA==} + '@tailwindcss/oxide-freebsd-x64@4.3.3': + resolution: {integrity: sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==} engines: {node: '>= 20'} cpu: [x64] os: [freebsd] - '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.2': - resolution: {integrity: sha512-4ABn7qSbdHRwTiDiuWNegCyb5+2FJ4vKIKc3DmKrvAFw7MU1Lm11dIkTPwUaFdTzc7IsOpDbqBrlh0x6y36U/w==} + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3': + resolution: {integrity: sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==} engines: {node: '>= 20'} cpu: [arm] os: [linux] - '@tailwindcss/oxide-linux-arm64-gnu@4.3.2': - resolution: {integrity: sha512-wDgEIGwoM8w8pufh9LVt1PahDgNdKXrLC2qfAnV3vAmococ9RWbxeAw4pxPttd/TsJfwjyLf90Dg1y9y8I6Emw==} + '@tailwindcss/oxide-linux-arm64-gnu@4.3.3': + resolution: {integrity: sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] libc: [glibc] - '@tailwindcss/oxide-linux-arm64-musl@4.3.2': - resolution: {integrity: sha512-J5Nuk0uZQIiMTJj3LEx4sAA9tMFUoXQZFv1J6An+QGYe53HKRJuFDi0rpq/tuouCZeAbOBY3kQ6g8qeD4TUjtA==} + '@tailwindcss/oxide-linux-arm64-musl@4.3.3': + resolution: {integrity: sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] libc: [musl] - '@tailwindcss/oxide-linux-x64-gnu@4.3.2': - resolution: {integrity: sha512-kqCZpSKOBEJO4mz7OqWoofBZeXTAwaVGPj0ErAj7CojmhKpWVWVOnrt9dE8odoIraZq4oj3ausM37kXi+Tow8w==} + '@tailwindcss/oxide-linux-x64-gnu@4.3.3': + resolution: {integrity: sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==} engines: {node: '>= 20'} cpu: [x64] os: [linux] libc: [glibc] - '@tailwindcss/oxide-linux-x64-musl@4.3.2': - resolution: {integrity: sha512-cixpqbh2toJDmkuCRI68nXA8ZxNmdK9Y+9v5h3MC3ZQKy/0BO8AWzlkWyRM7JAFSGBlfig4YVTPsK6MVgqz1uw==} + '@tailwindcss/oxide-linux-x64-musl@4.3.3': + resolution: {integrity: sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==} engines: {node: '>= 20'} cpu: [x64] os: [linux] libc: [musl] - '@tailwindcss/oxide-wasm32-wasi@4.3.2': - resolution: {integrity: sha512-4ec2Z/LOmRsAgU23CS4xeJfcJlmRg94A/XrbGRCF1gyU/zdDfRLYDVsS+ynSZCmGNxQ1jQriQOKMQeQxBA3Isw==} + '@tailwindcss/oxide-wasm32-wasi@4.3.3': + resolution: {integrity: sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==} engines: {node: '>=14.0.0'} cpu: [wasm32] bundledDependencies: @@ -4970,24 +4970,24 @@ packages: - '@emnapi/wasi-threads' - tslib - '@tailwindcss/oxide-win32-arm64-msvc@4.3.2': - resolution: {integrity: sha512-Zyr/M0+XcYZu3bZrUytc7TXvrk0ftWfl8gN2MwekNDzhqhKRUucMPSeOzM0o0wH5AWOU49BsKRrfKxI2atCPMQ==} + '@tailwindcss/oxide-win32-arm64-msvc@4.3.3': + resolution: {integrity: sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==} engines: {node: '>= 20'} cpu: [arm64] os: [win32] - '@tailwindcss/oxide-win32-x64-msvc@4.3.2': - resolution: {integrity: sha512-QI9BO7KlNZsp2GuO0jwAAj5jCDABOKXRkCk2XuKTSaNEFSdfzqswYVTtCHBNKHLsqyjFyFkqlDiwkNbTYSssMQ==} + '@tailwindcss/oxide-win32-x64-msvc@4.3.3': + resolution: {integrity: sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==} engines: {node: '>= 20'} cpu: [x64] os: [win32] - '@tailwindcss/oxide@4.3.2': - resolution: {integrity: sha512-z8ZgnzX8gdNoWLBLqBPoh/sjnxkwvf9ZuWjnO0l0yIzbLa5/9S+eC5QxGZKRobVHIC3/1BoMWjHblqWjcgFgag==} + '@tailwindcss/oxide@4.3.3': + resolution: {integrity: sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==} engines: {node: '>= 20'} - '@tailwindcss/vite@4.3.2': - resolution: {integrity: sha512-eHpMeX4JXfVNJDEcsouTeCBubJBTcTLigeaw/NTUW6PB5ATKKXdyonnXgTBX2VuRbjz1hjfz6C5XAhr52ImQXA==} + '@tailwindcss/vite@4.3.3': + resolution: {integrity: sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==} peerDependencies: vite: ^5.2.0 || ^6 || ^7 || ^8 @@ -5505,63 +5505,63 @@ packages: '@types/yargs@17.0.35': resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} - '@typescript-eslint/eslint-plugin@8.64.0': - resolution: {integrity: sha512-CGvQPBxN3wZLu6Rz2kFUpZeoCm78xUic92ck39KPePkO1NPOwjCqdQnm5Q87tpWw9vcBvW8XLrDXjH9PWYtJ3Q==} + '@typescript-eslint/eslint-plugin@8.65.0': + resolution: {integrity: sha512-IEgob78X12rHpUmtcwFsXhZdVGJtwTVP8FiCLZkR6GlYVrl2PcuB+KhCE5BlVC/eQpQnu8WXRtkHZuPar+gCRA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.64.0 + '@typescript-eslint/parser': ^8.65.0 eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/parser@8.64.0': - resolution: {integrity: sha512-KA0OshtlcCCXmbfqyZkM5pV3/WNraJf7DkJRLpyrmwPtud57H5BDX7C3k0LPSPxpprfRL+cJDGabF10mvNCoCw==} + '@typescript-eslint/parser@8.65.0': + resolution: {integrity: sha512-CZ4nMxWwgu1HEEFNkeaCptra9QCtkmKdgf3sWh1rl1trIhmxLilgTV4cwcbQ4wemnT4sWQN8CaKOmdYx+g2gMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/project-service@8.64.0': - resolution: {integrity: sha512-tk4WpOJ6IEbGrVHaNmM0YRrwAD3exZlIK3iadQNAxh4YKk6jvUQ4ecq18n+v7+meh+cJ3j+D8nbk8sRKhlwLQg==} + '@typescript-eslint/project-service@8.65.0': + resolution: {integrity: sha512-SxnPhbTsGahizDgbu7oqFH/xVtzIqMd/s+WtnSxNxJZJpLbdT5IPdzg8EZxO3+PoKahXmwJLeNQOpKJb3/bi7Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/scope-manager@8.64.0': - resolution: {integrity: sha512-CXEaFdYXjSTgKhisNkwCcJwTP8Pl+fmRrEQrri4nm3vU743bALrxzLmq7fHG/7e6a5xO0lDYeURpZmBuhHk54w==} + '@typescript-eslint/scope-manager@8.65.0': + resolution: {integrity: sha512-Esbl8OSYiVxBokYgWPf7VVWg/BE798wXhimnn9ML9Pt5qoDf8bfQlgjlKXR/k98+AcNzlLKYrpCcrcuZ9DZLgg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.64.0': - resolution: {integrity: sha512-2yo8rRNKuzbVWQp5kslhANqZ2uDAeROQHBRZNPu8JDsHmeFNj/XJJhX/FhNUWmkHHvoNsKa6+tHJiig87EzsQw==} + '@typescript-eslint/tsconfig-utils@8.65.0': + resolution: {integrity: sha512-j6GzGqCiRdA7Qhur2VVmKZAkBLfnHFQfx4TaJGL9RMveZqCo48jSHHO0DTgizEnGhtWnqmbtCUSrqSkdiY/0Hg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/type-utils@8.64.0': - resolution: {integrity: sha512-XWG4Fmmv/6SvyS9nH8jWrKs6terwJvE8cyRt1CzYYqzp9OrPhCT4cMc/f7C6RZCwG+qMmiffJS1/qJP8G1URtg==} + '@typescript-eslint/type-utils@8.65.0': + resolution: {integrity: sha512-YjaZ7PRI5qY7ax2L3PbvX0rRyGtipAReCWs0mhhDBHjH/vl0g0BonaGXrKdKpMbIIsMIwDgbk/xzkBTyAltS5g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/types@8.64.0': - resolution: {integrity: sha512-qjhfuTfLXjA4IOzXvz0rTjT01BqEiIgPoUeMwiEjnaHKJMTNo8rH5pYW1a2L/0Dnux2fPC85AeyJoWaGa8WxTA==} + '@typescript-eslint/types@8.65.0': + resolution: {integrity: sha512-JSSwWNy+H0E/01jJEM+hrX6N0OFDzFzeIhHFSAS01tlVaevpG8cFyYRPhS5yjGOvBUx3sqQHVMjCL1CAZZMxBg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.64.0': - resolution: {integrity: sha512-Pztpsn1aCE1oWDvDEfUk31nngvvF7vUB5SwHFEaZIFpvw7WJtqUHHL4plBZDA9HfWJJjL13BdG0YrJInTUvoVA==} + '@typescript-eslint/typescript-estree@8.65.0': + resolution: {integrity: sha512-JboAE2swaYt4tb1fHhHTABE2K+OLy09XfcTbhnk4Pw96f9dd2e9iYsJ28gBggHlo5z5x1rkyWvcPoTuNTd4oGg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/utils@8.64.0': - resolution: {integrity: sha512-aJUGVB3+U0htrrCjoA8qukw8cm8fNCGAxK/tVoS70k8aeb7DETKeFozRiVFIwEeN9WJLsjaP3ph8I60tY2XZoQ==} + '@typescript-eslint/utils@8.65.0': + resolution: {integrity: sha512-gXiwIHsYreboxeJucHKPvgwl7dXt50mF8s1/c00cP/WoVTyWKFdtfhRWwZiXYFU5H2O8vVoSLNrexFZjYS/SGA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/visitor-keys@8.64.0': - resolution: {integrity: sha512-mrtuL8Nsn6gi2H4mo5KMTp823M+3Q19Ew/i+Zlikq20tIMm99C3Ez0dCmkWWnxut20esQvTg8aUSEhMcAOXhEw==} + '@typescript-eslint/visitor-keys@8.65.0': + resolution: {integrity: sha512-8C71BQkGjiMmXtop7pHVJu1l2NNShFdkCyD6a2ezzs5vU/L3LRtb69EtcteFwz0mYMPzIgOw0n6OV4VBUWZd7A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/typescript-aix-ppc64@7.0.2': @@ -5864,8 +5864,8 @@ packages: resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} engines: {node: '>=0.4.0'} - acorn@8.17.0: - resolution: {integrity: sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==} + acorn@8.18.0: + resolution: {integrity: sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==} engines: {node: '>=0.4.0'} hasBin: true @@ -6240,9 +6240,9 @@ packages: brace-expansion@2.1.1: resolution: {integrity: sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==} - brace-expansion@5.0.7: - resolution: {integrity: sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==} - engines: {node: 18 || 20 || >=22} + brace-expansion@5.0.8: + resolution: {integrity: sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==} + engines: {node: 20 || >=22} braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} @@ -6281,8 +6281,8 @@ packages: resolution: {integrity: sha512-02yxLeyxF4dNl6SlY6/5HfRSrSdZ/sCPoxy2kZNP5dZZX8LSAD9aE2gtJIUgWrsQTiMPl3mxESyrobSwvRGisQ==} engines: {node: '>=18.20'} - bullmq@5.80.5: - resolution: {integrity: sha512-3cVpkFXvmi7U7clGQGqlIzWLNJgX77Q0U0xCfbsiu6CFdiAcrKem1rK+xHIq0jIzMA6swq9ss6uvMqzCeTbAgg==} + bullmq@5.81.2: + resolution: {integrity: sha512-Hi9GaVCC6HE9bQP65j/FNv1aL1fcEukTF99ezS5pl1Ud+joCFpNWiPCV45mWdkEmpuacS0XJdMMFGKPIHCwoPg==} engines: {node: '>=12.22.0'} peerDependencies: redis: '>=5.0.0' @@ -6799,8 +6799,8 @@ packages: resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==} engines: {node: '>= 14'} - crelt@1.0.6: - resolution: {integrity: sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==} + crelt@1.0.7: + resolution: {integrity: sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==} cron-parser@4.9.0: resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} @@ -7265,8 +7265,8 @@ packages: engines: {node: '>= 16.0.0'} hasBin: true - devalue@5.8.1: - resolution: {integrity: sha512-4CXDYRBGqN+57wVJkuXBYmpAVUSg3L6JAQa/DFqm238G73E1wuyc/JhGQJzN7vUf/CMphYau2zXbfWzDR5aTEw==} + devalue@5.8.2: + resolution: {integrity: sha512-DObPPAfdtFbXjxLqK8s2Xk9ZuWz5+ZoFEhC7J76es4GU/rEiXwHTmbImoCdyoCOcBH1UF3+Cz6Z2sYD4hyl5TA==} devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} @@ -7437,12 +7437,8 @@ packages: resolution: {integrity: sha512-2agL3ueZhqxoVrfmntO8yuVj+uNSlIOnhykYHk3Cq0ShYPdUjjUiSJrQvXjq01I9jAuI0Zl2YO8Evv5Mqytm5g==} engines: {node: '>=10.2.0'} - enhanced-resolve@5.21.6: - resolution: {integrity: sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==} - engines: {node: '>=10.13.0'} - - enhanced-resolve@5.24.2: - resolution: {integrity: sha512-rpsZEGT1jFuve6QlpyRp9ckQ+kN61hvF9BzCPyMdaKTm8UJce96KBn3sorXOFXlzjPrs3Vc4T1NsSroZ3PxlFw==} + enhanced-resolve@5.24.4: + resolution: {integrity: sha512-GVoi+ICHocoOIU7qVVM48wOJziRsqrsyqlI0Ce0LdowRn6v3bcH2zUa9kp85ncx0nwIb9/HOCOLS3fdThDG/XQ==} engines: {node: '>=10.13.0'} entities@2.2.0: @@ -7560,8 +7556,8 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-plugin-better-tailwindcss@4.6.1: - resolution: {integrity: sha512-Lr8mPyuaZ+dS6ATuJaPwcOFOpOUsRBs5TXyOPqiTzLy0SvK4+0G6usbklCuQn4QabwFtNKdSXwl2WxOIPvu0lQ==} + eslint-plugin-better-tailwindcss@4.7.0: + resolution: {integrity: sha512-lrdlVW4pzLPj/zX5HRqMhKPesGijDfRhnSRJMlNcsrCyJHsndmHCLKTiRNa1eREUZ6G3D3QjdLc+G4tlfGrmkw==} engines: {node: ^20.19.0 || ^22.12.0 || >=23.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 @@ -7593,8 +7589,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-svelte@3.20.0: - resolution: {integrity: sha512-AElKLVt7Hjy4d7ljwhrhw9hux60DCxCNkmK8cY/aAXvjs8tpR7PvU4DlyI/SA1PaJww1gh0wPGo2pbyURuEwxQ==} + eslint-plugin-svelte@3.22.0: + resolution: {integrity: sha512-O3qn0NePTWta+1o25dIThqeEP/hEQ3VxDK2LVO8SQ5wG9umLMvulK+m1yQ4JGOb2Pkl8IB0G1lpRV/HXDXSLTQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.1 || ^9.0.0 || ^10.0.0 @@ -7633,8 +7629,8 @@ packages: resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - eslint@10.7.0: - resolution: {integrity: sha512-GVTD7s1vdIl6UYvAfriOPeY1Df8LIZjfofLvHwde+erDHGGuHyuM6xoxRxmHiebhYuD2p1vN4wWh0XzPARSGDQ==} + eslint@10.8.0: + resolution: {integrity: sha512-nuKKvN+oIBO0koN7Tm7dlkmnkc21mtt0QJLwAKzjLq14y6lRTdVG36MZHJ8eQHwdJMwZbQNMlPOYedMq/oVJvQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} hasBin: true peerDependencies: @@ -7827,8 +7823,8 @@ packages: fast-safe-stringify@2.1.1: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} - fast-uri@3.1.3: - resolution: {integrity: sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==} + fast-uri@3.1.4: + resolution: {integrity: sha512-8JnbkQ4juDyvYs4mgFGQqg4yCYtFDtUtmp2QIQq11ZZe5CFQ5wcqm1rqDgAh/QdMySuBnPzMUiJUNZG5N/AiQw==} fastq@1.20.1: resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} @@ -7917,8 +7913,8 @@ packages: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - flatted@3.4.2: - resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} + flatted@3.4.3: + resolution: {integrity: sha512-/zipXxyO6rGvuNGDiULY9MvEGSkb2gaG4GGH4ygMi0ZZzyMHdUZBmntJmx5x1G2VuPytCwGN4xsJP6cw+sK+vQ==} fluent-ffmpeg@2.1.3: resolution: {integrity: sha512-Be3narBNt2s6bsaqP6Jzq91heDgOEaDCJAXcE3qcma/EJBSy5FB4cvO31XBInuAuKBx8Kptf8dkhjK0IOru39Q==} @@ -8180,8 +8176,8 @@ packages: engines: {node: '>=0.4.7'} hasBin: true - happy-dom@20.10.6: - resolution: {integrity: sha512-6QD0ilzDDt93tX44y8tbmZdAcdTRYDhUP+Asgi6pC8Pp5IA3cvaZGyoVN/EGtlq9ziT65iPuBBn3ASLr6hCgVw==} + happy-dom@20.11.1: + resolution: {integrity: sha512-XSt8tMzbW9ymE7687xztkO1ckR7qJNQ3LywY9vlYGhGi3zXrGBHuUo2Cl1ztZaICW+1eAGdkLbj6iwVqDT33kg==} engines: {node: '>=20.0.0'} has-flag@4.0.0: @@ -8448,8 +8444,8 @@ packages: immediate@3.3.0: resolution: {integrity: sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==} - immutable-json-patch@6.0.2: - resolution: {integrity: sha512-KwCA5DXJiyldda8SPha1zB+6+vbEi5/jRRcYii/6yFXlyu9ZjiSH/wPq8Ri2Hk8iGjjTMcHW3Z21S4MOpl7sOw==} + immutable-json-patch@6.0.3: + resolution: {integrity: sha512-qFLRzQLjteiTGy5tRJcYqvuu0r/GdQ1fE27IyNBrJ/k7yGSO0xFr6QX62TtmIqSvjQF3afcNFUHsGPYW7ydaHQ==} immutable@5.1.6: resolution: {integrity: sha512-q1swsS8K7L8usSHuOqF2TAoCCkonYz0SG38wLAggaa4Wml70zixIvt2ql4coQ2C2B3hTjltJry4r6bULwgAXLQ==} @@ -8780,8 +8776,8 @@ packages: joi@17.13.4: resolution: {integrity: sha512-1RuuER6kmt8K8I3nIWvPZKi5RQCb568ZPyY4Pwjlua+yo+63ZTmIwxLZH0heBmiKN4uxjvCiarDrjaeH84xicQ==} - jose@6.2.3: - resolution: {integrity: sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==} + jose@6.2.4: + resolution: {integrity: sha512-N8acGzVsQy6M/fjFcxtysNc4Q379TcM5dM/qKkNtsHFji88yANnXTr7BLeP75iPnFwBfQzM/jg2BZ9+HZrHCZA==} js-tokens@10.0.0: resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} @@ -8796,6 +8792,10 @@ packages: resolution: {integrity: sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==} hasBin: true + js-yaml@5.2.1: + resolution: {integrity: sha512-zfLtNfQqxVqq3uaTqSkh4x4hZw3KHobGUA0fJUj4wawW8bsQLTVqpHdXSIzidh7o+4lEW36tANuAGdaFx6Zgnw==} + hasBin: true + jsdom@26.1.0: resolution: {integrity: sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==} engines: {node: '>=18'} @@ -8854,8 +8854,8 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - jsonrepair@3.14.0: - resolution: {integrity: sha512-tWPGKMZf/8UPim+fcW2EfcQ/d/7aKUrP6IECz9G3Tu6Q5dX0orSleqJ9z6sSw7qrQkjF8/Edo4DvsWBZ8H+HNg==} + jsonrepair@3.15.0: + resolution: {integrity: sha512-wy8OTjwsJwQRnQJkKnMJJ9vcytRdBPAgIF/Hy6+s1dAj42BHMKiyL8JzEieIl3JY7idt8eyHwBWTO8mh/+mtwA==} hasBin: true jsonwebtoken@9.0.3: @@ -9352,8 +9352,8 @@ packages: mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - mdn-data@2.28.1: - resolution: {integrity: sha512-U9w+PzSZ00Z5m9rZ5ARVFL5xOfuCHdKYi/1RRwDCJsboFgJDNT3zT6PIPD7mZQYaQLhsZM3GfDRgSMRHhSmVng==} + mdn-data@2.29.0: + resolution: {integrity: sha512-pVxQFCcaYUEAH853+v7yoI/qzhxXSq1bTb9obMYGYAN1c3Hen+XDCEvr296XhstrwlSTNgOR7mCSD4JPjbJe5A==} media-chrome@4.19.2: resolution: {integrity: sha512-4ai1ITN8wBhwugQcRgqe3tN0z6OSKGOXqHLNrS04MgKFfsLqu6Dm8MPq02pI9Y9ZKoXtFjIl85jOryIW9es3BA==} @@ -9596,8 +9596,8 @@ packages: minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - minimatch@10.2.5: - resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} engines: {node: 18 || 20 || >=22} minimatch@3.1.5: @@ -9761,9 +9761,9 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - nanoid@5.1.16: - resolution: {integrity: sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==} - engines: {node: ^18 || >=20} + nanoid@6.0.0: + resolution: {integrity: sha512-mkUH+rPkwU2qPadJ0oJZOjeZ5Mxn8Q1UhevwkTRWNuUZzyia3h4rhzK39hxaHTk0o2OxB8W2SQ6A8k23ZDi1pQ==} + engines: {node: ^22 || ^24 || >=26} hasBin: true napi-build-utils@2.0.0: @@ -9826,8 +9826,8 @@ packages: '@nestjs/core': '>= 11 < 12' rxjs: ^7.1.0 - nestjs-zod@5.4.0: - resolution: {integrity: sha512-dxVpy1fjfK4kp+ztK+7xQP46fpvZxkeR/jcEdIvEGh/2o71iwXuy/hrKOWSPhJ1nQXV4iBdHqMizndn2GTaXDg==} + nestjs-zod@5.5.0: + resolution: {integrity: sha512-V0WMtmICygYE2RoMKk8ExEeoetkC7PoUmUlZNP4JNk1YgrnUnG1vgkRn2DBNqsDi+Obv3c9AOssmXe/k/AvBOg==} peerDependencies: '@nestjs/common': ^10.0.0 || ^11.0.0 '@nestjs/swagger': ^7.4.2 || ^8.0.0 || ^11.0.0 @@ -9986,8 +9986,8 @@ packages: resolution: {integrity: sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==} engines: {node: '>=12.20.0'} - oidc-provider@9.9.1: - resolution: {integrity: sha512-2kvtykfLu3FJSzaIStg8Dz58/pLtAwI3j/vLdy7KXJBDuJJAEgZhOSWklc+MTjKBLlQjeFwBXpKoE0Pf23pnIQ==} + oidc-provider@9.10.0: + resolution: {integrity: sha512-Olmg6oxgHIviZnrf9yaey6vdaWG1f19UiyvpSj0gCgj6wl9YMcOw3uDv3FHj+x62EXeFj7GfZeTL09MCgIEKnw==} on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} @@ -10290,14 +10290,14 @@ packages: resolution: {integrity: sha512-emEcLuomt2j03vxD54giVB4SxTjnsqkU692xZOZXHDVoYyypEm+b3jpiTcc+Cf+myooc+/Ly0z01jqeNHVgJGw==} engines: {node: '>=16.0.0'} - playwright-core@1.61.1: - resolution: {integrity: sha512-h7Qlt6m4REp25qvIdvbDtVmD4LqVXfpRxhORv9L0jzETM05p4fuPJ3dKyuSXQxDSbXnmS79HAgi9589lGSpLkg==} - engines: {node: '>=18'} + playwright-core@1.62.0: + resolution: {integrity: sha512-nsNRyq0r2zsG8AcRHWknc9QRA5XCueC7gWMrs+Gx2tlZn9hcl8zudfh00lhJPY1DE7NmZ6bDsT9g2yey8mXljA==} + engines: {node: '>=20'} hasBin: true - playwright@1.61.1: - resolution: {integrity: sha512-DWnY5o3YbLWK4GovuAVwpqL+1VwGNdUGrRr++8j8PtQQzvAVZUIMjKQ90fY689sEJZJBbZVw1rXaOKSTitkzPQ==} - engines: {node: '>=18'} + playwright@1.62.0: + resolution: {integrity: sha512-Z14dG305dgaLu6foB1TXQagFiW8JfSUIUaUuPaKQ6NtBPKF1P/qXcqfh6c6K/icPqdy37JmjbiBXf6JNg6Sylw==} + engines: {node: '>=20'} hasBin: true plimit-lit@1.6.1: @@ -10778,8 +10778,8 @@ packages: peerDependencies: postcss: ^8.4.31 - postcss@8.5.19: - resolution: {integrity: sha512-Mz8SaolMd8nB+G13WkORcxQKHZ/NE4xXevtkJHVuG+guo9/wYKlIMTKAqGdEmYOXR2ijPjTYNHssizdaVSUNdQ==} + postcss@8.5.25: + resolution: {integrity: sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==} engines: {node: ^10 || ^12 || >=14} postgres-array@2.0.0: @@ -10846,8 +10846,8 @@ packages: prettier: ^3.0.0 svelte: ^5.0.0 - prettier@3.9.5: - resolution: {integrity: sha512-/FVl766LpUfB5vXgCYOYa0MeV/441Ia99AeICQIQFTY/Nw0roZwULcXpku5i1/m5kt/baz+s4Zogspd839HSMg==} + prettier@3.9.6: + resolution: {integrity: sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==} engines: {node: '>=14'} hasBin: true @@ -10998,6 +10998,10 @@ packages: resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} engines: {node: '>= 0.10'} + raw-body@4.0.0: + resolution: {integrity: sha512-TMHtwexrgOt9VJ2E5JF9RO8mRXGNgC5wXvKkc5AVSJUt1L5gxvjg7eiCQl96EqUEpCWrnNEkCnbAplYtyuq1IA==} + engines: {node: '>=22'} + raw-loader@4.0.2: resolution: {integrity: sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==} engines: {node: '>= 10.13.0'} @@ -11008,10 +11012,10 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-dom@19.2.7: - resolution: {integrity: sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==} + react-dom@19.2.8: + resolution: {integrity: sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==} peerDependencies: - react: ^19.2.7 + react: ^19.2.8 react-email@5.2.11: resolution: {integrity: sha512-9TzTGRGeavli/iv1RICVOePnFOeG2YRyr8kAyXj6Zgudteq60uA0txDwe4q1zIjQ+08fcbzBkSnI9HgPkSK5OA==} @@ -11056,8 +11060,8 @@ packages: peerDependencies: react: '>=15' - react@19.2.7: - resolution: {integrity: sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==} + react@19.2.8: + resolution: {integrity: sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==} engines: {node: '>=0.10.0'} read-cache@1.0.0: @@ -11354,8 +11358,8 @@ packages: sanitize-filename@1.6.4: resolution: {integrity: sha512-9ZyI08PsvdQl2r/bBIGubpVdR3RR9sY6RDiWFPreA21C/EFlQhmgo20UZlNjZMMZNubusLhAQozkA0Od5J21Eg==} - sass@1.101.0: - resolution: {integrity: sha512-OL3GoQyoUdDt843DpVmDO6y2k1sc5IhUDSpu8XucEI+35neq5QivZ1iuegnpraEVTJXlQGK1gl27zKcTLEPbQw==} + sass@1.102.0: + resolution: {integrity: sha512-NSOyTnaQF7rTAEOtI2fwb386vL+akyiQLBZu8Na7hXCb+umJy0GAqlcMIaqACZ6Z1VgTBS4K9PG6B3IdjHGJsw==} engines: {node: '>=20.19.0'} hasBin: true @@ -11509,8 +11513,8 @@ packages: simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} - simple-icons@16.26.0: - resolution: {integrity: sha512-T9rNJtyOshULM8heLlvrZY346g9zOgZILQ3vxP+FWcX13RhaOLez7YM/hNCEx3b5gJckSCNDoNsjZuDncSMYSQ==} + simple-icons@16.27.1: + resolution: {integrity: sha512-slZF8iKxkv7Lb9SF3L1AcIl5iYLNvDrKKm8yV69cG66XvxJ12SX+bYTgxRwCY4bXSmklGXoXaKEyVmEypOCeqw==} engines: {node: '>=0.12.18'} sirv@2.0.4: @@ -11816,8 +11820,8 @@ packages: peerDependencies: svelte: ^3 || ^4 || ^5 - svelte-jsoneditor@3.12.0: - resolution: {integrity: sha512-BUWsAmmDbQTs4AAMvVGA09X1aP8l1kr7dDdzbLVPX8895Ov52PVoAlAsCXERPh+GIan+qZTEBqwSqbM3VRMBaw==} + svelte-jsoneditor@3.13.0: + resolution: {integrity: sha512-4L7jqVulv180NytA12jQfFguUKrkHjQ0KJkrSbxhC7mWZL6tDzcsRKqXNtfCgy9c5CKC340xJmUClVF3VIsONg==} peerDependencies: svelte: ^5.0.0 @@ -11859,8 +11863,8 @@ packages: peerDependencies: svelte: ^5.30.2 - svelte@5.56.5: - resolution: {integrity: sha512-P03YJmUy2JoOxYHb4Ka3oFat1hq2ko2it1MOItSjsJ4B6WgZPLc3+RyyU+57OGWhs3Ieq74EJpZtSnNXdAGgDw==} + svelte@5.56.8: + resolution: {integrity: sha512-PY8LOw7xP6c8IOiVqdo0sbbZVYhXRSfklOQLAUyGBKqjTX0wx/z4l/9J+PmBpmlLnxzEb1NqltxQ5/wZme/Cmg==} engines: {node: '>=18'} svg-parser@2.0.4: @@ -11942,8 +11946,8 @@ packages: engines: {node: '>=14.0.0'} hasBin: true - tailwindcss@4.3.2: - resolution: {integrity: sha512-WtctNNSH8A9jlMIqxzuYumOHU5uGZyRv0Q5svQl+oEPy5w84YpBxdb7MdqyiSPQge5jTJ6zFQLq0PFygdccSBA==} + tailwindcss@4.3.3: + resolution: {integrity: sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==} tapable@2.3.3: resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} @@ -12045,9 +12049,6 @@ packages: peerDependencies: tslib: ^2 - three@0.184.0: - resolution: {integrity: sha512-wtTRjG92pM5eUg/KuUnHsqSAlPM296brTOcLgMRqEeylYTh/CdtvKUvCyyCQTzFuStieWxvZb8mVTMvdPyUpxg==} - three@0.185.1: resolution: {integrity: sha512-5aojFCXKwnjBRZvUnt3WFfEcvUJgkN5LlijRFN95hMy8WVkG4I0QNcJE+OuWvuJ0bOdStrbfXn0pkd6/QyiAlg==} @@ -12275,8 +12276,8 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript-eslint@8.64.0: - resolution: {integrity: sha512-0qg+pDNMnqYzqH9AnNK+39tejHvsShUOUUoRUgtnTGE7QuMZhiFDnozq8nHJVq+Wae6NMLKNWLg5WmkcC/ndyQ==} + typescript-eslint@8.65.0: + resolution: {integrity: sha512-/ggrHAwyjENDusvyxbuqxAC2dTnZg/Z8F+fgQtYIz+L6n/9HfSlEZcFGV/NsMNa6CkGk0xUjUAFwC0vHOflvIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 @@ -13269,20 +13270,20 @@ snapshots: '@babel/compat-data@7.29.7': {} - '@babel/core@7.29.7': + '@babel/core@7.29.7(supports-color@8.1.1)': dependencies: '@babel/code-frame': 7.29.7 '@babel/generator': 7.29.7 '@babel/helper-compilation-targets': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helpers': 7.29.7 '@babel/parser': 7.29.7 '@babel/template': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -13309,32 +13310,32 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.29.7(@babel/core@7.29.7)': + '@babel/helper-create-class-features-plugin@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-member-expression-to-functions': 7.29.7 + '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@8.1.1) '@babel/helper-optimise-call-expression': 7.29.7 - '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7) - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) + '@babel/traverse': 7.29.7(supports-color@8.1.1) semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.29.7(@babel/core@7.29.7)': + '@babel/helper-create-regexp-features-plugin@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 regexpu-core: 6.4.0 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.8(@babel/core@7.29.7)': + '@babel/helper-define-polyfill-provider@0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) lodash.debounce: 4.0.8 resolve: 1.22.12 transitivePeerDependencies: @@ -13342,26 +13343,26 @@ snapshots: '@babel/helper-globals@7.29.7': {} - '@babel/helper-member-expression-to-functions@7.29.7': + '@babel/helper-member-expression-to-functions@7.29.7(supports-color@8.1.1)': dependencies: - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/helper-module-imports@7.29.7': + '@babel/helper-module-imports@7.29.7(supports-color@8.1.1)': dependencies: - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-imports': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) '@babel/helper-validator-identifier': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -13371,27 +13372,27 @@ snapshots: '@babel/helper-plugin-utils@7.29.7': {} - '@babel/helper-remap-async-to-generator@7.29.7(@babel/core@7.29.7)': + '@babel/helper-remap-async-to-generator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-wrap-function': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/helper-wrap-function': 7.29.7(supports-color@8.1.1) + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.29.7(@babel/core@7.29.7)': + '@babel/helper-replace-supers@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-member-expression-to-functions': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-member-expression-to-functions': 7.29.7(supports-color@8.1.1) '@babel/helper-optimise-call-expression': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.29.7': + '@babel/helper-skip-transparent-expression-wrappers@7.29.7(supports-color@8.1.1)': dependencies: - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color @@ -13402,10 +13403,10 @@ snapshots: '@babel/helper-validator-option@7.29.7': {} - '@babel/helper-wrap-function@7.29.7': + '@babel/helper-wrap-function@7.29.7(supports-color@8.1.1)': dependencies: '@babel/template': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color @@ -13423,578 +13424,578 @@ snapshots: dependencies: '@babel/types': 7.29.7 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-safari-rest-destructuring-rhs-array@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 - '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/core@7.29.7) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) + '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.29.7)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.29.7)': + '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-import-assertions@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-syntax-import-assertions@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-import-attributes@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-syntax-import-attributes@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.29.7)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-arrow-functions@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-arrow-functions@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-async-generator-functions@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-async-generator-functions@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-remap-async-to-generator': 7.29.7(@babel/core@7.29.7) - '@babel/traverse': 7.29.7 + '@babel/helper-remap-async-to-generator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-async-to-generator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-imports': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-remap-async-to-generator': 7.29.7(@babel/core@7.29.7) + '@babel/helper-remap-async-to-generator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-block-scoped-functions@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-block-scoped-functions@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-block-scoping@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-block-scoping@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-class-properties@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-class-properties@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-class-static-block@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-classes@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-globals': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7) - '@babel/traverse': 7.29.7 + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-computed-properties@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-computed-properties@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/template': 7.29.7 - '@babel/plugin-transform-destructuring@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-destructuring@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-dotall-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-dotall-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-duplicate-keys@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-duplicate-keys@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-dynamic-import@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-dynamic-import@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-explicit-resource-management@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-explicit-resource-management@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-exponentiation-operator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-exponentiation-operator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-export-namespace-from@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-export-namespace-from@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-for-of@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-for-of@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-function-name@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-function-name@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-json-strings@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-json-strings@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-literals@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-literals@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-logical-assignment-operators@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-logical-assignment-operators@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-member-expression-literals@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-member-expression-literals@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-modules-amd@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-modules-amd@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-modules-commonjs@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-systemjs@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-modules-systemjs@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-umd@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-modules-umd@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-named-capturing-groups-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-new-target@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-new-target@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-nullish-coalescing-operator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-nullish-coalescing-operator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-numeric-separator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-numeric-separator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-object-rest-spread@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-object-rest-spread@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-parameters': 7.29.7(@babel/core@7.29.7) - '@babel/traverse': 7.29.7 + '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-parameters': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/traverse': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-object-super@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-object-super@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7) + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-optional-catch-binding@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-optional-catch-binding@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-optional-chaining@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-optional-chaining@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-parameters@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-parameters@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-private-methods@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-private-methods@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-private-property-in-object@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-property-literals@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-property-literals@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-react-constant-elements@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-constant-elements@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-react-display-name@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-display-name@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-react-jsx-development@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-jsx-development@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/plugin-transform-react-jsx': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/plugin-transform-react-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-jsx@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-jsx@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-module-imports': 7.29.7 + '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-pure-annotations@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-react-pure-annotations@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-regenerator@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-regenerator@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-regexp-modifiers@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-regexp-modifiers@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-reserved-words@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-reserved-words@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-runtime@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-runtime@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-module-imports': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - babel-plugin-polyfill-corejs2: 0.4.17(@babel/core@7.29.7) - babel-plugin-polyfill-corejs3: 0.13.0(@babel/core@7.29.7) - babel-plugin-polyfill-regenerator: 0.6.8(@babel/core@7.29.7) + babel-plugin-polyfill-corejs2: 0.4.17(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + babel-plugin-polyfill-corejs3: 0.13.0(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + babel-plugin-polyfill-regenerator: 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-shorthand-properties@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-shorthand-properties@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-spread@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-spread@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-sticky-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-sticky-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-template-literals@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-template-literals@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-typeof-symbol@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-typeof-symbol@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-typescript@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-typescript@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-annotate-as-pure': 7.29.7 - '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 - '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7(supports-color@8.1.1) + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-unicode-escapes@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-unicode-escapes@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-unicode-property-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-unicode-property-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-unicode-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-unicode-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-transform-unicode-sets-regex@7.29.7(@babel/core@7.29.7)': + '@babel/plugin-transform-unicode-sets-regex@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/helper-plugin-utils': 7.29.7 - '@babel/preset-env@7.29.7(@babel/core@7.29.7)': + '@babel/preset-env@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: '@babel/compat-data': 7.29.7 - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-compilation-targets': 7.29.7 '@babel/helper-plugin-utils': 7.29.7 '@babel/helper-validator-option': 7.29.7 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-safari-rest-destructuring-rhs-array': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.29.7) - '@babel/plugin-syntax-import-assertions': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-syntax-import-attributes': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.29.7) - '@babel/plugin-transform-arrow-functions': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-async-generator-functions': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-async-to-generator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-block-scoped-functions': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-block-scoping': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-class-properties': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-class-static-block': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-classes': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-computed-properties': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-dotall-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-duplicate-keys': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-dynamic-import': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-explicit-resource-management': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-exponentiation-operator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-export-namespace-from': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-for-of': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-function-name': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-json-strings': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-literals': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-logical-assignment-operators': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-member-expression-literals': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-amd': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-systemjs': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-umd': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-named-capturing-groups-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-new-target': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-nullish-coalescing-operator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-numeric-separator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-object-rest-spread': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-object-super': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-optional-catch-binding': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-parameters': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-private-methods': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-private-property-in-object': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-property-literals': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-regenerator': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-regexp-modifiers': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-reserved-words': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-shorthand-properties': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-spread': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-sticky-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-template-literals': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-typeof-symbol': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-unicode-escapes': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-unicode-property-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-unicode-regex': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-unicode-sets-regex': 7.29.7(@babel/core@7.29.7) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.29.7) - babel-plugin-polyfill-corejs2: 0.4.17(@babel/core@7.29.7) - babel-plugin-polyfill-corejs3: 0.14.2(@babel/core@7.29.7) - babel-plugin-polyfill-regenerator: 0.6.8(@babel/core@7.29.7) + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-bugfix-safari-rest-destructuring-rhs-array': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-syntax-import-assertions': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-syntax-import-attributes': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-arrow-functions': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-async-generator-functions': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-async-to-generator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-block-scoped-functions': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-block-scoping': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-class-properties': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-class-static-block': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-classes': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-computed-properties': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-destructuring': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-dotall-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-duplicate-keys': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-dynamic-import': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-explicit-resource-management': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-exponentiation-operator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-export-namespace-from': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-for-of': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-function-name': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-json-strings': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-literals': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-logical-assignment-operators': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-member-expression-literals': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-modules-amd': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-modules-systemjs': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-modules-umd': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-named-capturing-groups-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-new-target': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-nullish-coalescing-operator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-numeric-separator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-object-rest-spread': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-object-super': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-optional-catch-binding': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-parameters': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-private-methods': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-private-property-in-object': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-property-literals': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-regenerator': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-regexp-modifiers': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-reserved-words': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-shorthand-properties': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-spread': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-sticky-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-template-literals': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-typeof-symbol': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-unicode-escapes': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-unicode-property-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-unicode-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-unicode-sets-regex': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.29.7(supports-color@8.1.1)) + babel-plugin-polyfill-corejs2: 0.4.17(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + babel-plugin-polyfill-corejs3: 0.14.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + babel-plugin-polyfill-regenerator: 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) core-js-compat: 3.49.0 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.29.7)': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/types': 7.29.7 esutils: 2.0.3 - '@babel/preset-react@7.29.7(@babel/core@7.29.7)': + '@babel/preset-react@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/helper-validator-option': 7.29.7 - '@babel/plugin-transform-react-display-name': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-react-jsx': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-react-jsx-development': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-react-pure-annotations': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-react-display-name': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-react-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-react-jsx-development': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-react-pure-annotations': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) transitivePeerDependencies: - supports-color - '@babel/preset-typescript@7.29.7(@babel/core@7.29.7)': + '@babel/preset-typescript@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 '@babel/helper-validator-option': 7.29.7 - '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7) - '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -14006,19 +14007,19 @@ snapshots: '@babel/parser': 7.29.7 '@babel/types': 7.29.7 - '@babel/traverse@7.27.0': + '@babel/traverse@7.27.0(supports-color@8.1.1)': dependencies: '@babel/code-frame': 7.29.7 '@babel/generator': 7.29.7 '@babel/parser': 7.29.7 '@babel/template': 7.29.7 '@babel/types': 7.29.7 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/traverse@7.29.7': + '@babel/traverse@7.29.7(supports-color@8.1.1)': dependencies: '@babel/code-frame': 7.29.7 '@babel/generator': 7.29.7 @@ -14026,7 +14027,7 @@ snapshots: '@babel/parser': 7.29.7 '@babel/template': 7.29.7 '@babel/types': 7.29.7 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -14047,27 +14048,27 @@ snapshots: '@codemirror/autocomplete@6.20.3': dependencies: - '@codemirror/language': 6.12.3 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 '@lezer/common': 1.5.2 - '@codemirror/commands@6.10.3': + '@codemirror/commands@6.10.4': dependencies: - '@codemirror/language': 6.12.3 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 '@lezer/common': 1.5.2 '@codemirror/lang-json@6.0.2': dependencies: - '@codemirror/language': 6.12.3 + '@codemirror/language': 6.12.4 '@lezer/json': 1.0.3 - '@codemirror/language@6.12.3': + '@codemirror/language@6.12.4': dependencies: - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 '@lezer/common': 1.5.2 '@lezer/highlight': 1.2.3 '@lezer/lr': 1.4.10 @@ -14075,24 +14076,24 @@ snapshots: '@codemirror/lint@6.9.7': dependencies: - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 - crelt: 1.0.6 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 + crelt: 1.0.7 - '@codemirror/search@6.7.0': + '@codemirror/search@6.7.1': dependencies: - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 - crelt: 1.0.6 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 + crelt: 1.0.7 - '@codemirror/state@6.6.0': + '@codemirror/state@6.7.1': dependencies: - '@marijn/find-cluster-break': 1.0.2 + '@marijn/find-cluster-break': 1.0.3 - '@codemirror/view@6.43.1': + '@codemirror/view@6.43.7': dependencies: - '@codemirror/state': 6.6.0 - crelt: 1.0.6 + '@codemirror/state': 6.7.1 + crelt: 1.0.7 style-mod: 4.1.3 w3c-keyname: 2.2.8 @@ -14129,272 +14130,272 @@ snapshots: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-alpha-function@1.0.1(postcss@8.5.19)': + '@csstools/postcss-alpha-function@1.0.1(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-cascade-layers@5.0.2(postcss@8.5.19)': + '@csstools/postcss-cascade-layers@5.0.2(postcss@8.5.25)': dependencies: '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.4) - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - '@csstools/postcss-color-function-display-p3-linear@1.0.1(postcss@8.5.19)': + '@csstools/postcss-color-function-display-p3-linear@1.0.1(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-color-function@4.0.12(postcss@8.5.19)': + '@csstools/postcss-color-function@4.0.12(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-color-mix-function@3.0.12(postcss@8.5.19)': + '@csstools/postcss-color-mix-function@3.0.12(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-color-mix-variadic-function-arguments@1.0.2(postcss@8.5.19)': + '@csstools/postcss-color-mix-variadic-function-arguments@1.0.2(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-content-alt-text@2.0.8(postcss@8.5.19)': + '@csstools/postcss-content-alt-text@2.0.8(postcss@8.5.25)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-contrast-color-function@2.0.12(postcss@8.5.19)': + '@csstools/postcss-contrast-color-function@2.0.12(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-exponential-functions@2.0.9(postcss@8.5.19)': + '@csstools/postcss-exponential-functions@2.0.9(postcss@8.5.25)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-font-format-keywords@4.0.0(postcss@8.5.19)': + '@csstools/postcss-font-format-keywords@4.0.0(postcss@8.5.25)': dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - '@csstools/postcss-gamut-mapping@2.0.11(postcss@8.5.19)': + '@csstools/postcss-gamut-mapping@2.0.11(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-gradients-interpolation-method@5.0.12(postcss@8.5.19)': + '@csstools/postcss-gradients-interpolation-method@5.0.12(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-hwb-function@4.0.12(postcss@8.5.19)': + '@csstools/postcss-hwb-function@4.0.12(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-ic-unit@4.0.4(postcss@8.5.19)': + '@csstools/postcss-ic-unit@4.0.4(postcss@8.5.25)': dependencies: - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - '@csstools/postcss-initial@2.0.1(postcss@8.5.19)': + '@csstools/postcss-initial@2.0.1(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-is-pseudo-class@5.0.3(postcss@8.5.19)': + '@csstools/postcss-is-pseudo-class@5.0.3(postcss@8.5.25)': dependencies: '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.4) - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - '@csstools/postcss-light-dark-function@2.0.11(postcss@8.5.19)': + '@csstools/postcss-light-dark-function@2.0.11(postcss@8.5.25)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-logical-float-and-clear@3.0.0(postcss@8.5.19)': + '@csstools/postcss-logical-float-and-clear@3.0.0(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-logical-overflow@2.0.0(postcss@8.5.19)': + '@csstools/postcss-logical-overflow@2.0.0(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-logical-overscroll-behavior@2.0.0(postcss@8.5.19)': + '@csstools/postcss-logical-overscroll-behavior@2.0.0(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-logical-resize@3.0.0(postcss@8.5.19)': + '@csstools/postcss-logical-resize@3.0.0(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - '@csstools/postcss-logical-viewport-units@3.0.4(postcss@8.5.19)': + '@csstools/postcss-logical-viewport-units@3.0.4(postcss@8.5.25)': dependencies: '@csstools/css-tokenizer': 3.0.4 - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-media-minmax@2.0.9(postcss@8.5.19)': + '@csstools/postcss-media-minmax@2.0.9(postcss@8.5.25)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-media-queries-aspect-ratio-number-values@3.0.5(postcss@8.5.19)': + '@csstools/postcss-media-queries-aspect-ratio-number-values@3.0.5(postcss@8.5.25)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-nested-calc@4.0.0(postcss@8.5.19)': + '@csstools/postcss-nested-calc@4.0.0(postcss@8.5.25)': dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - '@csstools/postcss-normalize-display-values@4.0.1(postcss@8.5.19)': + '@csstools/postcss-normalize-display-values@4.0.1(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - '@csstools/postcss-oklab-function@4.0.12(postcss@8.5.19)': + '@csstools/postcss-oklab-function@4.0.12(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-position-area-property@1.0.0(postcss@8.5.19)': + '@csstools/postcss-position-area-property@1.0.0(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-progressive-custom-properties@4.2.1(postcss@8.5.19)': + '@csstools/postcss-progressive-custom-properties@4.2.1(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - '@csstools/postcss-property-rule-prelude-list@1.0.0(postcss@8.5.19)': + '@csstools/postcss-property-rule-prelude-list@1.0.0(postcss@8.5.25)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-random-function@2.0.1(postcss@8.5.19)': + '@csstools/postcss-random-function@2.0.1(postcss@8.5.25)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-relative-color-syntax@3.0.12(postcss@8.5.19)': + '@csstools/postcss-relative-color-syntax@3.0.12(postcss@8.5.25)': dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - '@csstools/postcss-scope-pseudo-class@4.0.1(postcss@8.5.19)': + '@csstools/postcss-scope-pseudo-class@4.0.1(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - '@csstools/postcss-sign-functions@1.1.4(postcss@8.5.19)': + '@csstools/postcss-sign-functions@1.1.4(postcss@8.5.25)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-stepped-value-functions@4.0.9(postcss@8.5.19)': + '@csstools/postcss-stepped-value-functions@4.0.9(postcss@8.5.25)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-syntax-descriptor-syntax-production@1.0.1(postcss@8.5.19)': + '@csstools/postcss-syntax-descriptor-syntax-production@1.0.1(postcss@8.5.25)': dependencies: '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-system-ui-font-family@1.0.0(postcss@8.5.19)': + '@csstools/postcss-system-ui-font-family@1.0.0(postcss@8.5.25)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-text-decoration-shorthand@4.0.3(postcss@8.5.19)': + '@csstools/postcss-text-decoration-shorthand@4.0.3(postcss@8.5.25)': dependencies: '@csstools/color-helpers': 5.1.0 - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - '@csstools/postcss-trigonometric-functions@4.0.9(postcss@8.5.19)': + '@csstools/postcss-trigonometric-functions@4.0.9(postcss@8.5.25)': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 - '@csstools/postcss-unset-value@4.0.0(postcss@8.5.19)': + '@csstools/postcss-unset-value@4.0.0(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 '@csstools/selector-resolve-nested@3.1.0(postcss-selector-parser@7.1.4)': dependencies: @@ -14404,47 +14405,47 @@ snapshots: dependencies: postcss-selector-parser: 7.1.4 - '@csstools/utilities@2.0.0(postcss@8.5.19)': + '@csstools/utilities@2.0.0(postcss@8.5.25)': dependencies: - postcss: 8.5.19 + postcss: 8.5.25 '@discoveryjs/json-ext@0.5.7': {} - '@docsearch/core@4.6.3(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docsearch/core@4.6.3(@types/react@19.2.17)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': optionalDependencies: '@types/react': 19.2.17 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) '@docsearch/css@4.6.3': {} - '@docsearch/react@4.6.3(@algolia/client-search@5.56.0)(@types/react@19.2.17)(algoliasearch@5.56.0)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3)': + '@docsearch/react@4.6.3(@algolia/client-search@5.56.0)(@types/react@19.2.17)(algoliasearch@5.56.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)': dependencies: '@algolia/autocomplete-core': 1.19.2(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3) - '@docsearch/core': 4.6.3(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docsearch/core': 4.6.3(@types/react@19.2.17)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@docsearch/css': 4.6.3 optionalDependencies: '@types/react': 19.2.17 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) search-insights: 2.17.3 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - '@docusaurus/babel@3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/babel@3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/generator': 7.29.7 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.29.7) - '@babel/plugin-transform-runtime': 7.29.7(@babel/core@7.29.7) - '@babel/preset-env': 7.29.7(@babel/core@7.29.7) - '@babel/preset-react': 7.29.7(@babel/core@7.29.7) - '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/plugin-transform-runtime': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-env': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-react': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) '@babel/runtime': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@docusaurus/logger': 3.10.2 - '@docusaurus/utils': 3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) babel-plugin-dynamic-import-node: 2.3.3 fs-extra: 11.3.6 tslib: 2.8.1 @@ -14466,66 +14467,32 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/babel@3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/bundler@3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(csso@5.0.5)(esbuild@0.28.1)(lightningcss@1.33.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@babel/core': 7.29.7 - '@babel/generator': 7.29.7 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.29.7) - '@babel/plugin-transform-runtime': 7.29.7(@babel/core@7.29.7) - '@babel/preset-env': 7.29.7(@babel/core@7.29.7) - '@babel/preset-react': 7.29.7(@babel/core@7.29.7) - '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7) - '@babel/runtime': 7.29.7 - '@babel/traverse': 7.29.7 - '@docusaurus/logger': 3.10.2 - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - babel-plugin-dynamic-import-node: 2.3.3 - fs-extra: 11.3.6 - tslib: 2.8.1 - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - react - - react-dom - - supports-color - - uglify-js - - webpack-cli - - '@docusaurus/bundler@3.10.2(@typescript/typescript6@6.0.2)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': - dependencies: - '@babel/core': 7.29.7 - '@docusaurus/babel': 3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@docusaurus/babel': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/cssnano-preset': 3.10.2 '@docusaurus/logger': 3.10.2 - '@docusaurus/types': 3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - babel-loader: 9.2.1(@babel/core@7.29.7)(webpack@5.108.4(postcss@8.5.19)) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + babel-loader: 9.2.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) clean-css: 5.3.3 - copy-webpack-plugin: 11.0.0(webpack@5.108.4(postcss@8.5.19)) - css-loader: 6.11.0(webpack@5.108.4(postcss@8.5.19)) - css-minimizer-webpack-plugin: 5.0.1(clean-css@5.3.3)(webpack@5.108.4(postcss@8.5.19)) - cssnano: 6.1.2(postcss@8.5.19) - file-loader: 6.2.0(webpack@5.108.4(postcss@8.5.19)) + copy-webpack-plugin: 11.0.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) + css-loader: 6.11.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) + css-minimizer-webpack-plugin: 5.0.1(clean-css@5.3.3)(csso@5.0.5)(esbuild@0.28.1)(lightningcss@1.33.0)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) + cssnano: 6.1.2(postcss@8.5.25) + file-loader: 6.2.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) html-minifier-terser: 7.2.0 - mini-css-extract-plugin: 2.10.2(webpack@5.108.4(postcss@8.5.19)) - null-loader: 4.0.1(webpack@5.108.4(postcss@8.5.19)) - postcss: 8.5.19 - postcss-loader: 7.3.4(@typescript/typescript6@6.0.2)(postcss@8.5.19)(webpack@5.108.4(postcss@8.5.19)) - postcss-preset-env: 10.6.1(postcss@8.5.19) - terser-webpack-plugin: 5.6.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(webpack@5.108.4(postcss@8.5.19)) + mini-css-extract-plugin: 2.10.2(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) + null-loader: 4.0.1(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) + postcss: 8.5.25 + postcss-loader: 7.3.4(@typescript/typescript6@6.0.2)(postcss@8.5.25)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) + postcss-preset-env: 10.6.1(postcss@8.5.25) + terser-webpack-plugin: 5.6.1(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) tslib: 2.8.1 - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(postcss@8.5.19)))(webpack@5.108.4(postcss@8.5.19)) - webpack: 5.108.4(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19) - webpackbar: 7.0.0(webpack@5.108.4(postcss@8.5.19)) + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)))(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) + webpackbar: 7.0.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) transitivePeerDependencies: - '@minify-html/node' - '@parcel/css' @@ -14543,16 +14510,16 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/core@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/core@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/babel': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/bundler': 3.10.2(@typescript/typescript6@6.0.2)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/babel': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/bundler': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(csso@5.0.5)(esbuild@0.28.1)(lightningcss@1.33.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/logger': 3.10.2 - '@docusaurus/mdx-loader': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@mdx-js/react': 3.1.1(@types/react@19.2.17)(react@19.2.7) + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@mdx-js/react': 3.1.1(@types/react@19.2.17)(react@19.2.8) boxen: 6.2.1 chalk: 4.1.2 chokidar: 3.6.0 @@ -14567,28 +14534,28 @@ snapshots: execa: 5.1.1 fs-extra: 11.3.6 html-tags: 3.3.1 - html-webpack-plugin: 5.6.7(webpack@5.108.4(postcss@8.5.19)) + html-webpack-plugin: 5.6.7(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) leven: 3.1.0 lodash: 4.18.1 open: 8.4.2 p-map: 4.0.0 prompts: 2.4.2 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)' - react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.7)' - react-loadable-ssr-addon-v5-slorber: 1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.7))(webpack@5.108.4(postcss@8.5.19)) - react-router: 5.3.4(react@19.2.7) - react-router-config: 5.1.1(react-router@5.3.4(react@19.2.7))(react@19.2.7) - react-router-dom: 5.3.4(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)' + react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.8)' + react-loadable-ssr-addon-v5-slorber: 1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.8))(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) + react-router: 5.3.4(react@19.2.8) + react-router-config: 5.1.1(react-router@5.3.4(react@19.2.8))(react@19.2.8) + react-router-dom: 5.3.4(react@19.2.8) semver: 7.8.5 serve-handler: 6.1.7 tinypool: 1.1.1 tslib: 2.8.1 update-notifier: 6.0.2 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) webpack-bundle-analyzer: 4.10.2 - webpack-dev-server: 5.2.6(tslib@2.8.1)(webpack@5.108.4(postcss@8.5.19)) + webpack-dev-server: 5.2.6(debug@4.4.3(supports-color@8.1.1))(supports-color@8.1.1)(tslib@2.8.1)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) webpack-merge: 6.0.1 transitivePeerDependencies: - '@minify-html/node' @@ -14614,9 +14581,9 @@ snapshots: '@docusaurus/cssnano-preset@3.10.2': dependencies: - cssnano-preset-advanced: 6.1.2(postcss@8.5.19) - postcss: 8.5.19 - postcss-sort-media-queries: 5.2.0(postcss@8.5.19) + cssnano-preset-advanced: 6.1.2(postcss@8.5.25) + postcss: 8.5.25 + postcss-sort-media-queries: 5.2.0(postcss@8.5.25) tslib: 2.8.1 '@docusaurus/logger@3.10.2': @@ -14624,34 +14591,34 @@ snapshots: chalk: 4.1.2 tslib: 2.8.1 - '@docusaurus/mdx-loader@3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/mdx-loader@3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: '@docusaurus/logger': 3.10.2 - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@mdx-js/mdx': 3.1.1 + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@mdx-js/mdx': 3.1.1(supports-color@8.1.1) '@slorber/remark-comment': 1.0.0 escape-html: 1.0.3 estree-util-value-to-estree: 3.5.0 - file-loader: 6.2.0(webpack@5.108.4(postcss@8.5.19)) + file-loader: 6.2.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) fs-extra: 11.3.6 image-size: 2.0.2 - mdast-util-mdx: 3.0.0 + mdast-util-mdx: 3.0.0(supports-color@8.1.1) mdast-util-to-string: 4.0.0 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) rehype-raw: 7.0.0 - remark-directive: 3.0.1 + remark-directive: 3.0.1(supports-color@8.1.1) remark-emoji: 4.0.1 - remark-frontmatter: 5.0.0 - remark-gfm: 4.0.1 + remark-frontmatter: 5.0.0(supports-color@8.1.1) + remark-gfm: 4.0.1(supports-color@8.1.1) stringify-object: 3.3.0 tslib: 2.8.1 unified: 11.0.5 unist-util-visit: 5.1.0 - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(postcss@8.5.19)))(webpack@5.108.4(postcss@8.5.19)) + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)))(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) vfile: 6.0.3 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) transitivePeerDependencies: - '@minify-html/node' - '@swc/core' @@ -14668,17 +14635,17 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/module-type-aliases@3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/module-type-aliases@3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@types/history': 4.7.11 '@types/react': 19.2.17 '@types/react-router-config': 5.0.11 '@types/react-router-dom': 5.3.3 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)' - react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.7)' + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)' + react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.8)' transitivePeerDependencies: - '@minify-html/node' - '@swc/core' @@ -14695,30 +14662,30 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/plugin-content-blog@3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-content-blog@3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/logger': 3.10.2 - '@docusaurus/mdx-loader': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) cheerio: 1.0.0-rc.12 combine-promises: 1.2.0 feed: 4.2.2 fs-extra: 11.3.6 lodash: 4.18.1 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) schema-dts: 1.1.5 srcset: 4.0.0 tslib: 2.8.1 unist-util-visit: 5.1.0 utility-types: 3.11.0 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) transitivePeerDependencies: - '@docusaurus/faster' - '@mdx-js/react' @@ -14743,28 +14710,28 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/logger': 3.10.2 - '@docusaurus/mdx-loader': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/module-type-aliases': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/module-type-aliases': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@types/react-router-config': 5.0.11 combine-promises: 1.2.0 fs-extra: 11.3.6 js-yaml: 4.3.0 lodash: 4.18.1 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) schema-dts: 1.1.5 tslib: 2.8.1 utility-types: 3.11.0 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) transitivePeerDependencies: - '@docusaurus/faster' - '@mdx-js/react' @@ -14789,18 +14756,18 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-content-pages@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-content-pages@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/mdx-loader': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) fs-extra: 11.3.6 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) transitivePeerDependencies: - '@docusaurus/faster' - '@mdx-js/react' @@ -14825,12 +14792,12 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-css-cascade-layers@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-css-cascade-layers@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -14858,15 +14825,15 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-debug@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-debug@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) fs-extra: 11.3.6 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-json-view-lite: 2.5.0(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-json-view-lite: 2.5.0(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -14892,13 +14859,13 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-google-analytics@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-google-analytics@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -14924,13 +14891,13 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-google-gtag@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-google-gtag@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -14956,13 +14923,13 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-google-tag-manager@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-google-tag-manager@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -14988,17 +14955,17 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-sitemap@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-sitemap@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/logger': 3.10.2 - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) fs-extra: 11.3.6 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) sitemap: 7.1.3 tslib: 2.8.1 transitivePeerDependencies: @@ -15025,18 +14992,18 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/plugin-svgr@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/plugin-svgr@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2) - '@svgr/webpack': 8.1.0(@typescript/typescript6@6.0.2) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@svgr/webpack': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) transitivePeerDependencies: - '@docusaurus/faster' - '@mdx-js/react' @@ -15061,25 +15028,25 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/preset-classic@3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3)': + '@docusaurus/preset-classic@3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-blog': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-pages': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-css-cascade-layers': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-debug': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-google-analytics': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-google-gtag': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-google-tag-manager': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-sitemap': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-svgr': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-classic': 3.10.2(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-search-algolia': 3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-blog': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-pages': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-css-cascade-layers': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-debug': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-google-analytics': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-google-gtag': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-google-tag-manager': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-sitemap': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-svgr': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-classic': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-search-algolia': 3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) transitivePeerDependencies: - '@algolia/client-search' - '@docusaurus/faster' @@ -15107,38 +15074,38 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/react-loadable@6.0.0(react@19.2.7)': + '@docusaurus/react-loadable@6.0.0(react@19.2.8)': dependencies: '@types/react': 19.2.17 - react: 19.2.7 + react: 19.2.8 - '@docusaurus/theme-classic@3.10.2(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/theme-classic@3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/logger': 3.10.2 - '@docusaurus/mdx-loader': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/module-type-aliases': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-blog': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-pages': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/module-type-aliases': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-blog': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-pages': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/theme-translations': 3.10.2 - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@mdx-js/react': 3.1.1(@types/react@19.2.17)(react@19.2.7) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@mdx-js/react': 3.1.1(@types/react@19.2.17)(react@19.2.8) clsx: 2.1.1 copy-text-to-clipboard: 3.2.2 infima: 0.2.0-alpha.45 lodash: 4.18.1 nprogress: 0.2.0 - postcss: 8.5.19 - prism-react-renderer: 2.4.1(react@19.2.7) + postcss: 8.5.25 + prism-react-renderer: 2.4.1(react@19.2.8) prismjs: 1.30.0 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-router-dom: 5.3.4(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-router-dom: 5.3.4(react@19.2.8) rtlcss: 4.3.0 tslib: 2.8.1 utility-types: 3.11.0 @@ -15165,21 +15132,21 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/theme-common@3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/theme-common@3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/mdx-loader': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/module-type-aliases': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/mdx-loader': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/module-type-aliases': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@types/history': 4.7.11 '@types/react': 19.2.17 '@types/react-router-config': 5.0.11 clsx: 2.1.1 parse-numeric-range: 1.3.0 - prism-react-renderer: 2.4.1(react@19.2.7) - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + prism-react-renderer: 2.4.1(react@19.2.8) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 utility-types: 3.11.0 transitivePeerDependencies: @@ -15198,16 +15165,16 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/theme-mermaid@3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/theme-mermaid@3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/module-type-aliases': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/module-type-aliases': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) mermaid: 11.16.0 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 transitivePeerDependencies: - '@docusaurus/faster' @@ -15234,25 +15201,25 @@ snapshots: - utf-8-validate - webpack-cli - '@docusaurus/theme-search-algolia@3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3)': + '@docusaurus/theme-search-algolia@3.10.2(@algolia/client-search@5.56.0)(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@types/react@19.2.17)(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: '@algolia/autocomplete-core': 1.19.9(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3) - '@docsearch/react': 4.6.3(@algolia/client-search@5.56.0)(@types/react@19.2.17)(algoliasearch@5.56.0)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(search-insights@2.17.3) - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docsearch/react': 4.6.3(@algolia/client-search@5.56.0)(@types/react@19.2.17)(algoliasearch@5.56.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(search-insights@2.17.3) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/logger': 3.10.2 - '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/plugin-content-docs': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/theme-common': 3.10.2(@docusaurus/plugin-content-docs@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) '@docusaurus/theme-translations': 3.10.2 - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-validation': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-validation': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) algoliasearch: 5.56.0 algoliasearch-helper: 3.29.2(algoliasearch@5.56.0) clsx: 2.1.1 eta: 2.2.0 fs-extra: 11.3.6 lodash: 4.18.1 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) tslib: 2.8.1 utility-types: 3.11.0 transitivePeerDependencies: @@ -15289,19 +15256,19 @@ snapshots: '@docusaurus/tsconfig@3.10.2': {} - '@docusaurus/types@3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/types@3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@mdx-js/mdx': 3.1.1 + '@mdx-js/mdx': 3.1.1(supports-color@8.1.1) '@types/history': 4.7.11 '@types/mdast': 4.0.4 '@types/react': 19.2.17 commander: 5.1.0 joi: 17.13.4 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)' + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) + react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)' utility-types: 3.11.0 - webpack: 5.108.4(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) webpack-merge: 5.10.0 transitivePeerDependencies: - '@minify-html/node' @@ -15319,39 +15286,9 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/types@3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/utils-common@3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: - '@mdx-js/mdx': 3.1.1 - '@types/history': 4.7.11 - '@types/mdast': 4.0.4 - '@types/react': 19.2.17 - commander: 5.1.0 - joi: 17.13.4 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) - react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)' - utility-types: 3.11.0 - webpack: 5.108.4(postcss@8.5.19) - webpack-merge: 5.10.0 - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - supports-color - - uglify-js - - webpack-cli - - '@docusaurus/utils-common@3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': - dependencies: - '@docusaurus/types': 3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) tslib: 2.8.1 transitivePeerDependencies: - '@minify-html/node' @@ -15371,33 +15308,11 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/utils-common@3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': - dependencies: - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - tslib: 2.8.1 - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - react - - react-dom - - supports-color - - uglify-js - - webpack-cli - - '@docusaurus/utils-validation@3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/utils-validation@3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: '@docusaurus/logger': 3.10.2 - '@docusaurus/utils': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/utils': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) fs-extra: 11.3.6 joi: 17.13.4 js-yaml: 4.3.0 @@ -15421,15 +15336,15 @@ snapshots: - uglify-js - webpack-cli - '@docusaurus/utils@3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@docusaurus/utils@3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3)': dependencies: '@11ty/gray-matter': 1.0.0 '@docusaurus/logger': 3.10.2 - '@docusaurus/types': 3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.2(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/types': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) + '@docusaurus/utils-common': 3.10.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) escape-string-regexp: 4.0.0 execa: 5.1.1 - file-loader: 6.2.0(webpack@5.108.4(postcss@8.5.19)) + file-loader: 6.2.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) fs-extra: 11.3.6 github-slugger: 1.5.0 globby: 11.1.0 @@ -15441,50 +15356,9 @@ snapshots: prompts: 2.4.2 resolve-pathname: 3.0.0 tslib: 2.8.1 - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(postcss@8.5.19)))(webpack@5.108.4(postcss@8.5.19)) + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)))(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) utility-types: 3.11.0 - webpack: 5.108.4(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19) - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - react - - react-dom - - supports-color - - uglify-js - - webpack-cli - - '@docusaurus/utils@3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': - dependencies: - '@11ty/gray-matter': 1.0.0 - '@docusaurus/logger': 3.10.2 - '@docusaurus/types': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@docusaurus/utils-common': 3.10.2(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - escape-string-regexp: 4.0.0 - execa: 5.1.1 - file-loader: 6.2.0(webpack@5.108.4(postcss@8.5.19)) - fs-extra: 11.3.6 - github-slugger: 1.5.0 - globby: 11.1.0 - jiti: 1.21.7 - js-yaml: 4.3.0 - lodash: 4.18.1 - micromatch: 4.0.8 - p-queue: 6.6.2 - prompts: 2.4.2 - resolve-pathname: 3.0.0 - tslib: 2.8.1 - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.108.4(postcss@8.5.19)))(webpack@5.108.4(postcss@8.5.19)) - utility-types: 3.11.0 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) transitivePeerDependencies: - '@minify-html/node' - '@swc/core' @@ -15744,22 +15618,22 @@ snapshots: '@esbuild/win32-x64@0.28.1': optional: true - '@eslint-community/eslint-utils@4.9.1(eslint@10.7.0(jiti@2.7.0))': + '@eslint-community/eslint-utils@4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))': dependencies: - eslint: 10.7.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.2': {} - '@eslint/config-array@0.23.5': + '@eslint/config-array@0.23.5(supports-color@8.1.1)': dependencies: '@eslint/object-schema': 3.0.5 - debug: 4.4.3 - minimatch: 10.2.5 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 10.2.6 transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.6.0': + '@eslint/config-helpers@0.7.0': dependencies: '@eslint/core': 1.2.1 @@ -15767,14 +15641,14 @@ snapshots: dependencies: '@types/json-schema': 7.0.15 - '@eslint/css-tree@4.0.4': + '@eslint/css-tree@4.0.5': dependencies: - mdn-data: 2.28.1 + mdn-data: 2.29.0 source-map-js: 1.2.1 - '@eslint/js@10.0.1(eslint@10.7.0(jiti@2.7.0))': + '@eslint/js@10.0.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))': optionalDependencies: - eslint: 10.7.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) '@eslint/object-schema@3.0.5': {} @@ -15794,18 +15668,18 @@ snapshots: '@fig/complete-commander@3.2.0(commander@11.1.0)': dependencies: commander: 11.1.0 - prettier: 3.9.5 + prettier: 3.9.6 - '@floating-ui/core@1.7.5': + '@floating-ui/core@1.8.0': dependencies: - '@floating-ui/utils': 0.2.11 + '@floating-ui/utils': 0.2.12 - '@floating-ui/dom@1.7.6': + '@floating-ui/dom@1.8.0': dependencies: - '@floating-ui/core': 1.7.5 - '@floating-ui/utils': 0.2.11 + '@floating-ui/core': 1.8.0 + '@floating-ui/utils': 0.2.12 - '@floating-ui/utils@0.2.11': {} + '@floating-ui/utils@0.2.12': {} '@formatjs/ecma402-abstract@2.3.6': dependencies: @@ -15841,20 +15715,20 @@ snapshots: dependencies: tslib: 2.8.1 - '@fortawesome/fontawesome-common-types@7.2.0': {} + '@fortawesome/fontawesome-common-types@7.3.1': {} - '@fortawesome/free-regular-svg-icons@7.2.0': + '@fortawesome/free-regular-svg-icons@7.3.1': dependencies: - '@fortawesome/fontawesome-common-types': 7.2.0 + '@fortawesome/fontawesome-common-types': 7.3.1 - '@fortawesome/free-solid-svg-icons@7.2.0': + '@fortawesome/free-solid-svg-icons@7.3.1': dependencies: - '@fortawesome/fontawesome-common-types': 7.2.0 + '@fortawesome/fontawesome-common-types': 7.3.1 - '@golevelup/nestjs-discovery@5.0.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)': + '@golevelup/nestjs-discovery@5.0.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)': dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) lodash: 4.18.1 '@grpc/grpc-js@1.14.4': @@ -16013,19 +15887,19 @@ snapshots: pg-connection-string: 2.14.0 postgres: 3.4.9 - '@immich/ui@0.83.0(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.5(@typescript-eslint/types@8.64.0))': + '@immich/ui@0.83.0(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.65.0))': dependencies: '@internationalized/date': 3.12.2 '@mdi/js': 7.4.47 - '@sveltejs/kit': 2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) - bits-ui: 2.18.1(@internationalized/date@3.12.2)(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + '@sveltejs/kit': 2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + bits-ui: 2.18.1(@internationalized/date@3.12.2)(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.65.0)) luxon: 3.7.2 - simple-icons: 16.26.0 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + simple-icons: 16.27.1 + svelte: 5.56.8(@typescript-eslint/types@8.65.0) svelte-highlight: 7.11.0 tailwind-merge: 3.6.0 - tailwind-variants: 3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.2) - tailwindcss: 4.3.2 + tailwind-variants: 3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.3) + tailwindcss: 4.3.3 '@inquirer/ansi@1.0.2': {} @@ -16367,9 +16241,9 @@ snapshots: dependencies: vary: 1.1.2 - '@koa/router@15.7.0(koa@3.2.1)': + '@koa/router@15.7.0(koa@3.2.1)(supports-color@8.1.1)': dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) http-errors: 2.0.1 koa: 3.2.1 koa-compose: 4.1.0 @@ -16377,20 +16251,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@koddsson/eslint-plugin-tscompat@0.2.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': + '@koddsson/eslint-plugin-tscompat@0.2.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: '@mdn/browser-compat-data': 6.1.5 - '@typescript-eslint/type-utils': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - '@typescript-eslint/utils': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) + '@typescript-eslint/type-utils': 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/utils': 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) browserslist: 4.28.6 transitivePeerDependencies: - eslint - supports-color - typescript - '@kwsites/file-exists@1.1.1': + '@kwsites/file-exists@1.1.1(supports-color@8.1.1)': dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -16418,10 +16292,10 @@ snapshots: '@mapbox/mapbox-gl-rtl-text@0.4.0': {} - '@mapbox/node-pre-gyp@1.0.11': + '@mapbox/node-pre-gyp@1.0.11(supports-color@8.1.1)': dependencies: detect-libc: 2.1.2 - https-proxy-agent: 5.0.1 + https-proxy-agent: 5.0.1(supports-color@8.1.1) make-dir: 3.1.0 node-fetch: 2.7.0 nopt: 5.0.0 @@ -16472,7 +16346,7 @@ snapshots: '@types/geojson': 7946.0.16 pbf: 5.1.0 - '@marijn/find-cluster-break@1.0.2': {} + '@marijn/find-cluster-break@1.0.3': {} '@mdi/js@7.4.47': {} @@ -16484,26 +16358,26 @@ snapshots: '@mdn/browser-compat-data@6.1.5': {} - '@mdx-js/mdx@3.1.1': + '@mdx-js/mdx@3.1.1(supports-color@8.1.1)': dependencies: '@types/estree': 1.0.9 '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 '@types/mdx': 2.0.14 - acorn: 8.17.0 + acorn: 8.18.0 collapse-white-space: 2.1.0 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 estree-util-scope: 1.0.0 estree-walker: 3.0.3 - hast-util-to-jsx-runtime: 2.3.6 + hast-util-to-jsx-runtime: 2.3.6(supports-color@8.1.1) markdown-extensions: 2.0.0 recma-build-jsx: 1.0.0 - recma-jsx: 1.0.1(acorn@8.17.0) + recma-jsx: 1.0.1(acorn@8.18.0) recma-stringify: 1.0.0 - rehype-recma: 1.0.0 - remark-mdx: 3.1.1 - remark-parse: 11.0.0 + rehype-recma: 1.0.0(supports-color@8.1.1) + remark-mdx: 3.1.1(supports-color@8.1.1) + remark-parse: 11.0.0(supports-color@8.1.1) remark-rehype: 11.1.2 source-map: 0.7.6 unified: 11.0.5 @@ -16514,11 +16388,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7)': + '@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8)': dependencies: '@types/mdx': 2.0.14 '@types/react': 19.2.17 - react: 19.2.7 + react: 19.2.8 '@mermaid-js/parser@1.2.0': dependencies: @@ -16553,42 +16427,42 @@ snapshots: '@tybys/wasm-util': 0.10.3 optional: true - '@nestjs/bull-shared@11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)': + '@nestjs/bull-shared@11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)': dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) tslib: 2.8.1 - '@nestjs/bullmq@11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(bullmq@5.80.5)': + '@nestjs/bullmq@11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(bullmq@5.81.2(supports-color@8.1.1))': dependencies: - '@nestjs/bull-shared': 11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28) - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) - bullmq: 5.80.5 + '@nestjs/bull-shared': 11.0.4(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + bullmq: 5.81.2(supports-color@8.1.1) tslib: 2.8.1 - '@nestjs/cli@11.0.24(@swc/core@1.15.43(@swc/helpers@0.5.23))(@types/node@24.13.3)(esbuild@0.28.1)(lightningcss@1.33.0)(prettier@3.9.5)': + '@nestjs/cli@11.0.24(@swc/core@1.15.46(@swc/helpers@0.5.23))(@types/node@24.13.3)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(prettier@3.9.6)(uglify-js@3.19.3)': dependencies: '@angular-devkit/core': 19.2.27(chokidar@4.0.3) '@angular-devkit/schematics': 19.2.27(chokidar@4.0.3) '@angular-devkit/schematics-cli': 19.2.27(@types/node@24.13.3)(chokidar@4.0.3) '@inquirer/prompts': 7.10.1(@types/node@24.13.3) - '@nestjs/schematics': 11.1.0(chokidar@4.0.3)(prettier@3.9.5)(typescript@5.9.3) + '@nestjs/schematics': 11.1.0(chokidar@4.0.3)(prettier@3.9.6)(typescript@5.9.3) ansis: 4.2.0 chokidar: 4.0.3 cli-table3: 0.6.5 commander: 4.1.1 - fork-ts-checker-webpack-plugin: 9.1.0(typescript@5.9.3)(webpack@5.106.2(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0)) + fork-ts-checker-webpack-plugin: 9.1.0(typescript@5.9.3)(webpack@5.106.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) glob: 13.0.6 node-emoji: 1.11.0 ora: 5.4.1 tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.2.0 typescript: 5.9.3 - webpack: 5.106.2(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0) + webpack: 5.106.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) webpack-node-externals: 3.0.0 optionalDependencies: - '@swc/core': 1.15.43(@swc/helpers@0.5.23) + '@swc/core': 1.15.46(@swc/helpers@0.5.23) transitivePeerDependencies: - '@minify-html/node' - '@swc/css' @@ -16605,9 +16479,9 @@ snapshots: - uglify-js - webpack-cli - '@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1)': dependencies: - file-type: 21.3.4 + file-type: 21.3.4(supports-color@8.1.1) iterare: 1.2.1 load-esm: 1.0.3 reflect-metadata: 0.2.2 @@ -16617,9 +16491,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@nestjs/core@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/core@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) fast-safe-stringify: 2.1.1 iterare: 1.2.1 path-to-regexp: 8.4.2 @@ -16628,45 +16502,45 @@ snapshots: tslib: 2.8.1 uid: 2.0.2 optionalDependencies: - '@nestjs/platform-express': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28) - '@nestjs/websockets': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/platform-express': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(supports-color@8.1.1) + '@nestjs/websockets': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/mapped-types@2.1.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)': + '@nestjs/mapped-types@2.1.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(reflect-metadata@0.2.2)': dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) reflect-metadata: 0.2.2 - '@nestjs/platform-express@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)': + '@nestjs/platform-express@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(supports-color@8.1.1)': dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) cors: 2.8.6 - express: 5.2.1 + express: 5.2.1(supports-color@8.1.1) multer: 2.2.0 path-to-regexp: 8.4.2 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@nestjs/platform-socket.io@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.28)(rxjs@7.8.2)': + '@nestjs/platform-socket.io@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/websockets@11.1.28)(rxjs@7.8.2)(supports-color@8.1.1)': dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/websockets': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/websockets': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) rxjs: 7.8.2 - socket.io: 4.8.3 + socket.io: 4.8.3(supports-color@8.1.1) tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - '@nestjs/schedule@6.1.3(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)': + '@nestjs/schedule@6.1.3(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)': dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) cron: 4.4.0 - '@nestjs/schematics@11.1.0(@typescript/typescript6@6.0.2)(chokidar@4.0.3)(prettier@3.9.5)': + '@nestjs/schematics@11.1.0(@typescript/typescript6@6.0.2)(chokidar@4.0.3)(prettier@3.9.6)': dependencies: '@angular-devkit/core': 19.2.24(chokidar@4.0.3) '@angular-devkit/schematics': 19.2.24(chokidar@4.0.3) @@ -16675,11 +16549,11 @@ snapshots: pluralize: 8.0.0 typescript: '@typescript/typescript6@6.0.2' optionalDependencies: - prettier: 3.9.5 + prettier: 3.9.6 transitivePeerDependencies: - chokidar - '@nestjs/schematics@11.1.0(chokidar@4.0.3)(prettier@3.9.5)(typescript@5.9.3)': + '@nestjs/schematics@11.1.0(chokidar@4.0.3)(prettier@3.9.6)(typescript@5.9.3)': dependencies: '@angular-devkit/core': 19.2.24(chokidar@4.0.3) '@angular-devkit/schematics': 19.2.24(chokidar@4.0.3) @@ -16688,42 +16562,42 @@ snapshots: pluralize: 8.0.0 typescript: 5.9.3 optionalDependencies: - prettier: 3.9.5 + prettier: 3.9.6 transitivePeerDependencies: - chokidar - '@nestjs/swagger@11.4.5(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2)': + '@nestjs/swagger@11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2)': dependencies: '@microsoft/tsdoc': 0.16.0 - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/mapped-types': 2.1.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2) - js-yaml: 4.3.0 + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/mapped-types': 2.1.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(reflect-metadata@0.2.2) + js-yaml: 5.2.1 lodash: 4.18.1 path-to-regexp: 8.4.2 reflect-metadata: 0.2.2 swagger-ui-dist: 5.32.8 typescript: '@typescript/typescript6@6.0.2' - '@nestjs/testing@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@nestjs/platform-express@11.1.28)': + '@nestjs/testing@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-express@11.1.28)': dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) tslib: 2.8.1 optionalDependencies: - '@nestjs/platform-express': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28) + '@nestjs/platform-express': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(supports-color@8.1.1) - '@nestjs/websockets@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/websockets@11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@nestjs/platform-socket.io@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) iterare: 1.2.1 object-hash: 3.0.0 reflect-metadata: 0.2.2 rxjs: 7.8.2 tslib: 2.8.1 optionalDependencies: - '@nestjs/platform-socket.io': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.28)(rxjs@7.8.2) + '@nestjs/platform-socket.io': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/websockets@11.1.28)(rxjs@7.8.2)(supports-color@8.1.1) '@noble/hashes@1.4.0': {} @@ -16745,125 +16619,108 @@ snapshots: '@oazapfts/runtime@1.2.0': {} - '@opentelemetry/api-logs@0.220.0': + '@opentelemetry/api-logs@0.221.0': dependencies: '@opentelemetry/api': 1.9.1 '@opentelemetry/api@1.9.1': {} - '@opentelemetry/configuration@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/configuration@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) yaml: 2.9.0 - '@opentelemetry/context-async-hooks@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/context-async-hooks@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/core@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/exporter-logs-otlp-grpc@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-logs-otlp-grpc@0.221.0(@opentelemetry/api@1.9.1)': dependencies: - '@grpc/grpc-js': 1.14.4 '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.220.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-grpc-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-http@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-logs-otlp-http@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.220.0 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.220.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-proto@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-logs-otlp-proto@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.220.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-grpc@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-metrics-otlp-grpc@0.221.0(@opentelemetry/api@1.9.1)': dependencies: - '@grpc/grpc-js': 1.14.4 '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-http': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-grpc-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-http@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-metrics-otlp-http@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-proto@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-metrics-otlp-proto@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-http': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-prometheus@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-prometheus@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/exporter-trace-otlp-grpc@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-trace-otlp-grpc@0.221.0(@opentelemetry/api@1.9.1)': dependencies: - '@grpc/grpc-js': 1.14.4 '@opentelemetry/api': 1.9.1 - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-grpc-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-http@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-trace-otlp-http@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-proto@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-trace-otlp-proto@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-zipkin@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/exporter-zipkin@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/semantic-conventions': 1.43.0 '@opentelemetry/host-metrics@0.38.3(@opentelemetry/api@1.9.1)': @@ -16871,38 +16728,38 @@ snapshots: '@opentelemetry/api': 1.9.1 systeminformation: 5.31.17 - '@opentelemetry/instrumentation-http@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation-http@0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/instrumentation': 0.220.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/semantic-conventions': 1.43.0 forwarded-parse: 2.1.2 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-ioredis@0.68.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation-ioredis@0.69.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/instrumentation': 0.220.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/redis-common': 0.38.3 '@opentelemetry/semantic-conventions': 1.43.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-nestjs-core@0.66.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation-nestjs-core@0.67.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/instrumentation': 0.220.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/semantic-conventions': 1.43.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-pg@0.72.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation-pg@0.73.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/instrumentation': 0.220.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) '@opentelemetry/semantic-conventions': 1.43.0 '@opentelemetry/sql-common': 0.42.0(@opentelemetry/api@1.9.1) '@types/pg': 8.15.6 @@ -16910,124 +16767,124 @@ snapshots: transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/instrumentation@0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.220.0 + '@opentelemetry/api-logs': 0.221.0 import-in-the-middle: 3.0.2 - require-in-the-middle: 8.0.1 + require-in-the-middle: 8.0.1(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@opentelemetry/otlp-exporter-base@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/otlp-exporter-base@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/otlp-grpc-exporter-base@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@grpc/grpc-js': 1.14.4 '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer': 0.220.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-transformer': 0.221.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-transformer@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/otlp-transformer@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.220.0 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/api-logs': 0.221.0 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/propagator-b3@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/propagator-b3@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/propagator-jaeger@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/propagator-jaeger@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/redis-common@0.38.3': {} - '@opentelemetry/resources@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/resources@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/sdk-logs@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-logs@0.221.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.220.0 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/api-logs': 0.221.0 + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/sdk-metrics@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-metrics@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-node@0.220.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-node@0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.220.0 - '@opentelemetry/configuration': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/context-async-hooks': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-grpc': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-http': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-logs-otlp-proto': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-grpc': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-http': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-metrics-otlp-proto': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-prometheus': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-grpc': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-http': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-trace-otlp-proto': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/exporter-zipkin': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/instrumentation': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/otlp-grpc-exporter-base': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/propagator-b3': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/propagator-jaeger': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-logs': 0.220.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-metrics': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-node': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/api-logs': 0.221.0 + '@opentelemetry/configuration': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/context-async-hooks': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-logs-otlp-grpc': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-logs-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-logs-otlp-proto': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-grpc': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-metrics-otlp-proto': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-prometheus': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-trace-otlp-grpc': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-trace-otlp-http': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-trace-otlp-proto': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/exporter-zipkin': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@8.1.1) + '@opentelemetry/otlp-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/otlp-grpc-exporter-base': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/propagator-b3': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/propagator-jaeger': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-logs': 0.221.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-metrics': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-base': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-node': 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/semantic-conventions': 1.43.0 transitivePeerDependencies: - supports-color - '@opentelemetry/sdk-trace-base@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-trace-base@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/semantic-conventions': 1.43.0 - '@opentelemetry/sdk-trace-node@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-trace-node@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/context-async-hooks': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/context-async-hooks': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/sdk-trace-base': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace@2.9.0(@opentelemetry/api@1.9.1)': + '@opentelemetry/sdk-trace@2.10.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) + '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) '@opentelemetry/semantic-conventions': 1.43.0 '@opentelemetry/semantic-conventions@1.43.0': {} @@ -17035,7 +16892,7 @@ snapshots: '@opentelemetry/sql-common@0.42.0(@opentelemetry/api@1.9.1)': dependencies: '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.9.0(@opentelemetry/api@1.9.1) + '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) '@oxc-project/types@0.139.0': {} @@ -17198,32 +17055,32 @@ snapshots: tslib: 2.8.1 tsyringe: 4.10.0 - '@photo-sphere-viewer/core@5.14.3': + '@photo-sphere-viewer/core@5.15.0': dependencies: - three: 0.184.0 - - '@photo-sphere-viewer/equirectangular-video-adapter@5.14.3(@photo-sphere-viewer/core@5.14.3)(@photo-sphere-viewer/video-plugin@5.14.3(@photo-sphere-viewer/core@5.14.3))': - dependencies: - '@photo-sphere-viewer/core': 5.14.3 - '@photo-sphere-viewer/video-plugin': 5.14.3(@photo-sphere-viewer/core@5.14.3) three: 0.185.1 - '@photo-sphere-viewer/markers-plugin@5.14.3(@photo-sphere-viewer/core@5.14.3)': + '@photo-sphere-viewer/equirectangular-video-adapter@5.15.0(@photo-sphere-viewer/core@5.15.0)(@photo-sphere-viewer/video-plugin@5.15.0(@photo-sphere-viewer/core@5.15.0))': dependencies: - '@photo-sphere-viewer/core': 5.14.3 + '@photo-sphere-viewer/core': 5.15.0 + '@photo-sphere-viewer/video-plugin': 5.15.0(@photo-sphere-viewer/core@5.15.0) + three: 0.185.1 - '@photo-sphere-viewer/resolution-plugin@5.14.3(@photo-sphere-viewer/core@5.14.3)(@photo-sphere-viewer/settings-plugin@5.14.3(@photo-sphere-viewer/core@5.14.3))': + '@photo-sphere-viewer/markers-plugin@5.15.0(@photo-sphere-viewer/core@5.15.0)': dependencies: - '@photo-sphere-viewer/core': 5.14.3 - '@photo-sphere-viewer/settings-plugin': 5.14.3(@photo-sphere-viewer/core@5.14.3) + '@photo-sphere-viewer/core': 5.15.0 - '@photo-sphere-viewer/settings-plugin@5.14.3(@photo-sphere-viewer/core@5.14.3)': + '@photo-sphere-viewer/resolution-plugin@5.15.0(@photo-sphere-viewer/core@5.15.0)(@photo-sphere-viewer/settings-plugin@5.15.0(@photo-sphere-viewer/core@5.15.0))': dependencies: - '@photo-sphere-viewer/core': 5.14.3 + '@photo-sphere-viewer/core': 5.15.0 + '@photo-sphere-viewer/settings-plugin': 5.15.0(@photo-sphere-viewer/core@5.15.0) - '@photo-sphere-viewer/video-plugin@5.14.3(@photo-sphere-viewer/core@5.14.3)': + '@photo-sphere-viewer/settings-plugin@5.15.0(@photo-sphere-viewer/core@5.15.0)': dependencies: - '@photo-sphere-viewer/core': 5.14.3 + '@photo-sphere-viewer/core': 5.15.0 + + '@photo-sphere-viewer/video-plugin@5.15.0(@photo-sphere-viewer/core@5.15.0)': + dependencies: + '@photo-sphere-viewer/core': 5.15.0 three: 0.185.1 '@photostructure/tz-lookup@11.5.0': {} @@ -17233,9 +17090,9 @@ snapshots: '@pkgr/core@0.3.6': {} - '@playwright/test@1.61.1': + '@playwright/test@1.62.0': dependencies: - playwright: 1.61.1 + playwright: 1.62.0 '@pnpm/config.env-replace@1.1.0': {} @@ -17271,144 +17128,144 @@ snapshots: '@protobufjs/utf8@1.1.2': {} - '@react-email/body@0.3.0(react@19.2.7)': + '@react-email/body@0.3.0(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/button@0.2.1(react@19.2.7)': + '@react-email/button@0.2.1(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/code-block@0.2.1(react@19.2.7)': + '@react-email/code-block@0.2.1(react@19.2.8)': dependencies: prismjs: 1.30.0 - react: 19.2.7 + react: 19.2.8 - '@react-email/code-inline@0.0.6(react@19.2.7)': + '@react-email/code-inline@0.0.6(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/column@0.0.14(react@19.2.7)': + '@react-email/column@0.0.14(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/components@1.0.12(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@react-email/components@1.0.12(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: - '@react-email/body': 0.3.0(react@19.2.7) - '@react-email/button': 0.2.1(react@19.2.7) - '@react-email/code-block': 0.2.1(react@19.2.7) - '@react-email/code-inline': 0.0.6(react@19.2.7) - '@react-email/column': 0.0.14(react@19.2.7) - '@react-email/container': 0.0.16(react@19.2.7) - '@react-email/font': 0.0.10(react@19.2.7) - '@react-email/head': 0.0.13(react@19.2.7) - '@react-email/heading': 0.0.16(react@19.2.7) - '@react-email/hr': 0.0.12(react@19.2.7) - '@react-email/html': 0.0.12(react@19.2.7) - '@react-email/img': 0.0.12(react@19.2.7) - '@react-email/link': 0.0.13(react@19.2.7) - '@react-email/markdown': 0.0.18(react@19.2.7) - '@react-email/preview': 0.0.14(react@19.2.7) - '@react-email/render': 2.0.6(react-dom@19.2.7(react@19.2.7))(react@19.2.7) - '@react-email/row': 0.0.13(react@19.2.7) - '@react-email/section': 0.0.17(react@19.2.7) - '@react-email/tailwind': 2.0.7(@react-email/body@0.3.0(react@19.2.7))(@react-email/button@0.2.1(react@19.2.7))(@react-email/code-block@0.2.1(react@19.2.7))(@react-email/code-inline@0.0.6(react@19.2.7))(@react-email/container@0.0.16(react@19.2.7))(@react-email/heading@0.0.16(react@19.2.7))(@react-email/hr@0.0.12(react@19.2.7))(@react-email/img@0.0.12(react@19.2.7))(@react-email/link@0.0.13(react@19.2.7))(@react-email/preview@0.0.14(react@19.2.7))(@react-email/text@0.1.6(react@19.2.7))(react@19.2.7) - '@react-email/text': 0.1.6(react@19.2.7) - react: 19.2.7 + '@react-email/body': 0.3.0(react@19.2.8) + '@react-email/button': 0.2.1(react@19.2.8) + '@react-email/code-block': 0.2.1(react@19.2.8) + '@react-email/code-inline': 0.0.6(react@19.2.8) + '@react-email/column': 0.0.14(react@19.2.8) + '@react-email/container': 0.0.16(react@19.2.8) + '@react-email/font': 0.0.10(react@19.2.8) + '@react-email/head': 0.0.13(react@19.2.8) + '@react-email/heading': 0.0.16(react@19.2.8) + '@react-email/hr': 0.0.12(react@19.2.8) + '@react-email/html': 0.0.12(react@19.2.8) + '@react-email/img': 0.0.12(react@19.2.8) + '@react-email/link': 0.0.13(react@19.2.8) + '@react-email/markdown': 0.0.18(react@19.2.8) + '@react-email/preview': 0.0.14(react@19.2.8) + '@react-email/render': 2.0.6(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + '@react-email/row': 0.0.13(react@19.2.8) + '@react-email/section': 0.0.17(react@19.2.8) + '@react-email/tailwind': 2.0.7(@react-email/body@0.3.0(react@19.2.8))(@react-email/button@0.2.1(react@19.2.8))(@react-email/code-block@0.2.1(react@19.2.8))(@react-email/code-inline@0.0.6(react@19.2.8))(@react-email/container@0.0.16(react@19.2.8))(@react-email/heading@0.0.16(react@19.2.8))(@react-email/hr@0.0.12(react@19.2.8))(@react-email/img@0.0.12(react@19.2.8))(@react-email/link@0.0.13(react@19.2.8))(@react-email/preview@0.0.14(react@19.2.8))(@react-email/text@0.1.6(react@19.2.8))(react@19.2.8) + '@react-email/text': 0.1.6(react@19.2.8) + react: 19.2.8 transitivePeerDependencies: - react-dom - '@react-email/container@0.0.16(react@19.2.7)': + '@react-email/container@0.0.16(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/font@0.0.10(react@19.2.7)': + '@react-email/font@0.0.10(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/head@0.0.13(react@19.2.7)': + '@react-email/head@0.0.13(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/heading@0.0.16(react@19.2.7)': + '@react-email/heading@0.0.16(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/hr@0.0.12(react@19.2.7)': + '@react-email/hr@0.0.12(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/html@0.0.12(react@19.2.7)': + '@react-email/html@0.0.12(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/img@0.0.12(react@19.2.7)': + '@react-email/img@0.0.12(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/link@0.0.13(react@19.2.7)': + '@react-email/link@0.0.13(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/markdown@0.0.18(react@19.2.7)': + '@react-email/markdown@0.0.18(react@19.2.8)': dependencies: marked: 15.0.12 - react: 19.2.7 + react: 19.2.8 - '@react-email/preview@0.0.14(react@19.2.7)': + '@react-email/preview@0.0.14(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/render@2.0.6(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@react-email/render@2.0.6(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: html-to-text: 9.0.5 - prettier: 3.9.5 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + prettier: 3.9.6 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) - '@react-email/render@2.1.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@react-email/render@2.1.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: entities: 4.5.0 html-to-text: 9.0.5 html5parser: 3.0.0 - prettier: 3.9.5 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + prettier: 3.9.6 + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) - '@react-email/row@0.0.13(react@19.2.7)': + '@react-email/row@0.0.13(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/section@0.0.17(react@19.2.7)': + '@react-email/section@0.0.17(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@react-email/tailwind@2.0.7(@react-email/body@0.3.0(react@19.2.7))(@react-email/button@0.2.1(react@19.2.7))(@react-email/code-block@0.2.1(react@19.2.7))(@react-email/code-inline@0.0.6(react@19.2.7))(@react-email/container@0.0.16(react@19.2.7))(@react-email/heading@0.0.16(react@19.2.7))(@react-email/hr@0.0.12(react@19.2.7))(@react-email/img@0.0.12(react@19.2.7))(@react-email/link@0.0.13(react@19.2.7))(@react-email/preview@0.0.14(react@19.2.7))(@react-email/text@0.1.6(react@19.2.7))(react@19.2.7)': + '@react-email/tailwind@2.0.7(@react-email/body@0.3.0(react@19.2.8))(@react-email/button@0.2.1(react@19.2.8))(@react-email/code-block@0.2.1(react@19.2.8))(@react-email/code-inline@0.0.6(react@19.2.8))(@react-email/container@0.0.16(react@19.2.8))(@react-email/heading@0.0.16(react@19.2.8))(@react-email/hr@0.0.12(react@19.2.8))(@react-email/img@0.0.12(react@19.2.8))(@react-email/link@0.0.13(react@19.2.8))(@react-email/preview@0.0.14(react@19.2.8))(@react-email/text@0.1.6(react@19.2.8))(react@19.2.8)': dependencies: - '@react-email/text': 0.1.6(react@19.2.7) - react: 19.2.7 - tailwindcss: 4.3.2 + '@react-email/text': 0.1.6(react@19.2.8) + react: 19.2.8 + tailwindcss: 4.3.3 optionalDependencies: - '@react-email/body': 0.3.0(react@19.2.7) - '@react-email/button': 0.2.1(react@19.2.7) - '@react-email/code-block': 0.2.1(react@19.2.7) - '@react-email/code-inline': 0.0.6(react@19.2.7) - '@react-email/container': 0.0.16(react@19.2.7) - '@react-email/heading': 0.0.16(react@19.2.7) - '@react-email/hr': 0.0.12(react@19.2.7) - '@react-email/img': 0.0.12(react@19.2.7) - '@react-email/link': 0.0.13(react@19.2.7) - '@react-email/preview': 0.0.14(react@19.2.7) + '@react-email/body': 0.3.0(react@19.2.8) + '@react-email/button': 0.2.1(react@19.2.8) + '@react-email/code-block': 0.2.1(react@19.2.8) + '@react-email/code-inline': 0.0.6(react@19.2.8) + '@react-email/container': 0.0.16(react@19.2.8) + '@react-email/heading': 0.0.16(react@19.2.8) + '@react-email/hr': 0.0.12(react@19.2.8) + '@react-email/img': 0.0.12(react@19.2.8) + '@react-email/link': 0.0.13(react@19.2.8) + '@react-email/preview': 0.0.14(react@19.2.8) - '@react-email/text@0.1.6(react@19.2.7)': + '@react-email/text@0.1.6(react@19.2.8)': dependencies: - react: 19.2.7 + react: 19.2.8 - '@replit/codemirror-indentation-markers@6.5.3(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.43.1)': + '@replit/codemirror-indentation-markers@6.5.3(@codemirror/language@6.12.4)(@codemirror/state@6.7.1)(@codemirror/view@6.43.7)': dependencies: - '@codemirror/language': 6.12.3 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 '@rolldown/binding-android-arm64@1.1.5': optional: true @@ -17565,13 +17422,13 @@ snapshots: '@sindresorhus/is@5.6.0': {} - '@slorber/react-helmet-async@1.3.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + '@slorber/react-helmet-async@1.3.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: '@babel/runtime': 7.29.7 invariant: 2.2.4 prop-types: 15.8.1 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) react-fast-compare: 3.2.2 shallowequal: 1.1.0 @@ -17583,11 +17440,11 @@ snapshots: '@socket.io/component-emitter@3.1.2': {} - '@socket.io/redis-adapter@8.3.0(socket.io-adapter@2.5.7)': + '@socket.io/redis-adapter@8.3.0(socket.io-adapter@2.5.7(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) notepack.io: 3.0.1 - socket.io-adapter: 2.5.7 + socket.io-adapter: 2.5.7(supports-color@8.1.1) uid2: 1.0.0 transitivePeerDependencies: - supports-color @@ -17596,107 +17453,107 @@ snapshots: '@standard-schema/spec@1.1.0': {} - '@sveltejs/acorn-typescript@1.0.11(acorn@8.17.0)': + '@sveltejs/acorn-typescript@1.0.11(acorn@8.18.0)': dependencies: - acorn: 8.17.0 + acorn: 8.18.0 - '@sveltejs/adapter-static@3.0.10(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))': + '@sveltejs/adapter-static@3.0.10(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))': dependencies: - '@sveltejs/kit': 2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + '@sveltejs/kit': 2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) - '@sveltejs/enhanced-img@0.11.0(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(rollup@4.62.0)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': + '@sveltejs/enhanced-img@0.11.0(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(rollup@4.62.0)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': dependencies: - '@sveltejs/vite-plugin-svelte': 7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + '@sveltejs/vite-plugin-svelte': 7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) magic-string: 0.30.21 sharp: 0.34.5 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) - svelte-parse-markup: 0.1.5(svelte@5.56.5(@typescript-eslint/types@8.64.0)) - vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) + svelte-parse-markup: 0.1.5(svelte@5.56.8(@typescript-eslint/types@8.65.0)) + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) vite-imagetools: 9.0.3(rollup@4.62.0) zimmerframe: 1.1.4 transitivePeerDependencies: - rollup - '@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': + '@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': dependencies: '@standard-schema/spec': 1.1.0 - '@sveltejs/acorn-typescript': 1.0.11(acorn@8.17.0) - '@sveltejs/vite-plugin-svelte': 7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + '@sveltejs/acorn-typescript': 1.0.11(acorn@8.18.0) + '@sveltejs/vite-plugin-svelte': 7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@types/cookie': 0.6.0 - acorn: 8.17.0 + acorn: 8.18.0 cookie: 0.6.0 - devalue: 5.8.1 + devalue: 5.8.2 esm-env: 1.2.2 kleur: 4.1.5 magic-string: 0.30.21 mrmime: 2.0.1 set-cookie-parser: 3.1.2 sirv: 3.0.2 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) - vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) optionalDependencies: '@opentelemetry/api': 1.9.1 typescript: '@typescript/typescript6@6.0.2' '@sveltejs/load-config@0.2.0': {} - '@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': + '@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': dependencies: deepmerge: 4.3.1 magic-string: 0.30.21 obug: 2.1.3 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) - vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) - vitefu: 1.1.3(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vitefu: 1.1.3(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) - '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-remove-jsx-attribute@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-remove-jsx-attribute@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-svg-dynamic-title@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-svg-dynamic-title@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-svg-em-dimensions@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-svg-em-dimensions@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-transform-react-native-svg@8.1.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-transform-react-native-svg@8.1.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-plugin-transform-svg-component@8.0.0(@babel/core@7.29.7)': + '@svgr/babel-plugin-transform-svg-component@8.0.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) - '@svgr/babel-preset@8.1.0(@babel/core@7.29.7)': + '@svgr/babel-preset@8.1.0(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: - '@babel/core': 7.29.7 - '@svgr/babel-plugin-add-jsx-attribute': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-remove-jsx-attribute': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-remove-jsx-empty-expression': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-replace-jsx-attribute-value': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-svg-dynamic-title': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-svg-em-dimensions': 8.0.0(@babel/core@7.29.7) - '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.29.7) - '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@svgr/babel-plugin-add-jsx-attribute': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-remove-jsx-attribute': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-remove-jsx-empty-expression': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-replace-jsx-attribute-value': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-svg-dynamic-title': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-svg-em-dimensions': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.29.7(supports-color@8.1.1)) - '@svgr/core@8.1.0(@typescript/typescript6@6.0.2)': + '@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@svgr/babel-preset': 8.1.0(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@svgr/babel-preset': 8.1.0(@babel/core@7.29.7(supports-color@8.1.1)) camelcase: 6.3.0 cosmiconfig: 8.3.6(@typescript/typescript6@6.0.2) snake-case: 3.0.4 @@ -17709,92 +17566,92 @@ snapshots: '@babel/types': 7.29.7 entities: 4.5.0 - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2))': + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@svgr/babel-preset': 8.1.0(@babel/core@7.29.7) - '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@svgr/babel-preset': 8.1.0(@babel/core@7.29.7(supports-color@8.1.1)) + '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2)': + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1))(@typescript/typescript6@6.0.2)': dependencies: - '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2) + '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) cosmiconfig: 8.3.6(@typescript/typescript6@6.0.2) deepmerge: 4.3.1 svgo: 3.3.4 transitivePeerDependencies: - typescript - '@svgr/webpack@8.1.0(@typescript/typescript6@6.0.2)': + '@svgr/webpack@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7 - '@babel/plugin-transform-react-constant-elements': 7.29.7(@babel/core@7.29.7) - '@babel/preset-env': 7.29.7(@babel/core@7.29.7) - '@babel/preset-react': 7.29.7(@babel/core@7.29.7) - '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7) - '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2)) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/plugin-transform-react-constant-elements': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/preset-env': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-react': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) + '@svgr/core': 8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1))(supports-color@8.1.1) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1))(@typescript/typescript6@6.0.2) transitivePeerDependencies: - supports-color - typescript - '@swc/core-darwin-arm64@1.15.43': + '@swc/core-darwin-arm64@1.15.46': optional: true - '@swc/core-darwin-x64@1.15.43': + '@swc/core-darwin-x64@1.15.46': optional: true - '@swc/core-linux-arm-gnueabihf@1.15.43': + '@swc/core-linux-arm-gnueabihf@1.15.46': optional: true - '@swc/core-linux-arm64-gnu@1.15.43': + '@swc/core-linux-arm64-gnu@1.15.46': optional: true - '@swc/core-linux-arm64-musl@1.15.43': + '@swc/core-linux-arm64-musl@1.15.46': optional: true - '@swc/core-linux-ppc64-gnu@1.15.43': + '@swc/core-linux-ppc64-gnu@1.15.46': optional: true - '@swc/core-linux-s390x-gnu@1.15.43': + '@swc/core-linux-s390x-gnu@1.15.46': optional: true - '@swc/core-linux-x64-gnu@1.15.43': + '@swc/core-linux-x64-gnu@1.15.46': optional: true - '@swc/core-linux-x64-musl@1.15.43': + '@swc/core-linux-x64-musl@1.15.46': optional: true - '@swc/core-win32-arm64-msvc@1.15.43': + '@swc/core-win32-arm64-msvc@1.15.46': optional: true - '@swc/core-win32-ia32-msvc@1.15.43': + '@swc/core-win32-ia32-msvc@1.15.46': optional: true - '@swc/core-win32-x64-msvc@1.15.43': + '@swc/core-win32-x64-msvc@1.15.46': optional: true - '@swc/core@1.15.43(@swc/helpers@0.5.23)': + '@swc/core@1.15.46(@swc/helpers@0.5.23)': dependencies: '@swc/counter': 0.1.3 '@swc/types': 0.1.27 optionalDependencies: - '@swc/core-darwin-arm64': 1.15.43 - '@swc/core-darwin-x64': 1.15.43 - '@swc/core-linux-arm-gnueabihf': 1.15.43 - '@swc/core-linux-arm64-gnu': 1.15.43 - '@swc/core-linux-arm64-musl': 1.15.43 - '@swc/core-linux-ppc64-gnu': 1.15.43 - '@swc/core-linux-s390x-gnu': 1.15.43 - '@swc/core-linux-x64-gnu': 1.15.43 - '@swc/core-linux-x64-musl': 1.15.43 - '@swc/core-win32-arm64-msvc': 1.15.43 - '@swc/core-win32-ia32-msvc': 1.15.43 - '@swc/core-win32-x64-msvc': 1.15.43 + '@swc/core-darwin-arm64': 1.15.46 + '@swc/core-darwin-x64': 1.15.46 + '@swc/core-linux-arm-gnueabihf': 1.15.46 + '@swc/core-linux-arm64-gnu': 1.15.46 + '@swc/core-linux-arm64-musl': 1.15.46 + '@swc/core-linux-ppc64-gnu': 1.15.46 + '@swc/core-linux-s390x-gnu': 1.15.46 + '@swc/core-linux-x64-gnu': 1.15.46 + '@swc/core-linux-x64-musl': 1.15.46 + '@swc/core-win32-arm64-msvc': 1.15.46 + '@swc/core-win32-ia32-msvc': 1.15.46 + '@swc/core-win32-x64-msvc': 1.15.46 '@swc/helpers': 0.5.23 '@swc/counter@0.1.3': {} @@ -17811,73 +17668,73 @@ snapshots: dependencies: defer-to-connect: 2.0.1 - '@tailwindcss/node@4.3.2': + '@tailwindcss/node@4.3.3': dependencies: '@jridgewell/remapping': 2.3.5 - enhanced-resolve: 5.21.6 + enhanced-resolve: 5.24.4 jiti: 2.7.0 lightningcss: 1.32.0 magic-string: 0.30.21 source-map-js: 1.2.1 - tailwindcss: 4.3.2 + tailwindcss: 4.3.3 - '@tailwindcss/oxide-android-arm64@4.3.2': + '@tailwindcss/oxide-android-arm64@4.3.3': optional: true - '@tailwindcss/oxide-darwin-arm64@4.3.2': + '@tailwindcss/oxide-darwin-arm64@4.3.3': optional: true - '@tailwindcss/oxide-darwin-x64@4.3.2': + '@tailwindcss/oxide-darwin-x64@4.3.3': optional: true - '@tailwindcss/oxide-freebsd-x64@4.3.2': + '@tailwindcss/oxide-freebsd-x64@4.3.3': optional: true - '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.2': + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3': optional: true - '@tailwindcss/oxide-linux-arm64-gnu@4.3.2': + '@tailwindcss/oxide-linux-arm64-gnu@4.3.3': optional: true - '@tailwindcss/oxide-linux-arm64-musl@4.3.2': + '@tailwindcss/oxide-linux-arm64-musl@4.3.3': optional: true - '@tailwindcss/oxide-linux-x64-gnu@4.3.2': + '@tailwindcss/oxide-linux-x64-gnu@4.3.3': optional: true - '@tailwindcss/oxide-linux-x64-musl@4.3.2': + '@tailwindcss/oxide-linux-x64-musl@4.3.3': optional: true - '@tailwindcss/oxide-wasm32-wasi@4.3.2': + '@tailwindcss/oxide-wasm32-wasi@4.3.3': optional: true - '@tailwindcss/oxide-win32-arm64-msvc@4.3.2': + '@tailwindcss/oxide-win32-arm64-msvc@4.3.3': optional: true - '@tailwindcss/oxide-win32-x64-msvc@4.3.2': + '@tailwindcss/oxide-win32-x64-msvc@4.3.3': optional: true - '@tailwindcss/oxide@4.3.2': + '@tailwindcss/oxide@4.3.3': optionalDependencies: - '@tailwindcss/oxide-android-arm64': 4.3.2 - '@tailwindcss/oxide-darwin-arm64': 4.3.2 - '@tailwindcss/oxide-darwin-x64': 4.3.2 - '@tailwindcss/oxide-freebsd-x64': 4.3.2 - '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.2 - '@tailwindcss/oxide-linux-arm64-gnu': 4.3.2 - '@tailwindcss/oxide-linux-arm64-musl': 4.3.2 - '@tailwindcss/oxide-linux-x64-gnu': 4.3.2 - '@tailwindcss/oxide-linux-x64-musl': 4.3.2 - '@tailwindcss/oxide-wasm32-wasi': 4.3.2 - '@tailwindcss/oxide-win32-arm64-msvc': 4.3.2 - '@tailwindcss/oxide-win32-x64-msvc': 4.3.2 + '@tailwindcss/oxide-android-arm64': 4.3.3 + '@tailwindcss/oxide-darwin-arm64': 4.3.3 + '@tailwindcss/oxide-darwin-x64': 4.3.3 + '@tailwindcss/oxide-freebsd-x64': 4.3.3 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.3 + '@tailwindcss/oxide-linux-arm64-gnu': 4.3.3 + '@tailwindcss/oxide-linux-arm64-musl': 4.3.3 + '@tailwindcss/oxide-linux-x64-gnu': 4.3.3 + '@tailwindcss/oxide-linux-x64-musl': 4.3.3 + '@tailwindcss/oxide-wasm32-wasi': 4.3.3 + '@tailwindcss/oxide-win32-arm64-msvc': 4.3.3 + '@tailwindcss/oxide-win32-x64-msvc': 4.3.3 - '@tailwindcss/vite@4.3.2(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': + '@tailwindcss/vite@4.3.3(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': dependencies: - '@tailwindcss/node': 4.3.2 - '@tailwindcss/oxide': 4.3.2 - tailwindcss: 4.3.2 - vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + '@tailwindcss/node': 4.3.3 + '@tailwindcss/oxide': 4.3.3 + tailwindcss: 4.3.3 + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) '@testing-library/dom@10.4.1': dependencies: @@ -17899,46 +17756,46 @@ snapshots: picocolors: 1.1.1 redent: 3.0.0 - '@testing-library/svelte-core@1.1.3(svelte@5.56.5(@typescript-eslint/types@8.64.0))': + '@testing-library/svelte-core@1.1.3(svelte@5.56.8(@typescript-eslint/types@8.65.0))': dependencies: - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) - '@testing-library/svelte@5.4.2(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))(vitest@4.1.10)': + '@testing-library/svelte@5.4.2(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))(vitest@4.1.10)': dependencies: '@testing-library/dom': 10.4.1 - '@testing-library/svelte-core': 1.1.3(svelte@5.56.5(@typescript-eslint/types@8.64.0)) - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + '@testing-library/svelte-core': 1.1.3(svelte@5.56.8(@typescript-eslint/types@8.65.0)) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) optionalDependencies: - vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) - vitest: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.10.6)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vitest: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@testing-library/user-event@14.6.1(@testing-library/dom@10.4.1)': dependencies: '@testing-library/dom': 10.4.1 - '@tokenizer/inflate@0.4.1': + '@tokenizer/inflate@0.4.1(supports-color@8.1.1)': dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) token-types: 6.1.2 transitivePeerDependencies: - supports-color '@tokenizer/token@0.3.0': {} - '@trivago/prettier-plugin-sort-imports@6.0.2(prettier-plugin-svelte@4.1.1(prettier@3.9.5)(svelte@5.56.5(@typescript-eslint/types@8.64.0)))(prettier@3.9.5)(svelte@5.56.5(@typescript-eslint/types@8.64.0))': + '@trivago/prettier-plugin-sort-imports@6.0.2(prettier-plugin-svelte@4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.65.0)))(prettier@3.9.6)(supports-color@8.1.1)(svelte@5.56.8(@typescript-eslint/types@8.65.0))': dependencies: '@babel/generator': 7.29.7 '@babel/parser': 7.29.7 - '@babel/traverse': 7.29.7 + '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.7 javascript-natural-sort: 0.7.1 lodash-es: 4.18.1 minimatch: 9.0.9 parse-imports-exports: 0.2.4 - prettier: 3.9.5 + prettier: 3.9.6 optionalDependencies: - prettier-plugin-svelte: 4.1.1(prettier@3.9.5)(svelte@5.56.5(@typescript-eslint/types@8.64.0)) - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + prettier-plugin-svelte: 4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.65.0)) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) transitivePeerDependencies: - supports-color @@ -18510,15 +18367,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.64.0(@typescript-eslint/parser@8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)))(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': + '@typescript-eslint/eslint-plugin@8.65.0(@typescript-eslint/parser@8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1))(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - '@typescript-eslint/scope-manager': 8.64.0 - '@typescript-eslint/type-utils': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - '@typescript-eslint/utils': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - '@typescript-eslint/visitor-keys': 8.64.0 - eslint: 10.7.0(jiti@2.7.0) + '@typescript-eslint/parser': 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/scope-manager': 8.65.0 + '@typescript-eslint/type-utils': 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/utils': 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/visitor-keys': 8.65.0 + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) ignore: 7.0.6 natural-compare: 1.4.0 ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) @@ -18526,58 +18383,58 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': + '@typescript-eslint/parser@8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@typescript-eslint/scope-manager': 8.64.0 - '@typescript-eslint/types': 8.64.0 - '@typescript-eslint/typescript-estree': 8.64.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/visitor-keys': 8.64.0 - debug: 4.4.3 - eslint: 10.7.0(jiti@2.7.0) + '@typescript-eslint/scope-manager': 8.65.0 + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/typescript-estree': 8.65.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@typescript-eslint/visitor-keys': 8.65.0 + debug: 4.4.3(supports-color@8.1.1) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.64.0(@typescript/typescript6@6.0.2)': + '@typescript-eslint/project-service@8.65.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.64.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/types': 8.64.0 - debug: 4.4.3 + '@typescript-eslint/tsconfig-utils': 8.65.0(@typescript/typescript6@6.0.2) + '@typescript-eslint/types': 8.65.0 + debug: 4.4.3(supports-color@8.1.1) typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.64.0': + '@typescript-eslint/scope-manager@8.65.0': dependencies: - '@typescript-eslint/types': 8.64.0 - '@typescript-eslint/visitor-keys': 8.64.0 + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/visitor-keys': 8.65.0 - '@typescript-eslint/tsconfig-utils@8.64.0(@typescript/typescript6@6.0.2)': + '@typescript-eslint/tsconfig-utils@8.65.0(@typescript/typescript6@6.0.2)': dependencies: typescript: '@typescript/typescript6@6.0.2' - '@typescript-eslint/type-utils@8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': + '@typescript-eslint/type-utils@8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@typescript-eslint/types': 8.64.0 - '@typescript-eslint/typescript-estree': 8.64.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/utils': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - debug: 4.4.3 - eslint: 10.7.0(jiti@2.7.0) + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/typescript-estree': 8.65.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@typescript-eslint/utils': 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + debug: 4.4.3(supports-color@8.1.1) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.64.0': {} + '@typescript-eslint/types@8.65.0': {} - '@typescript-eslint/typescript-estree@8.64.0(@typescript/typescript6@6.0.2)': + '@typescript-eslint/typescript-estree@8.65.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1)': dependencies: - '@typescript-eslint/project-service': 8.64.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/tsconfig-utils': 8.64.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/types': 8.64.0 - '@typescript-eslint/visitor-keys': 8.64.0 - debug: 4.4.3 - minimatch: 10.2.5 + '@typescript-eslint/project-service': 8.65.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@typescript-eslint/tsconfig-utils': 8.65.0(@typescript/typescript6@6.0.2) + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/visitor-keys': 8.65.0 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 10.2.6 semver: 7.8.5 tinyglobby: 0.2.17 ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) @@ -18585,20 +18442,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': + '@typescript-eslint/utils@8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)': dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0(jiti@2.7.0)) - '@typescript-eslint/scope-manager': 8.64.0 - '@typescript-eslint/types': 8.64.0 - '@typescript-eslint/typescript-estree': 8.64.0(@typescript/typescript6@6.0.2) - eslint: 10.7.0(jiti@2.7.0) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) + '@typescript-eslint/scope-manager': 8.65.0 + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/typescript-estree': 8.65.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.64.0': + '@typescript-eslint/visitor-keys@8.65.0': dependencies: - '@typescript-eslint/types': 8.64.0 + '@typescript-eslint/types': 8.65.0 eslint-visitor-keys: 5.0.1 '@typescript/typescript-aix-ppc64@7.0.2': @@ -18676,7 +18533,7 @@ snapshots: dependencies: valibot: 1.4.2(@typescript/typescript6@6.0.2) - '@vitest/coverage-v8@4.1.10(vitest@3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.10.6)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': + '@vitest/coverage-v8@4.1.10(vitest@3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': dependencies: '@bcoe/v8-coverage': 1.0.2 '@vitest/utils': 4.1.10 @@ -18688,7 +18545,7 @@ snapshots: obug: 2.1.3 std-env: 4.2.0 tinyrainbow: 3.1.0 - vitest: 3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.10.6)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vitest: 3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) '@vitest/coverage-v8@4.1.10(vitest@4.1.10)': dependencies: @@ -18702,7 +18559,7 @@ snapshots: obug: 2.1.3 std-env: 4.2.0 tinyrainbow: 3.1.0 - vitest: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.10.6)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + vitest: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@vitest/expect@3.2.7': dependencies: @@ -18721,21 +18578,21 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@3.2.7(vite@7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': + '@vitest/mocker@3.2.7(vite@7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': dependencies: '@vitest/spy': 3.2.7 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vite: 7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) - '@vitest/mocker@4.1.10(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': + '@vitest/mocker@4.1.10(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))': dependencies: '@vitest/spy': 4.1.10 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) '@vitest/pretty-format@3.2.7': dependencies: @@ -18871,10 +18728,10 @@ snapshots: dependencies: '@namnode/store': 0.1.0 - '@zoom-image/svelte@0.3.9(svelte@5.56.5(@typescript-eslint/types@8.64.0))': + '@zoom-image/svelte@0.3.9(svelte@5.56.8(@typescript-eslint/types@8.65.0))': dependencies: '@zoom-image/core': 0.42.0 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) abbrev@1.1.1: {} @@ -18894,29 +18751,29 @@ snapshots: mime-types: 3.0.2 negotiator: 1.0.0 - acorn-import-attributes@1.9.5(acorn@8.17.0): + acorn-import-attributes@1.9.5(acorn@8.18.0): dependencies: - acorn: 8.17.0 + acorn: 8.18.0 - acorn-import-phases@1.0.4(acorn@8.17.0): + acorn-import-phases@1.0.4(acorn@8.18.0): dependencies: - acorn: 8.17.0 + acorn: 8.18.0 - acorn-jsx@5.3.2(acorn@8.17.0): + acorn-jsx@5.3.2(acorn@8.18.0): dependencies: - acorn: 8.17.0 + acorn: 8.18.0 acorn-walk@8.3.5: dependencies: - acorn: 8.17.0 + acorn: 8.18.0 - acorn@8.17.0: {} + acorn@8.18.0: {} address@2.0.3: {} - agent-base@6.0.2: + agent-base@6.0.2(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -18959,14 +18816,14 @@ snapshots: ajv@8.18.0: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.1.3 + fast-uri: 3.1.4 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 ajv@8.20.0: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.1.3 + fast-uri: 3.1.4 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -19121,59 +18978,59 @@ snapshots: dependencies: immediate: 3.3.0 - autoprefixer@10.5.4(postcss@8.5.19): + autoprefixer@10.5.4(postcss@8.5.25): dependencies: browserslist: 4.28.6 caniuse-lite: 1.0.30001806 fraction.js: 5.3.4 picocolors: 1.1.1 - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 axobject-query@4.1.0: {} b4a@1.8.1: {} - babel-loader@9.2.1(@babel/core@7.29.7)(webpack@5.108.4(postcss@8.5.19)): + babel-loader@9.2.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: - '@babel/core': 7.29.7 + '@babel/core': 7.29.7(supports-color@8.1.1) find-cache-dir: 4.0.0 schema-utils: 4.3.3 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) babel-plugin-dynamic-import-node@2.3.3: dependencies: object.assign: 4.1.7 - babel-plugin-polyfill-corejs2@0.4.17(@babel/core@7.29.7): + babel-plugin-polyfill-corejs2@0.4.17(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): dependencies: '@babel/compat-data': 7.29.7 - '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.13.0(@babel/core@7.29.7): + babel-plugin-polyfill-corejs3@0.13.0(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): dependencies: - '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) core-js-compat: 3.49.0 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.14.2(@babel/core@7.29.7): + babel-plugin-polyfill-corejs3@0.14.2(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): dependencies: - '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) core-js-compat: 3.49.0 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.8(@babel/core@7.29.7): + babel-plugin-polyfill-regenerator@0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): dependencies: - '@babel/core': 7.29.7 - '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7) + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/helper-define-polyfill-provider': 0.6.8(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -19240,15 +19097,15 @@ snapshots: binary-extensions@2.3.0: {} - bits-ui@2.18.1(@internationalized/date@3.12.2)(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + bits-ui@2.18.1(@internationalized/date@3.12.2)(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: - '@floating-ui/core': 1.7.5 - '@floating-ui/dom': 1.7.6 + '@floating-ui/core': 1.8.0 + '@floating-ui/dom': 1.8.0 '@internationalized/date': 3.12.2 esm-env: 1.2.2 - runed: 0.35.1(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.5(@typescript-eslint/types@8.64.0)) - svelte: 5.56.5(@typescript-eslint/types@8.64.0) - svelte-toolbelt: 0.10.6(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + runed: 0.35.1(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.65.0)) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) + svelte-toolbelt: 0.10.6(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.65.0)) tabbable: 6.5.0 transitivePeerDependencies: - '@sveltejs/kit' @@ -19259,11 +19116,11 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - body-parser@1.20.6: + body-parser@1.20.6(supports-color@8.1.1): dependencies: bytes: 3.1.2 content-type: 1.0.5 - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) depd: 2.0.0 destroy: 1.2.0 http-errors: 2.0.1 @@ -19276,11 +19133,11 @@ snapshots: transitivePeerDependencies: - supports-color - body-parser@2.3.0: + body-parser@2.3.0(supports-color@8.1.1): dependencies: bytes: 3.1.2 content-type: 2.0.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) http-errors: 2.0.1 iconv-lite: 0.7.3 on-finished: 2.4.1 @@ -19328,7 +19185,7 @@ snapshots: dependencies: balanced-match: 1.0.2 - brace-expansion@5.0.7: + brace-expansion@5.0.8: dependencies: balanced-match: 4.0.4 @@ -19369,10 +19226,10 @@ snapshots: builtin-modules@5.2.0: {} - bullmq@5.80.5: + bullmq@5.81.2(supports-color@8.1.1): dependencies: cron-parser: 4.9.0 - ioredis: 5.11.1 + ioredis: 5.11.1(supports-color@8.1.1) msgpackr: 2.0.4 node-abort-controller: 3.1.1 semver: 7.8.5 @@ -19461,9 +19318,9 @@ snapshots: ccount@2.0.1: {} - ce-la-react@0.3.2(react@19.2.7): + ce-la-react@0.3.2(react@19.2.8): dependencies: - react: 19.2.7 + react: 19.2.8 chai@5.3.3: dependencies: @@ -19623,11 +19480,11 @@ snapshots: cluster-key-slot@1.1.1: {} - codemirror-wrapped-line-indent@1.0.9(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.43.1): + codemirror-wrapped-line-indent@1.0.9(@codemirror/language@6.12.4)(@codemirror/state@6.7.1)(@codemirror/view@6.43.7): dependencies: - '@codemirror/language': 6.12.3 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 + '@codemirror/language': 6.12.4 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 collapse-white-space@2.1.0: {} @@ -19696,11 +19553,11 @@ snapshots: dependencies: mime-db: 1.54.0 - compression@1.8.1: + compression@1.8.1(supports-color@8.1.1): dependencies: bytes: 3.1.2 compressible: 2.0.18 - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) negotiator: 0.6.4 on-headers: 1.1.0 safe-buffer: 5.2.1 @@ -19792,7 +19649,7 @@ snapshots: copy-text-to-clipboard@3.2.2: {} - copy-webpack-plugin@11.0.0(webpack@5.108.4(postcss@8.5.19)): + copy-webpack-plugin@11.0.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: fast-glob: 3.3.3 glob-parent: 6.0.2 @@ -19800,7 +19657,7 @@ snapshots: normalize-path: 3.0.0 schema-utils: 4.3.3 serialize-javascript: 6.0.2 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) core-js-compat@3.49.0: dependencies: @@ -19854,7 +19711,7 @@ snapshots: crc-32: 1.2.2 readable-stream: 4.7.0 - crelt@1.0.6: {} + crelt@1.0.7: {} cron-parser@4.9.0: dependencies: @@ -19875,50 +19732,53 @@ snapshots: dependencies: type-fest: 1.4.0 - css-blank-pseudo@7.0.1(postcss@8.5.19): + css-blank-pseudo@7.0.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - css-declaration-sorter@7.4.0(postcss@8.5.19): + css-declaration-sorter@7.4.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - css-has-pseudo@7.0.3(postcss@8.5.19): + css-has-pseudo@7.0.3(postcss@8.5.25): dependencies: '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.4) - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 postcss-value-parser: 4.2.0 - css-loader@6.11.0(webpack@5.108.4(postcss@8.5.19)): + css-loader@6.11.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: - icss-utils: 5.1.0(postcss@8.5.19) - postcss: 8.5.19 - postcss-modules-extract-imports: 3.1.0(postcss@8.5.19) - postcss-modules-local-by-default: 4.2.0(postcss@8.5.19) - postcss-modules-scope: 3.2.1(postcss@8.5.19) - postcss-modules-values: 4.0.0(postcss@8.5.19) + icss-utils: 5.1.0(postcss@8.5.25) + postcss: 8.5.25 + postcss-modules-extract-imports: 3.1.0(postcss@8.5.25) + postcss-modules-local-by-default: 4.2.0(postcss@8.5.25) + postcss-modules-scope: 3.2.1(postcss@8.5.25) + postcss-modules-values: 4.0.0(postcss@8.5.25) postcss-value-parser: 4.2.0 semver: 7.8.5 optionalDependencies: - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) - css-minimizer-webpack-plugin@5.0.1(clean-css@5.3.3)(webpack@5.108.4(postcss@8.5.19)): + css-minimizer-webpack-plugin@5.0.1(clean-css@5.3.3)(csso@5.0.5)(esbuild@0.28.1)(lightningcss@1.33.0)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: '@jridgewell/trace-mapping': 0.3.31 - cssnano: 6.1.2(postcss@8.5.19) + cssnano: 6.1.2(postcss@8.5.25) jest-worker: 29.7.0 - postcss: 8.5.19 + postcss: 8.5.25 schema-utils: 4.3.3 serialize-javascript: 6.0.2 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) optionalDependencies: clean-css: 5.3.3 + csso: 5.0.5 + esbuild: 0.28.1 + lightningcss: 1.33.0 - css-prefers-color-scheme@10.0.0(postcss@8.5.19): + css-prefers-color-scheme@10.0.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 css-select@4.3.0: dependencies: @@ -19956,60 +19816,60 @@ snapshots: cssesc@3.0.0: {} - cssnano-preset-advanced@6.1.2(postcss@8.5.19): + cssnano-preset-advanced@6.1.2(postcss@8.5.25): dependencies: - autoprefixer: 10.5.4(postcss@8.5.19) + autoprefixer: 10.5.4(postcss@8.5.25) browserslist: 4.28.6 - cssnano-preset-default: 6.1.2(postcss@8.5.19) - postcss: 8.5.19 - postcss-discard-unused: 6.0.5(postcss@8.5.19) - postcss-merge-idents: 6.0.3(postcss@8.5.19) - postcss-reduce-idents: 6.0.3(postcss@8.5.19) - postcss-zindex: 6.0.2(postcss@8.5.19) + cssnano-preset-default: 6.1.2(postcss@8.5.25) + postcss: 8.5.25 + postcss-discard-unused: 6.0.5(postcss@8.5.25) + postcss-merge-idents: 6.0.3(postcss@8.5.25) + postcss-reduce-idents: 6.0.3(postcss@8.5.25) + postcss-zindex: 6.0.2(postcss@8.5.25) - cssnano-preset-default@6.1.2(postcss@8.5.19): + cssnano-preset-default@6.1.2(postcss@8.5.25): dependencies: browserslist: 4.28.6 - css-declaration-sorter: 7.4.0(postcss@8.5.19) - cssnano-utils: 4.0.2(postcss@8.5.19) - postcss: 8.5.19 - postcss-calc: 9.0.1(postcss@8.5.19) - postcss-colormin: 6.1.0(postcss@8.5.19) - postcss-convert-values: 6.1.0(postcss@8.5.19) - postcss-discard-comments: 6.0.2(postcss@8.5.19) - postcss-discard-duplicates: 6.0.3(postcss@8.5.19) - postcss-discard-empty: 6.0.3(postcss@8.5.19) - postcss-discard-overridden: 6.0.2(postcss@8.5.19) - postcss-merge-longhand: 6.0.5(postcss@8.5.19) - postcss-merge-rules: 6.1.1(postcss@8.5.19) - postcss-minify-font-values: 6.1.0(postcss@8.5.19) - postcss-minify-gradients: 6.0.3(postcss@8.5.19) - postcss-minify-params: 6.1.0(postcss@8.5.19) - postcss-minify-selectors: 6.0.4(postcss@8.5.19) - postcss-normalize-charset: 6.0.2(postcss@8.5.19) - postcss-normalize-display-values: 6.0.2(postcss@8.5.19) - postcss-normalize-positions: 6.0.2(postcss@8.5.19) - postcss-normalize-repeat-style: 6.0.2(postcss@8.5.19) - postcss-normalize-string: 6.0.2(postcss@8.5.19) - postcss-normalize-timing-functions: 6.0.2(postcss@8.5.19) - postcss-normalize-unicode: 6.1.0(postcss@8.5.19) - postcss-normalize-url: 6.0.2(postcss@8.5.19) - postcss-normalize-whitespace: 6.0.2(postcss@8.5.19) - postcss-ordered-values: 6.0.2(postcss@8.5.19) - postcss-reduce-initial: 6.1.0(postcss@8.5.19) - postcss-reduce-transforms: 6.0.2(postcss@8.5.19) - postcss-svgo: 6.0.3(postcss@8.5.19) - postcss-unique-selectors: 6.0.4(postcss@8.5.19) + css-declaration-sorter: 7.4.0(postcss@8.5.25) + cssnano-utils: 4.0.2(postcss@8.5.25) + postcss: 8.5.25 + postcss-calc: 9.0.1(postcss@8.5.25) + postcss-colormin: 6.1.0(postcss@8.5.25) + postcss-convert-values: 6.1.0(postcss@8.5.25) + postcss-discard-comments: 6.0.2(postcss@8.5.25) + postcss-discard-duplicates: 6.0.3(postcss@8.5.25) + postcss-discard-empty: 6.0.3(postcss@8.5.25) + postcss-discard-overridden: 6.0.2(postcss@8.5.25) + postcss-merge-longhand: 6.0.5(postcss@8.5.25) + postcss-merge-rules: 6.1.1(postcss@8.5.25) + postcss-minify-font-values: 6.1.0(postcss@8.5.25) + postcss-minify-gradients: 6.0.3(postcss@8.5.25) + postcss-minify-params: 6.1.0(postcss@8.5.25) + postcss-minify-selectors: 6.0.4(postcss@8.5.25) + postcss-normalize-charset: 6.0.2(postcss@8.5.25) + postcss-normalize-display-values: 6.0.2(postcss@8.5.25) + postcss-normalize-positions: 6.0.2(postcss@8.5.25) + postcss-normalize-repeat-style: 6.0.2(postcss@8.5.25) + postcss-normalize-string: 6.0.2(postcss@8.5.25) + postcss-normalize-timing-functions: 6.0.2(postcss@8.5.25) + postcss-normalize-unicode: 6.1.0(postcss@8.5.25) + postcss-normalize-url: 6.0.2(postcss@8.5.25) + postcss-normalize-whitespace: 6.0.2(postcss@8.5.25) + postcss-ordered-values: 6.0.2(postcss@8.5.25) + postcss-reduce-initial: 6.1.0(postcss@8.5.25) + postcss-reduce-transforms: 6.0.2(postcss@8.5.25) + postcss-svgo: 6.0.3(postcss@8.5.25) + postcss-unique-selectors: 6.0.4(postcss@8.5.25) - cssnano-utils@4.0.2(postcss@8.5.19): + cssnano-utils@4.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - cssnano@6.1.2(postcss@8.5.19): + cssnano@6.1.2(postcss@8.5.25): dependencies: - cssnano-preset-default: 6.1.2(postcss@8.5.19) + cssnano-preset-default: 6.1.2(postcss@8.5.25) lilconfig: 3.1.3 - postcss: 8.5.19 + postcss: 8.5.25 csso@5.0.5: dependencies: @@ -20230,17 +20090,28 @@ snapshots: debounce@2.2.0: {} - debug@2.6.9: + debug@2.6.9(supports-color@8.1.1): dependencies: ms: 2.0.0 + optionalDependencies: + supports-color: 8.1.1 - debug@4.3.7: + debug@4.3.7(supports-color@8.1.1): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 debug@4.4.3: dependencies: ms: 2.1.3 + optional: true + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 decamelize@1.2.0: {} @@ -20323,7 +20194,7 @@ snapshots: dependencies: address: 2.0.3 - devalue@5.8.1: {} + devalue@5.8.2: {} devlop@1.1.0: dependencies: @@ -20360,29 +20231,29 @@ snapshots: dependencies: yaml: 2.9.0 - docker-modem@5.0.7: + docker-modem@5.0.7(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) readable-stream: 3.6.2 split-ca: 1.0.1 ssh2: 1.17.0 transitivePeerDependencies: - supports-color - dockerode@5.0.1: + dockerode@5.0.1(supports-color@8.1.1): dependencies: '@balena/dockerignore': 1.0.2 '@grpc/grpc-js': 1.14.4 '@grpc/proto-loader': 0.7.15 - docker-modem: 5.0.7 + docker-modem: 5.0.7(supports-color@8.1.1) protobufjs: 7.6.5 tar-fs: 2.1.5 transitivePeerDependencies: - supports-color - docusaurus-lunr-search@3.6.0(@docusaurus/core@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7): + docusaurus-lunr-search@3.6.0(@docusaurus/core@3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3))(react-dom@19.2.8(react@19.2.8))(react@19.2.8): dependencies: - '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.7))(@typescript/typescript6@6.0.2)(postcss@8.5.19)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@docusaurus/core': 3.10.2(@mdx-js/react@3.1.1(@types/react@19.2.17)(react@19.2.8))(@swc/core@1.15.46(@swc/helpers@0.5.23))(@typescript/typescript6@6.0.2)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(debug@4.4.3(supports-color@8.1.1))(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(supports-color@8.1.1)(uglify-js@3.19.3) autocomplete.js: 0.37.1 clsx: 2.1.1 gauge: 3.0.2 @@ -20393,8 +20264,8 @@ snapshots: lunr-languages: 1.20.0 mark.js: 8.11.1 minimatch: 3.1.5 - react: 19.2.7 - react-dom: 19.2.7(react@19.2.7) + react: 19.2.8 + react-dom: 19.2.8(react@19.2.8) rehype-parse: 7.0.1 to-vfile: 6.1.0 unified: 9.2.2 @@ -20501,10 +20372,10 @@ snapshots: dependencies: once: 1.4.0 - engine.io-client@6.6.5: + engine.io-client@6.6.5(supports-color@8.1.1): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) engine.io-parser: 5.2.3 ws: 8.20.1 xmlhttprequest-ssl: 2.1.2 @@ -20515,7 +20386,7 @@ snapshots: engine.io-parser@5.2.3: {} - engine.io@6.6.8: + engine.io@6.6.8(supports-color@8.1.1): dependencies: '@types/cors': 2.8.19 '@types/node': 24.13.3 @@ -20524,7 +20395,7 @@ snapshots: base64id: 2.0.0 cookie: 0.7.2 cors: 2.8.6 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) engine.io-parser: 5.2.3 ws: 8.20.1 transitivePeerDependencies: @@ -20532,12 +20403,7 @@ snapshots: - supports-color - utf-8-validate - enhanced-resolve@5.21.6: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.3.3 - - enhanced-resolve@5.24.2: + enhanced-resolve@5.24.4: dependencies: graceful-fs: 4.2.11 tapable: 2.3.3 @@ -20614,7 +20480,7 @@ snapshots: esast-util-from-js@2.0.1: dependencies: '@types/estree-jsx': 1.0.5 - acorn: 8.17.0 + acorn: 8.18.0 esast-util-from-estree: 2.0.0 vfile-message: 4.0.3 @@ -20714,77 +20580,77 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-prettier@10.1.8(eslint@10.7.0(jiti@2.7.0)): + eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)): dependencies: - eslint: 10.7.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) - eslint-plugin-better-tailwindcss@4.6.1(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))(tailwindcss@4.3.2): + eslint-plugin-better-tailwindcss@4.7.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(tailwindcss@4.3.3): dependencies: - '@eslint/css-tree': 4.0.4 + '@eslint/css-tree': 4.0.5 '@valibot/to-json-schema': 1.7.1(valibot@1.4.2(@typescript/typescript6@6.0.2)) - enhanced-resolve: 5.24.2 + enhanced-resolve: 5.24.4 jiti: 2.7.0 synckit: 0.11.13 tailwind-csstree: 0.3.3 - tailwindcss: 4.3.2 + tailwindcss: 4.3.3 tsconfig-paths-webpack-plugin: 4.2.0 valibot: 1.4.2(@typescript/typescript6@6.0.2) optionalDependencies: - eslint: 10.7.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) transitivePeerDependencies: - '@eslint/css' - typescript - eslint-plugin-compat@7.0.2(eslint@10.7.0(jiti@2.7.0)): + eslint-plugin-compat@7.0.2(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)): dependencies: '@mdn/browser-compat-data': 6.1.5 ast-metadata-inferer: 0.8.1 browserslist: 4.28.6 - eslint: 10.7.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) find-up: 5.0.0 globals: 15.15.0 lodash.memoize: 4.1.2 semver: 7.8.5 - eslint-plugin-prettier@5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0))(prettier@3.9.5): + eslint-plugin-prettier@5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.6): dependencies: - eslint: 10.7.0(jiti@2.7.0) - prettier: 3.9.5 + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) + prettier: 3.9.6 prettier-linter-helpers: 1.0.1 synckit: 0.11.13 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.8(eslint@10.7.0(jiti@2.7.0)) + eslint-config-prettier: 10.1.8(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) - eslint-plugin-svelte@3.20.0(eslint@10.7.0(jiti@2.7.0))(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + eslint-plugin-svelte@3.22.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0(jiti@2.7.0)) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@jridgewell/sourcemap-codec': 1.5.5 - eslint: 10.7.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) esutils: 2.0.3 globals: 16.5.0 known-css-properties: 0.37.0 - postcss: 8.5.19 - postcss-load-config: 3.1.4(postcss@8.5.19) - postcss-safe-parser: 7.0.1(postcss@8.5.19) + postcss: 8.5.25 + postcss-load-config: 3.1.4(postcss@8.5.25) + postcss-safe-parser: 7.0.1(postcss@8.5.25) semver: 7.8.5 - svelte-eslint-parser: 1.8.0(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + svelte-eslint-parser: 1.8.0(svelte@5.56.8(@typescript-eslint/types@8.65.0)) optionalDependencies: - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) transitivePeerDependencies: - ts-node - eslint-plugin-unicorn@72.0.0(eslint@10.7.0(jiti@2.7.0)): + eslint-plugin-unicorn@72.0.0(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)): dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0(jiti@2.7.0)) - '@eslint/css-tree': 4.0.4 + '@eslint-community/eslint-utils': 4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) + '@eslint/css-tree': 4.0.5 browserslist: 4.28.6 change-case: 5.4.4 ci-info: 4.4.0 core-js-compat: 3.49.0 detect-indent: 7.0.2 entities: 4.5.0 - eslint: 10.7.0(jiti@2.7.0) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) find-up-simple: 1.0.1 globals: 17.7.0 indent-string: 5.0.0 @@ -20821,12 +20687,12 @@ snapshots: eslint-visitor-keys@5.0.1: {} - eslint@10.7.0(jiti@2.7.0): + eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1): dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0(jiti@2.7.0)) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1)) '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.23.5 - '@eslint/config-helpers': 0.6.0 + '@eslint/config-array': 0.23.5(supports-color@8.1.1) + '@eslint/config-helpers': 0.7.0 '@eslint/core': 1.2.1 '@eslint/plugin-kit': 0.7.2 '@humanfs/node': 0.16.8 @@ -20835,7 +20701,7 @@ snapshots: '@types/estree': 1.0.9 ajv: 6.15.0 cross-spawn: 7.0.6 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint-scope: 9.1.2 eslint-visitor-keys: 5.0.1 @@ -20850,7 +20716,7 @@ snapshots: imurmurhash: 0.1.4 is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 - minimatch: 10.2.5 + minimatch: 10.2.6 natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: @@ -20869,14 +20735,14 @@ snapshots: espree@10.4.0: dependencies: - acorn: 8.17.0 - acorn-jsx: 5.3.2(acorn@8.17.0) + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) eslint-visitor-keys: 4.2.1 espree@11.2.0: dependencies: - acorn: 8.17.0 - acorn-jsx: 5.3.2(acorn@8.17.0) + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) eslint-visitor-keys: 5.0.1 esprima@4.0.1: {} @@ -20885,11 +20751,11 @@ snapshots: dependencies: estraverse: 5.3.0 - esrap@2.2.13(@typescript-eslint/types@8.64.0): + esrap@2.2.13(@typescript-eslint/types@8.65.0): dependencies: '@jridgewell/sourcemap-codec': 1.5.5 optionalDependencies: - '@typescript-eslint/types': 8.64.0 + '@typescript-eslint/types': 8.65.0 esrecurse@4.3.0: dependencies: @@ -21003,21 +20869,21 @@ snapshots: exponential-backoff@3.1.3: {} - express@4.22.2: + express@4.22.2(supports-color@8.1.1): dependencies: accepts: 1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.6 + body-parser: 1.20.6(supports-color@8.1.1) content-disposition: 0.5.4 content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.0.7 - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 1.3.2 + finalhandler: 1.3.2(supports-color@8.1.1) fresh: 0.5.2 http-errors: 2.0.1 merge-descriptors: 1.0.3 @@ -21029,8 +20895,8 @@ snapshots: qs: 6.15.3 range-parser: 1.2.1 safe-buffer: 5.2.1 - send: 0.19.2 - serve-static: 1.16.3 + send: 0.19.2(supports-color@8.1.1) + serve-static: 1.16.3(supports-color@8.1.1) setprototypeof: 1.2.0 statuses: 2.0.2 type-is: 1.6.18 @@ -21039,20 +20905,20 @@ snapshots: transitivePeerDependencies: - supports-color - express@5.2.1: + express@5.2.1(supports-color@8.1.1): dependencies: accepts: 2.0.0 - body-parser: 2.3.0 + body-parser: 2.3.0(supports-color@8.1.1) content-disposition: 1.1.0 content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.2.2 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 2.1.1 + finalhandler: 2.1.1(supports-color@8.1.1) fresh: 2.0.0 http-errors: 2.0.1 merge-descriptors: 2.0.0 @@ -21063,9 +20929,9 @@ snapshots: proxy-addr: 2.0.7 qs: 6.15.3 range-parser: 1.3.0 - router: 2.2.0 - send: 1.2.1 - serve-static: 2.2.1 + router: 2.2.0(supports-color@8.1.1) + send: 1.2.1(supports-color@8.1.1) + serve-static: 2.2.1(supports-color@8.1.1) statuses: 2.0.2 type-is: 2.1.0 vary: 1.1.2 @@ -21082,10 +20948,10 @@ snapshots: extend@3.0.2: {} - fabric@7.4.0: + fabric@7.4.0(supports-color@8.1.1): optionalDependencies: canvas: 3.2.3 - jsdom: 26.1.0(canvas@3.2.3) + jsdom: 26.1.0(canvas@3.2.3)(supports-color@8.1.1) transitivePeerDependencies: - bufferutil - supports-color @@ -21116,7 +20982,7 @@ snapshots: fast-safe-stringify@2.1.1: {} - fast-uri@3.1.3: {} + fast-uri@3.1.4: {} fastq@1.20.1: dependencies: @@ -21148,19 +21014,19 @@ snapshots: dependencies: flat-cache: 4.0.1 - file-loader@6.2.0(webpack@5.108.4(postcss@8.5.19)): + file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) file-source@0.6.1: dependencies: stream-source: 0.3.5 - file-type@21.3.4: + file-type@21.3.4(supports-color@8.1.1): dependencies: - '@tokenizer/inflate': 0.4.1 + '@tokenizer/inflate': 0.4.1(supports-color@8.1.1) strtok3: 10.3.5 token-types: 6.1.2 uint8array-extras: 1.5.0 @@ -21171,9 +21037,9 @@ snapshots: dependencies: to-regex-range: 5.0.1 - finalhandler@1.3.2: + finalhandler@1.3.2(supports-color@8.1.1): dependencies: - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -21183,9 +21049,9 @@ snapshots: transitivePeerDependencies: - supports-color - finalhandler@2.1.1: + finalhandler@2.1.1(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -21218,26 +21084,28 @@ snapshots: flat-cache@4.0.1: dependencies: - flatted: 3.4.2 + flatted: 3.4.3 keyv: 4.5.4 flat@5.0.2: {} - flatted@3.4.2: {} + flatted@3.4.3: {} fluent-ffmpeg@2.1.3: dependencies: async: 0.2.10 which: 1.3.1 - follow-redirects@1.16.0: {} + follow-redirects@1.16.0(debug@4.4.3(supports-color@8.1.1)): + optionalDependencies: + debug: 4.4.3(supports-color@8.1.1) foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@9.1.0(typescript@5.9.3)(webpack@5.106.2(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0)): + fork-ts-checker-webpack-plugin@9.1.0(typescript@5.9.3)(webpack@5.106.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: '@babel/code-frame': 7.29.7 chalk: 4.1.2 @@ -21252,7 +21120,7 @@ snapshots: semver: 7.8.5 tapable: 2.3.3 typescript: 5.9.3 - webpack: 5.106.2(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0) + webpack: 5.106.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) form-data-encoder@2.1.4: {} @@ -21411,7 +21279,7 @@ snapshots: glob@13.0.6: dependencies: - minimatch: 10.2.5 + minimatch: 10.2.6 minipass: 7.1.3 path-scurry: 2.0.2 @@ -21496,7 +21364,7 @@ snapshots: optionalDependencies: uglify-js: 3.19.3 - happy-dom@20.10.6: + happy-dom@20.11.1: dependencies: '@types/node': 24.13.3 '@types/whatwg-mimetype': 3.0.2 @@ -21592,7 +21460,7 @@ snapshots: unist-util-visit: 2.0.3 zwitch: 1.0.5 - hast-util-to-estree@3.1.3: + hast-util-to-estree@3.1.3(supports-color@8.1.1): dependencies: '@types/estree': 1.0.9 '@types/estree-jsx': 1.0.5 @@ -21602,9 +21470,9 @@ snapshots: estree-util-attach-comments: 3.0.0 estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 - mdast-util-mdx-expression: 2.0.1 - mdast-util-mdx-jsx: 3.2.0 - mdast-util-mdxjs-esm: 2.0.1 + mdast-util-mdx-expression: 2.0.1(supports-color@8.1.1) + mdast-util-mdx-jsx: 3.2.0(supports-color@8.1.1) + mdast-util-mdxjs-esm: 2.0.1(supports-color@8.1.1) property-information: 7.2.0 space-separated-tokens: 2.0.2 style-to-js: 1.1.21 @@ -21613,7 +21481,7 @@ snapshots: transitivePeerDependencies: - supports-color - hast-util-to-jsx-runtime@2.3.6: + hast-util-to-jsx-runtime@2.3.6(supports-color@8.1.1): dependencies: '@types/estree': 1.0.9 '@types/hast': 3.0.5 @@ -21622,9 +21490,9 @@ snapshots: devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 - mdast-util-mdx-expression: 2.0.1 - mdast-util-mdx-jsx: 3.2.0 - mdast-util-mdxjs-esm: 2.0.1 + mdast-util-mdx-expression: 2.0.1(supports-color@8.1.1) + mdast-util-mdx-jsx: 3.2.0(supports-color@8.1.1) + mdast-util-mdxjs-esm: 2.0.1(supports-color@8.1.1) property-information: 7.2.0 space-separated-tokens: 2.0.2 style-to-js: 1.1.21 @@ -21751,7 +21619,7 @@ snapshots: html-void-elements@3.0.0: {} - html-webpack-plugin@5.6.7(webpack@5.108.4(postcss@8.5.19)): + html-webpack-plugin@5.6.7(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -21759,7 +21627,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.3.3 optionalDependencies: - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) html5parser@3.0.0: {} @@ -21812,10 +21680,18 @@ snapshots: - supports-color optional: true - http-proxy-middleware@2.0.10(@types/express@4.17.25): + http-proxy-agent@7.0.2(supports-color@8.1.1): + dependencies: + agent-base: 7.1.4 + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + optional: true + + http-proxy-middleware@2.0.10(@types/express@4.17.25)(debug@4.4.3(supports-color@8.1.1)): dependencies: '@types/http-proxy': 1.17.17 - http-proxy: 1.18.1 + http-proxy: 1.18.1(debug@4.4.3(supports-color@8.1.1)) is-glob: 4.0.3 is-plain-obj: 3.0.0 micromatch: 4.0.8 @@ -21824,10 +21700,10 @@ snapshots: transitivePeerDependencies: - debug - http-proxy@1.18.1: + http-proxy@1.18.1(debug@4.4.3(supports-color@8.1.1)): dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.16.0 + follow-redirects: 1.16.0(debug@4.4.3(supports-color@8.1.1)) requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -21837,10 +21713,10 @@ snapshots: quick-lru: 5.1.1 resolve-alpn: 1.2.1 - https-proxy-agent@5.0.1: + https-proxy-agent@5.0.1(supports-color@8.1.1): dependencies: - agent-base: 6.0.2 - debug: 4.4.3 + agent-base: 6.0.2(supports-color@8.1.1) + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -21852,6 +21728,14 @@ snapshots: - supports-color optional: true + https-proxy-agent@7.0.6(supports-color@8.1.1): + dependencies: + agent-base: 7.1.4 + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + optional: true + human-signals@2.1.0: {} hyperdyperid@1.2.0: {} @@ -21872,9 +21756,9 @@ snapshots: dependencies: safer-buffer: 2.1.2 - icss-utils@5.1.0(postcss@8.5.19): + icss-utils@5.1.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 identifier-regex@1.1.0: dependencies: @@ -21892,7 +21776,7 @@ snapshots: immediate@3.3.0: {} - immutable-json-patch@6.0.2: {} + immutable-json-patch@6.0.3: {} immutable@5.1.6: {} @@ -21903,8 +21787,8 @@ snapshots: import-in-the-middle@3.0.2: dependencies: - acorn: 8.17.0 - acorn-import-attributes: 1.9.5(acorn@8.17.0) + acorn: 8.18.0 + acorn-import-attributes: 1.9.5(acorn@8.18.0) cjs-module-lexer: 2.2.0 module-details-from-path: 1.0.4 @@ -21973,11 +21857,11 @@ snapshots: dependencies: loose-envify: 1.4.0 - ioredis@5.11.1: + ioredis@5.11.1(supports-color@8.1.1): dependencies: '@ioredis/commands': 1.10.0 cluster-key-slot: 1.1.1 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) denque: 2.1.0 redis-errors: 1.2.0 redis-parser: 3.0.0 @@ -22182,7 +22066,7 @@ snapshots: '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 - jose@6.2.3: {} + jose@6.2.4: {} js-tokens@10.0.0: {} @@ -22194,6 +22078,10 @@ snapshots: dependencies: argparse: 2.0.1 + js-yaml@5.2.1: + dependencies: + argparse: 2.0.1 + jsdom@26.1.0(canvas@3.2.3): dependencies: cssstyle: 4.6.0 @@ -22224,6 +22112,36 @@ snapshots: - utf-8-validate optional: true + jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1): + dependencies: + cssstyle: 4.6.0 + data-urls: 5.0.0 + decimal.js: 10.6.0 + html-encoding-sniffer: 4.0.0 + http-proxy-agent: 7.0.2(supports-color@8.1.1) + https-proxy-agent: 7.0.6(supports-color@8.1.1) + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.24 + parse5: 7.3.0 + rrweb-cssom: 0.8.0 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 5.1.2 + w3c-xmlserializer: 5.0.0 + webidl-conversions: 7.0.0 + whatwg-encoding: 3.1.1 + whatwg-mimetype: 4.0.0 + whatwg-url: 14.2.0 + ws: 8.21.1 + xml-name-validator: 5.0.0 + optionalDependencies: + canvas: 3.2.3 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + optional: true + jsep@1.4.0: {} jsesc@3.1.0: {} @@ -22260,7 +22178,7 @@ snapshots: '@jsep-plugin/regex': 1.0.4(jsep@1.4.0) jsep: 1.4.0 - jsonrepair@3.14.0: {} + jsonrepair@3.15.0: {} jsonwebtoken@9.0.3: dependencies: @@ -22640,13 +22558,13 @@ snapshots: math-intrinsics@1.1.0: {} - mdast-util-directive@3.1.0: + mdast-util-directive@3.1.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 ccount: 2.0.1 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 parse-entities: 4.0.2 stringify-entities: 4.0.4 @@ -22661,14 +22579,14 @@ snapshots: unist-util-is: 6.0.1 unist-util-visit-parents: 6.0.2 - mdast-util-from-markdown@2.0.3: + mdast-util-from-markdown@2.0.3(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 decode-named-character-reference: 1.3.0 devlop: 1.1.0 mdast-util-to-string: 4.0.0 - micromark: 4.0.2 + micromark: 4.0.2(supports-color@8.1.1) micromark-util-decode-numeric-character-reference: 2.0.2 micromark-util-decode-string: 2.0.1 micromark-util-normalize-identifier: 2.0.1 @@ -22678,12 +22596,12 @@ snapshots: transitivePeerDependencies: - supports-color - mdast-util-frontmatter@2.0.1: + mdast-util-frontmatter@2.0.1(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 escape-string-regexp: 5.0.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 micromark-extension-frontmatter: 2.0.0 transitivePeerDependencies: @@ -22697,67 +22615,67 @@ snapshots: mdast-util-find-and-replace: 3.0.2 micromark-util-character: 2.1.1 - mdast-util-gfm-footnote@2.1.0: + mdast-util-gfm-footnote@2.1.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 micromark-util-normalize-identifier: 2.0.1 transitivePeerDependencies: - supports-color - mdast-util-gfm-strikethrough@2.0.0: + mdast-util-gfm-strikethrough@2.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-gfm-table@2.0.0: + mdast-util-gfm-table@2.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 markdown-table: 3.0.4 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-gfm-task-list-item@2.0.0: + mdast-util-gfm-task-list-item@2.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-gfm@3.1.0: + mdast-util-gfm@3.1.0(supports-color@8.1.1): dependencies: - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-gfm-autolink-literal: 2.0.1 - mdast-util-gfm-footnote: 2.1.0 - mdast-util-gfm-strikethrough: 2.0.0 - mdast-util-gfm-table: 2.0.0 - mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-gfm-footnote: 2.1.0(supports-color@8.1.1) + mdast-util-gfm-strikethrough: 2.0.0(supports-color@8.1.1) + mdast-util-gfm-table: 2.0.0(supports-color@8.1.1) + mdast-util-gfm-task-list-item: 2.0.0(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-mdx-expression@2.0.1: + mdast-util-mdx-expression@2.0.1(supports-color@8.1.1): dependencies: '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-mdx-jsx@3.2.0: + mdast-util-mdx-jsx@3.2.0(supports-color@8.1.1): dependencies: '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 @@ -22765,7 +22683,7 @@ snapshots: '@types/unist': 3.0.3 ccount: 2.0.1 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 parse-entities: 4.0.2 stringify-entities: 4.0.4 @@ -22774,23 +22692,23 @@ snapshots: transitivePeerDependencies: - supports-color - mdast-util-mdx@3.0.0: + mdast-util-mdx@3.0.0(supports-color@8.1.1): dependencies: - mdast-util-from-markdown: 2.0.3 - mdast-util-mdx-expression: 2.0.1 - mdast-util-mdx-jsx: 3.2.0 - mdast-util-mdxjs-esm: 2.0.1 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) + mdast-util-mdx-expression: 2.0.1(supports-color@8.1.1) + mdast-util-mdx-jsx: 3.2.0(supports-color@8.1.1) + mdast-util-mdxjs-esm: 2.0.1(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color - mdast-util-mdxjs-esm@2.0.1: + mdast-util-mdxjs-esm@2.0.1(supports-color@8.1.1): dependencies: '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.5 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color @@ -22832,11 +22750,11 @@ snapshots: mdn-data@2.0.30: {} - mdn-data@2.28.1: {} + mdn-data@2.29.0: {} - media-chrome@4.19.2(react@19.2.7): + media-chrome@4.19.2(react@19.2.8): dependencies: - ce-la-react: 0.3.2(react@19.2.7) + ce-la-react: 0.3.2(react@19.2.8) transitivePeerDependencies: - react @@ -23050,8 +22968,8 @@ snapshots: micromark-extension-mdxjs@3.0.0: dependencies: - acorn: 8.17.0 - acorn-jsx: 5.3.2(acorn@8.17.0) + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) micromark-extension-mdx-expression: 3.0.1 micromark-extension-mdx-jsx: 3.0.2 micromark-extension-mdx-md: 2.0.0 @@ -23187,10 +23105,10 @@ snapshots: micromark-util-types@2.0.2: {} - micromark@4.0.2: + micromark@4.0.2(supports-color@8.1.1): dependencies: '@types/debug': 4.1.13 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) decode-named-character-reference: 1.3.0 devlop: 1.1.0 micromark-core-commonmark: 2.0.3 @@ -23246,17 +23164,17 @@ snapshots: min-indent@1.0.1: {} - mini-css-extract-plugin@2.10.2(webpack@5.108.4(postcss@8.5.19)): + mini-css-extract-plugin@2.10.2(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: schema-utils: 4.3.3 tapable: 2.3.3 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) minimalistic-assert@1.0.1: {} - minimatch@10.2.5: + minimatch@10.2.6: dependencies: - brace-expansion: 5.0.7 + brace-expansion: 5.0.8 minimatch@3.1.5: dependencies: @@ -23272,28 +23190,23 @@ snapshots: minimist@1.2.8: {} - minimizer-webpack-plugin@5.6.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(webpack@5.108.4(postcss@8.5.19)): + minimizer-webpack-plugin@5.6.1(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.49.0 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) optionalDependencies: + '@swc/core': 1.15.46(@swc/helpers@0.5.23) clean-css: 5.3.3 - cssnano: 6.1.2(postcss@8.5.19) + cssnano: 6.1.2(postcss@8.5.25) + csso: 5.0.5 + esbuild: 0.28.1 html-minifier-terser: 7.2.0 - postcss: 8.5.19 - - minimizer-webpack-plugin@5.6.1(postcss@8.5.19)(webpack@5.108.4(postcss@8.5.19)): - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - jest-worker: 27.5.1 - schema-utils: 4.3.3 - terser: 5.49.0 - webpack: 5.108.4(postcss@8.5.19) - optionalDependencies: - postcss: 8.5.19 + lightningcss: 1.33.0 + postcss: 8.5.25 + uglify-js: 3.19.3 minipass@3.3.6: dependencies: @@ -23385,7 +23298,7 @@ snapshots: nanoid@3.3.16: {} - nanoid@5.1.16: {} + nanoid@6.0.0: {} napi-build-utils@2.0.0: optional: true @@ -23409,12 +23322,12 @@ snapshots: neo-async@2.6.2: {} - nest-commander@3.20.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@types/inquirer@8.2.13)(@types/node@24.13.3)(@typescript/typescript6@6.0.2): + nest-commander@3.20.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@types/inquirer@8.2.13)(@types/node@24.13.3)(@typescript/typescript6@6.0.2): dependencies: '@fig/complete-commander': 3.2.0(commander@11.1.0) - '@golevelup/nestjs-discovery': 5.0.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28) - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@golevelup/nestjs-discovery': 5.0.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@types/inquirer': 8.2.13 commander: 11.1.0 cosmiconfig: 8.3.6(@typescript/typescript6@6.0.2) @@ -23423,38 +23336,38 @@ snapshots: - '@types/node' - typescript - nestjs-cls@6.2.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2): + nestjs-cls@6.2.1(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2): dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) reflect-metadata: 0.2.2 rxjs: 7.8.2 - nestjs-kysely@3.1.2(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(kysely@0.28.17)(reflect-metadata@0.2.2): + nestjs-kysely@3.1.2(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(kysely@0.28.17)(reflect-metadata@0.2.2): dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) kysely: 0.28.17 reflect-metadata: 0.2.2 tslib: 2.8.1 - nestjs-otel@8.1.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(rxjs@7.8.2): + nestjs-otel@8.1.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(rxjs@7.8.2): dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) + '@nestjs/core': 11.1.28(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/platform-express@11.1.28)(@nestjs/websockets@11.1.28)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@opentelemetry/api': 1.9.1 '@opentelemetry/host-metrics': 0.38.3(@opentelemetry/api@1.9.1) rxjs: 7.8.2 tslib: 2.8.1 - nestjs-zod@5.4.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/swagger@11.4.5(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2))(rxjs@7.8.2)(zod@4.3.6): + nestjs-zod@5.5.0(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/swagger@11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2))(rxjs@7.8.2)(zod@4.3.6): dependencies: - '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1) deepmerge: 4.3.1 rxjs: 7.8.2 zod: 4.3.6 optionalDependencies: - '@nestjs/swagger': 11.4.5(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2) + '@nestjs/swagger': 11.4.6(@nestjs/common@11.1.28(reflect-metadata@0.2.2)(rxjs@7.8.2)(supports-color@8.1.1))(@nestjs/core@11.1.28)(@typescript/typescript6@6.0.2)(reflect-metadata@0.2.2) next-tick@1.1.0: {} @@ -23553,11 +23466,11 @@ snapshots: dependencies: boolbase: 1.0.0 - null-loader@4.0.1(webpack@5.108.4(postcss@8.5.19)): + null-loader@4.0.1(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) nwsapi@2.2.24: optional: true @@ -23593,18 +23506,18 @@ snapshots: obug@2.1.3: {} - oidc-provider@9.9.1: + oidc-provider@9.10.0(supports-color@8.1.1): dependencies: '@koa/cors': 5.0.0 - '@koa/router': 15.7.0(koa@3.2.1) - debug: 4.4.3 + '@koa/router': 15.7.0(koa@3.2.1)(supports-color@8.1.1) + debug: 4.4.3(supports-color@8.1.1) eta: 4.6.0 - jose: 6.2.3 + jose: 6.2.4 jsesc: 3.1.0 koa: 3.2.1 - nanoid: 5.1.16 + nanoid: 6.0.0 quick-lru: 7.3.0 - raw-body: 3.0.2 + raw-body: 4.0.0 transitivePeerDependencies: - supports-color @@ -23652,7 +23565,7 @@ snapshots: openid-client@6.8.4: dependencies: - jose: 6.2.3 + jose: 6.2.4 oauth4webapi: 3.8.6 optionator@0.9.4: @@ -23931,11 +23844,11 @@ snapshots: pvutils: 1.1.5 tslib: 2.8.1 - playwright-core@1.61.1: {} + playwright-core@1.62.0: {} - playwright@1.61.1: + playwright@1.62.0: dependencies: - playwright-core: 1.61.1 + playwright-core: 1.62.0 optionalDependencies: fsevents: 2.3.2 @@ -23969,448 +23882,448 @@ snapshots: path-data-parser: 0.1.0 points-on-curve: 0.2.0 - postcss-attribute-case-insensitive@7.0.1(postcss@8.5.19): + postcss-attribute-case-insensitive@7.0.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - postcss-calc@9.0.1(postcss@8.5.19): + postcss-calc@9.0.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 6.1.4 postcss-value-parser: 4.2.0 - postcss-clamp@4.1.0(postcss@8.5.19): + postcss-clamp@4.1.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-color-functional-notation@7.0.12(postcss@8.5.19): + postcss-color-functional-notation@7.0.12(postcss@8.5.25): dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - postcss-color-hex-alpha@10.0.0(postcss@8.5.19): + postcss-color-hex-alpha@10.0.0(postcss@8.5.25): dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-color-rebeccapurple@10.0.0(postcss@8.5.19): + postcss-color-rebeccapurple@10.0.0(postcss@8.5.25): dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-colormin@6.1.0(postcss@8.5.19): + postcss-colormin@6.1.0(postcss@8.5.25): dependencies: browserslist: 4.28.6 caniuse-api: 3.0.0 colord: 2.9.3 - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-convert-values@6.1.0(postcss@8.5.19): + postcss-convert-values@6.1.0(postcss@8.5.25): dependencies: browserslist: 4.28.6 - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-custom-media@11.0.6(postcss@8.5.19): + postcss-custom-media@11.0.6(postcss@8.5.25): dependencies: '@csstools/cascade-layer-name-parser': 2.0.5(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 '@csstools/media-query-list-parser': 4.0.3(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - postcss: 8.5.19 + postcss: 8.5.25 - postcss-custom-properties@14.0.6(postcss@8.5.19): + postcss-custom-properties@14.0.6(postcss@8.5.25): dependencies: '@csstools/cascade-layer-name-parser': 2.0.5(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-custom-selectors@8.0.5(postcss@8.5.19): + postcss-custom-selectors@8.0.5(postcss@8.5.25): dependencies: '@csstools/cascade-layer-name-parser': 2.0.5(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - postcss-dir-pseudo-class@9.0.1(postcss@8.5.19): + postcss-dir-pseudo-class@9.0.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - postcss-discard-comments@6.0.2(postcss@8.5.19): + postcss-discard-comments@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-discard-duplicates@6.0.3(postcss@8.5.19): + postcss-discard-duplicates@6.0.3(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-discard-empty@6.0.3(postcss@8.5.19): + postcss-discard-empty@6.0.3(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-discard-overridden@6.0.2(postcss@8.5.19): + postcss-discard-overridden@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-discard-unused@6.0.5(postcss@8.5.19): + postcss-discard-unused@6.0.5(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 6.1.4 - postcss-double-position-gradients@6.0.4(postcss@8.5.19): + postcss-double-position-gradients@6.0.4(postcss@8.5.25): dependencies: - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-focus-visible@10.0.1(postcss@8.5.19): + postcss-focus-visible@10.0.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - postcss-focus-within@9.0.1(postcss@8.5.19): + postcss-focus-within@9.0.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - postcss-font-variant@5.0.0(postcss@8.5.19): + postcss-font-variant@5.0.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-gap-properties@6.0.0(postcss@8.5.19): + postcss-gap-properties@6.0.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-image-set-function@7.0.0(postcss@8.5.19): + postcss-image-set-function@7.0.0(postcss@8.5.25): dependencies: - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-import@15.1.0(postcss@8.5.19): + postcss-import@15.1.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.12 - postcss-js@4.1.0(postcss@8.5.19): + postcss-js@4.1.0(postcss@8.5.25): dependencies: camelcase-css: 2.0.1 - postcss: 8.5.19 + postcss: 8.5.25 - postcss-lab-function@7.0.12(postcss@8.5.19): + postcss-lab-function@7.0.12(postcss@8.5.25): dependencies: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/utilities': 2.0.0(postcss@8.5.19) - postcss: 8.5.19 + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/utilities': 2.0.0(postcss@8.5.25) + postcss: 8.5.25 - postcss-load-config@3.1.4(postcss@8.5.19): + postcss-load-config@3.1.4(postcss@8.5.25): dependencies: lilconfig: 2.1.0 yaml: 1.10.3 optionalDependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-load-config@6.0.1(jiti@1.21.7)(postcss@8.5.19)(tsx@4.23.1)(yaml@2.9.0): + postcss-load-config@6.0.1(jiti@1.21.7)(postcss@8.5.25)(tsx@4.23.1)(yaml@2.9.0): dependencies: lilconfig: 3.1.3 optionalDependencies: jiti: 1.21.7 - postcss: 8.5.19 + postcss: 8.5.25 tsx: 4.23.1 yaml: 2.9.0 - postcss-loader@7.3.4(@typescript/typescript6@6.0.2)(postcss@8.5.19)(webpack@5.108.4(postcss@8.5.19)): + postcss-loader@7.3.4(@typescript/typescript6@6.0.2)(postcss@8.5.25)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: cosmiconfig: 8.3.6(@typescript/typescript6@6.0.2) jiti: 1.21.7 - postcss: 8.5.19 + postcss: 8.5.25 semver: 7.8.5 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) transitivePeerDependencies: - typescript - postcss-logical@8.1.0(postcss@8.5.19): + postcss-logical@8.1.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-merge-idents@6.0.3(postcss@8.5.19): + postcss-merge-idents@6.0.3(postcss@8.5.25): dependencies: - cssnano-utils: 4.0.2(postcss@8.5.19) - postcss: 8.5.19 + cssnano-utils: 4.0.2(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-merge-longhand@6.0.5(postcss@8.5.19): + postcss-merge-longhand@6.0.5(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - stylehacks: 6.1.1(postcss@8.5.19) + stylehacks: 6.1.1(postcss@8.5.25) - postcss-merge-rules@6.1.1(postcss@8.5.19): + postcss-merge-rules@6.1.1(postcss@8.5.25): dependencies: browserslist: 4.28.6 caniuse-api: 3.0.0 - cssnano-utils: 4.0.2(postcss@8.5.19) - postcss: 8.5.19 + cssnano-utils: 4.0.2(postcss@8.5.25) + postcss: 8.5.25 postcss-selector-parser: 6.1.4 - postcss-minify-font-values@6.1.0(postcss@8.5.19): + postcss-minify-font-values@6.1.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-minify-gradients@6.0.3(postcss@8.5.19): + postcss-minify-gradients@6.0.3(postcss@8.5.25): dependencies: colord: 2.9.3 - cssnano-utils: 4.0.2(postcss@8.5.19) - postcss: 8.5.19 + cssnano-utils: 4.0.2(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-minify-params@6.1.0(postcss@8.5.19): + postcss-minify-params@6.1.0(postcss@8.5.25): dependencies: browserslist: 4.28.6 - cssnano-utils: 4.0.2(postcss@8.5.19) - postcss: 8.5.19 + cssnano-utils: 4.0.2(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-minify-selectors@6.0.4(postcss@8.5.19): + postcss-minify-selectors@6.0.4(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 6.1.4 - postcss-modules-extract-imports@3.1.0(postcss@8.5.19): + postcss-modules-extract-imports@3.1.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-modules-local-by-default@4.2.0(postcss@8.5.19): + postcss-modules-local-by-default@4.2.0(postcss@8.5.25): dependencies: - icss-utils: 5.1.0(postcss@8.5.19) - postcss: 8.5.19 + icss-utils: 5.1.0(postcss@8.5.25) + postcss: 8.5.25 postcss-selector-parser: 7.1.4 postcss-value-parser: 4.2.0 - postcss-modules-scope@3.2.1(postcss@8.5.19): + postcss-modules-scope@3.2.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - postcss-modules-values@4.0.0(postcss@8.5.19): + postcss-modules-values@4.0.0(postcss@8.5.25): dependencies: - icss-utils: 5.1.0(postcss@8.5.19) - postcss: 8.5.19 + icss-utils: 5.1.0(postcss@8.5.25) + postcss: 8.5.25 - postcss-nested@6.2.0(postcss@8.5.19): + postcss-nested@6.2.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 6.1.4 - postcss-nesting@13.0.2(postcss@8.5.19): + postcss-nesting@13.0.2(postcss@8.5.25): dependencies: '@csstools/selector-resolve-nested': 3.1.0(postcss-selector-parser@7.1.4) '@csstools/selector-specificity': 5.0.0(postcss-selector-parser@7.1.4) - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - postcss-normalize-charset@6.0.2(postcss@8.5.19): + postcss-normalize-charset@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-normalize-display-values@6.0.2(postcss@8.5.19): + postcss-normalize-display-values@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-normalize-positions@6.0.2(postcss@8.5.19): + postcss-normalize-positions@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-normalize-repeat-style@6.0.2(postcss@8.5.19): + postcss-normalize-repeat-style@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-normalize-string@6.0.2(postcss@8.5.19): + postcss-normalize-string@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-normalize-timing-functions@6.0.2(postcss@8.5.19): + postcss-normalize-timing-functions@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-normalize-unicode@6.1.0(postcss@8.5.19): + postcss-normalize-unicode@6.1.0(postcss@8.5.25): dependencies: browserslist: 4.28.6 - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-normalize-url@6.0.2(postcss@8.5.19): + postcss-normalize-url@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-normalize-whitespace@6.0.2(postcss@8.5.19): + postcss-normalize-whitespace@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-opacity-percentage@3.0.0(postcss@8.5.19): + postcss-opacity-percentage@3.0.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-ordered-values@6.0.2(postcss@8.5.19): + postcss-ordered-values@6.0.2(postcss@8.5.25): dependencies: - cssnano-utils: 4.0.2(postcss@8.5.19) - postcss: 8.5.19 + cssnano-utils: 4.0.2(postcss@8.5.25) + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-overflow-shorthand@6.0.0(postcss@8.5.19): + postcss-overflow-shorthand@6.0.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-page-break@3.0.4(postcss@8.5.19): + postcss-page-break@3.0.4(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-place@10.0.0(postcss@8.5.19): + postcss-place@10.0.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-preset-env@10.6.1(postcss@8.5.19): + postcss-preset-env@10.6.1(postcss@8.5.25): dependencies: - '@csstools/postcss-alpha-function': 1.0.1(postcss@8.5.19) - '@csstools/postcss-cascade-layers': 5.0.2(postcss@8.5.19) - '@csstools/postcss-color-function': 4.0.12(postcss@8.5.19) - '@csstools/postcss-color-function-display-p3-linear': 1.0.1(postcss@8.5.19) - '@csstools/postcss-color-mix-function': 3.0.12(postcss@8.5.19) - '@csstools/postcss-color-mix-variadic-function-arguments': 1.0.2(postcss@8.5.19) - '@csstools/postcss-content-alt-text': 2.0.8(postcss@8.5.19) - '@csstools/postcss-contrast-color-function': 2.0.12(postcss@8.5.19) - '@csstools/postcss-exponential-functions': 2.0.9(postcss@8.5.19) - '@csstools/postcss-font-format-keywords': 4.0.0(postcss@8.5.19) - '@csstools/postcss-gamut-mapping': 2.0.11(postcss@8.5.19) - '@csstools/postcss-gradients-interpolation-method': 5.0.12(postcss@8.5.19) - '@csstools/postcss-hwb-function': 4.0.12(postcss@8.5.19) - '@csstools/postcss-ic-unit': 4.0.4(postcss@8.5.19) - '@csstools/postcss-initial': 2.0.1(postcss@8.5.19) - '@csstools/postcss-is-pseudo-class': 5.0.3(postcss@8.5.19) - '@csstools/postcss-light-dark-function': 2.0.11(postcss@8.5.19) - '@csstools/postcss-logical-float-and-clear': 3.0.0(postcss@8.5.19) - '@csstools/postcss-logical-overflow': 2.0.0(postcss@8.5.19) - '@csstools/postcss-logical-overscroll-behavior': 2.0.0(postcss@8.5.19) - '@csstools/postcss-logical-resize': 3.0.0(postcss@8.5.19) - '@csstools/postcss-logical-viewport-units': 3.0.4(postcss@8.5.19) - '@csstools/postcss-media-minmax': 2.0.9(postcss@8.5.19) - '@csstools/postcss-media-queries-aspect-ratio-number-values': 3.0.5(postcss@8.5.19) - '@csstools/postcss-nested-calc': 4.0.0(postcss@8.5.19) - '@csstools/postcss-normalize-display-values': 4.0.1(postcss@8.5.19) - '@csstools/postcss-oklab-function': 4.0.12(postcss@8.5.19) - '@csstools/postcss-position-area-property': 1.0.0(postcss@8.5.19) - '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.19) - '@csstools/postcss-property-rule-prelude-list': 1.0.0(postcss@8.5.19) - '@csstools/postcss-random-function': 2.0.1(postcss@8.5.19) - '@csstools/postcss-relative-color-syntax': 3.0.12(postcss@8.5.19) - '@csstools/postcss-scope-pseudo-class': 4.0.1(postcss@8.5.19) - '@csstools/postcss-sign-functions': 1.1.4(postcss@8.5.19) - '@csstools/postcss-stepped-value-functions': 4.0.9(postcss@8.5.19) - '@csstools/postcss-syntax-descriptor-syntax-production': 1.0.1(postcss@8.5.19) - '@csstools/postcss-system-ui-font-family': 1.0.0(postcss@8.5.19) - '@csstools/postcss-text-decoration-shorthand': 4.0.3(postcss@8.5.19) - '@csstools/postcss-trigonometric-functions': 4.0.9(postcss@8.5.19) - '@csstools/postcss-unset-value': 4.0.0(postcss@8.5.19) - autoprefixer: 10.5.4(postcss@8.5.19) + '@csstools/postcss-alpha-function': 1.0.1(postcss@8.5.25) + '@csstools/postcss-cascade-layers': 5.0.2(postcss@8.5.25) + '@csstools/postcss-color-function': 4.0.12(postcss@8.5.25) + '@csstools/postcss-color-function-display-p3-linear': 1.0.1(postcss@8.5.25) + '@csstools/postcss-color-mix-function': 3.0.12(postcss@8.5.25) + '@csstools/postcss-color-mix-variadic-function-arguments': 1.0.2(postcss@8.5.25) + '@csstools/postcss-content-alt-text': 2.0.8(postcss@8.5.25) + '@csstools/postcss-contrast-color-function': 2.0.12(postcss@8.5.25) + '@csstools/postcss-exponential-functions': 2.0.9(postcss@8.5.25) + '@csstools/postcss-font-format-keywords': 4.0.0(postcss@8.5.25) + '@csstools/postcss-gamut-mapping': 2.0.11(postcss@8.5.25) + '@csstools/postcss-gradients-interpolation-method': 5.0.12(postcss@8.5.25) + '@csstools/postcss-hwb-function': 4.0.12(postcss@8.5.25) + '@csstools/postcss-ic-unit': 4.0.4(postcss@8.5.25) + '@csstools/postcss-initial': 2.0.1(postcss@8.5.25) + '@csstools/postcss-is-pseudo-class': 5.0.3(postcss@8.5.25) + '@csstools/postcss-light-dark-function': 2.0.11(postcss@8.5.25) + '@csstools/postcss-logical-float-and-clear': 3.0.0(postcss@8.5.25) + '@csstools/postcss-logical-overflow': 2.0.0(postcss@8.5.25) + '@csstools/postcss-logical-overscroll-behavior': 2.0.0(postcss@8.5.25) + '@csstools/postcss-logical-resize': 3.0.0(postcss@8.5.25) + '@csstools/postcss-logical-viewport-units': 3.0.4(postcss@8.5.25) + '@csstools/postcss-media-minmax': 2.0.9(postcss@8.5.25) + '@csstools/postcss-media-queries-aspect-ratio-number-values': 3.0.5(postcss@8.5.25) + '@csstools/postcss-nested-calc': 4.0.0(postcss@8.5.25) + '@csstools/postcss-normalize-display-values': 4.0.1(postcss@8.5.25) + '@csstools/postcss-oklab-function': 4.0.12(postcss@8.5.25) + '@csstools/postcss-position-area-property': 1.0.0(postcss@8.5.25) + '@csstools/postcss-progressive-custom-properties': 4.2.1(postcss@8.5.25) + '@csstools/postcss-property-rule-prelude-list': 1.0.0(postcss@8.5.25) + '@csstools/postcss-random-function': 2.0.1(postcss@8.5.25) + '@csstools/postcss-relative-color-syntax': 3.0.12(postcss@8.5.25) + '@csstools/postcss-scope-pseudo-class': 4.0.1(postcss@8.5.25) + '@csstools/postcss-sign-functions': 1.1.4(postcss@8.5.25) + '@csstools/postcss-stepped-value-functions': 4.0.9(postcss@8.5.25) + '@csstools/postcss-syntax-descriptor-syntax-production': 1.0.1(postcss@8.5.25) + '@csstools/postcss-system-ui-font-family': 1.0.0(postcss@8.5.25) + '@csstools/postcss-text-decoration-shorthand': 4.0.3(postcss@8.5.25) + '@csstools/postcss-trigonometric-functions': 4.0.9(postcss@8.5.25) + '@csstools/postcss-unset-value': 4.0.0(postcss@8.5.25) + autoprefixer: 10.5.4(postcss@8.5.25) browserslist: 4.28.6 - css-blank-pseudo: 7.0.1(postcss@8.5.19) - css-has-pseudo: 7.0.3(postcss@8.5.19) - css-prefers-color-scheme: 10.0.0(postcss@8.5.19) + css-blank-pseudo: 7.0.1(postcss@8.5.25) + css-has-pseudo: 7.0.3(postcss@8.5.25) + css-prefers-color-scheme: 10.0.0(postcss@8.5.25) cssdb: 8.9.0 - postcss: 8.5.19 - postcss-attribute-case-insensitive: 7.0.1(postcss@8.5.19) - postcss-clamp: 4.1.0(postcss@8.5.19) - postcss-color-functional-notation: 7.0.12(postcss@8.5.19) - postcss-color-hex-alpha: 10.0.0(postcss@8.5.19) - postcss-color-rebeccapurple: 10.0.0(postcss@8.5.19) - postcss-custom-media: 11.0.6(postcss@8.5.19) - postcss-custom-properties: 14.0.6(postcss@8.5.19) - postcss-custom-selectors: 8.0.5(postcss@8.5.19) - postcss-dir-pseudo-class: 9.0.1(postcss@8.5.19) - postcss-double-position-gradients: 6.0.4(postcss@8.5.19) - postcss-focus-visible: 10.0.1(postcss@8.5.19) - postcss-focus-within: 9.0.1(postcss@8.5.19) - postcss-font-variant: 5.0.0(postcss@8.5.19) - postcss-gap-properties: 6.0.0(postcss@8.5.19) - postcss-image-set-function: 7.0.0(postcss@8.5.19) - postcss-lab-function: 7.0.12(postcss@8.5.19) - postcss-logical: 8.1.0(postcss@8.5.19) - postcss-nesting: 13.0.2(postcss@8.5.19) - postcss-opacity-percentage: 3.0.0(postcss@8.5.19) - postcss-overflow-shorthand: 6.0.0(postcss@8.5.19) - postcss-page-break: 3.0.4(postcss@8.5.19) - postcss-place: 10.0.0(postcss@8.5.19) - postcss-pseudo-class-any-link: 10.0.1(postcss@8.5.19) - postcss-replace-overflow-wrap: 4.0.0(postcss@8.5.19) - postcss-selector-not: 8.0.1(postcss@8.5.19) + postcss: 8.5.25 + postcss-attribute-case-insensitive: 7.0.1(postcss@8.5.25) + postcss-clamp: 4.1.0(postcss@8.5.25) + postcss-color-functional-notation: 7.0.12(postcss@8.5.25) + postcss-color-hex-alpha: 10.0.0(postcss@8.5.25) + postcss-color-rebeccapurple: 10.0.0(postcss@8.5.25) + postcss-custom-media: 11.0.6(postcss@8.5.25) + postcss-custom-properties: 14.0.6(postcss@8.5.25) + postcss-custom-selectors: 8.0.5(postcss@8.5.25) + postcss-dir-pseudo-class: 9.0.1(postcss@8.5.25) + postcss-double-position-gradients: 6.0.4(postcss@8.5.25) + postcss-focus-visible: 10.0.1(postcss@8.5.25) + postcss-focus-within: 9.0.1(postcss@8.5.25) + postcss-font-variant: 5.0.0(postcss@8.5.25) + postcss-gap-properties: 6.0.0(postcss@8.5.25) + postcss-image-set-function: 7.0.0(postcss@8.5.25) + postcss-lab-function: 7.0.12(postcss@8.5.25) + postcss-logical: 8.1.0(postcss@8.5.25) + postcss-nesting: 13.0.2(postcss@8.5.25) + postcss-opacity-percentage: 3.0.0(postcss@8.5.25) + postcss-overflow-shorthand: 6.0.0(postcss@8.5.25) + postcss-page-break: 3.0.4(postcss@8.5.25) + postcss-place: 10.0.0(postcss@8.5.25) + postcss-pseudo-class-any-link: 10.0.1(postcss@8.5.25) + postcss-replace-overflow-wrap: 4.0.0(postcss@8.5.25) + postcss-selector-not: 8.0.1(postcss@8.5.25) - postcss-pseudo-class-any-link@10.0.1(postcss@8.5.19): + postcss-pseudo-class-any-link@10.0.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 - postcss-reduce-idents@6.0.3(postcss@8.5.19): + postcss-reduce-idents@6.0.3(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-reduce-initial@6.1.0(postcss@8.5.19): + postcss-reduce-initial@6.1.0(postcss@8.5.25): dependencies: browserslist: 4.28.6 caniuse-api: 3.0.0 - postcss: 8.5.19 + postcss: 8.5.25 - postcss-reduce-transforms@6.0.2(postcss@8.5.19): + postcss-reduce-transforms@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 - postcss-replace-overflow-wrap@4.0.0(postcss@8.5.19): + postcss-replace-overflow-wrap@4.0.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-safe-parser@7.0.1(postcss@8.5.19): + postcss-safe-parser@7.0.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-scss@4.0.9(postcss@8.5.19): + postcss-scss@4.0.9(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss-selector-not@8.0.1(postcss@8.5.19): + postcss-selector-not@8.0.1(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 7.1.4 postcss-selector-parser@6.1.4: @@ -24423,29 +24336,29 @@ snapshots: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-sort-media-queries@5.2.0(postcss@8.5.19): + postcss-sort-media-queries@5.2.0(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 sort-css-media-queries: 2.2.0 - postcss-svgo@6.0.3(postcss@8.5.19): + postcss-svgo@6.0.3(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-value-parser: 4.2.0 svgo: 3.3.4 - postcss-unique-selectors@6.0.4(postcss@8.5.19): + postcss-unique-selectors@6.0.4(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 6.1.4 postcss-value-parser@4.2.0: {} - postcss-zindex@6.0.2(postcss@8.5.19): + postcss-zindex@6.0.2(postcss@8.5.25): dependencies: - postcss: 8.5.19 + postcss: 8.5.25 - postcss@8.5.19: + postcss@8.5.25: dependencies: nanoid: 3.3.16 picocolors: 1.1.1 @@ -24489,21 +24402,21 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier-plugin-organize-imports@4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.5): + prettier-plugin-organize-imports@4.3.0(@typescript/typescript6@6.0.2)(prettier@3.9.6): dependencies: - prettier: 3.9.5 + prettier: 3.9.6 typescript: '@typescript/typescript6@6.0.2' - prettier-plugin-sort-json@4.2.0(prettier@3.9.5): + prettier-plugin-sort-json@4.2.0(prettier@3.9.6): dependencies: - prettier: 3.9.5 + prettier: 3.9.6 - prettier-plugin-svelte@4.1.1(prettier@3.9.5)(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + prettier-plugin-svelte@4.1.1(prettier@3.9.6)(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: - prettier: 3.9.5 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + prettier: 3.9.6 + svelte: 5.56.8(@typescript-eslint/types@8.65.0) - prettier@3.9.5: {} + prettier@3.9.6: {} pretty-error@4.0.0: dependencies: @@ -24518,11 +24431,11 @@ snapshots: pretty-time@1.1.0: {} - prism-react-renderer@2.4.1(react@19.2.7): + prism-react-renderer@2.4.1(react@19.2.8): dependencies: '@types/prismjs': 1.26.6 clsx: 2.1.1 - react: 19.2.7 + react: 19.2.8 prismjs@1.30.0: {} @@ -24549,9 +24462,9 @@ snapshots: retry: 0.12.0 signal-exit: 3.0.7 - properties-reader@3.0.1: + properties-reader@3.0.1(supports-color@8.1.1): dependencies: - '@kwsites/file-exists': 1.1.1 + '@kwsites/file-exists': 1.1.1(supports-color@8.1.1) mkdirp: 3.0.1 transitivePeerDependencies: - supports-color @@ -24658,11 +24571,16 @@ snapshots: iconv-lite: 0.7.3 unpipe: 1.0.0 - raw-loader@4.0.2(webpack@5.108.4(postcss@8.5.19)): + raw-body@4.0.0: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + + raw-loader@4.0.2(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) rc@1.2.8: dependencies: @@ -24671,15 +24589,15 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-dom@19.2.7(react@19.2.7): + react-dom@19.2.8(react@19.2.8): dependencies: - react: 19.2.7 + react: 19.2.8 scheduler: 0.27.0 - react-email@5.2.11: + react-email@5.2.11(supports-color@8.1.1): dependencies: '@babel/parser': 7.27.0 - '@babel/traverse': 7.27.0 + '@babel/traverse': 7.27.0(supports-color@8.1.1) chokidar: 4.0.3 commander: 13.1.0 conf: 15.1.0 @@ -24693,7 +24611,7 @@ snapshots: nypm: 0.6.5 ora: 8.2.0 prompts: 2.4.2 - socket.io: 4.8.3 + socket.io: 4.8.3(supports-color@8.1.1) tsconfig-paths: 4.2.0 transitivePeerDependencies: - bufferutil @@ -24706,34 +24624,34 @@ snapshots: react-is@17.0.2: {} - react-json-view-lite@2.5.0(react@19.2.7): + react-json-view-lite@2.5.0(react@19.2.8): dependencies: - react: 19.2.7 + react: 19.2.8 - react-loadable-ssr-addon-v5-slorber@1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.7))(webpack@5.108.4(postcss@8.5.19)): + react-loadable-ssr-addon-v5-slorber@1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.8))(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: '@babel/runtime': 7.29.7 - react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.7)' - webpack: 5.108.4(postcss@8.5.19) + react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.8)' + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) - react-router-config@5.1.1(react-router@5.3.4(react@19.2.7))(react@19.2.7): + react-router-config@5.1.1(react-router@5.3.4(react@19.2.8))(react@19.2.8): dependencies: '@babel/runtime': 7.29.7 - react: 19.2.7 - react-router: 5.3.4(react@19.2.7) + react: 19.2.8 + react-router: 5.3.4(react@19.2.8) - react-router-dom@5.3.4(react@19.2.7): + react-router-dom@5.3.4(react@19.2.8): dependencies: '@babel/runtime': 7.29.7 history: 4.10.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.2.7 - react-router: 5.3.4(react@19.2.7) + react: 19.2.8 + react-router: 5.3.4(react@19.2.8) tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - react-router@5.3.4(react@19.2.7): + react-router@5.3.4(react@19.2.8): dependencies: '@babel/runtime': 7.29.7 history: 4.10.1 @@ -24741,12 +24659,12 @@ snapshots: loose-envify: 1.4.0 path-to-regexp: 1.9.0 prop-types: 15.8.1 - react: 19.2.7 + react: 19.2.8 react-is: 16.13.1 tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - react@19.2.7: {} + react@19.2.8: {} read-cache@1.0.0: dependencies: @@ -24794,10 +24712,10 @@ snapshots: estree-util-build-jsx: 3.0.1 vfile: 6.0.3 - recma-jsx@1.0.1(acorn@8.17.0): + recma-jsx@1.0.1(acorn@8.18.0): dependencies: - acorn: 8.17.0 - acorn-jsx: 5.3.2(acorn@8.17.0) + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) estree-util-to-js: 2.0.0 recma-parse: 1.0.0 recma-stringify: 1.0.0 @@ -24870,20 +24788,20 @@ snapshots: hast-util-raw: 9.1.0 vfile: 6.0.3 - rehype-recma@1.0.0: + rehype-recma@1.0.0(supports-color@8.1.1): dependencies: '@types/estree': 1.0.9 '@types/hast': 3.0.5 - hast-util-to-estree: 3.1.3 + hast-util-to-estree: 3.1.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color relateurl@0.2.7: {} - remark-directive@3.0.1: + remark-directive@3.0.1(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-directive: 3.1.0 + mdast-util-directive: 3.1.0(supports-color@8.1.1) micromark-extension-directive: 3.0.2 unified: 11.0.5 transitivePeerDependencies: @@ -24897,37 +24815,37 @@ snapshots: node-emoji: 2.2.0 unified: 11.0.5 - remark-frontmatter@5.0.0: + remark-frontmatter@5.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-frontmatter: 2.0.1 + mdast-util-frontmatter: 2.0.1(supports-color@8.1.1) micromark-extension-frontmatter: 2.0.0 unified: 11.0.5 transitivePeerDependencies: - supports-color - remark-gfm@4.0.1: + remark-gfm@4.0.1(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-gfm: 3.1.0 + mdast-util-gfm: 3.1.0(supports-color@8.1.1) micromark-extension-gfm: 3.0.0 - remark-parse: 11.0.0 + remark-parse: 11.0.0(supports-color@8.1.1) remark-stringify: 11.0.0 unified: 11.0.5 transitivePeerDependencies: - supports-color - remark-mdx@3.1.1: + remark-mdx@3.1.1(supports-color@8.1.1): dependencies: - mdast-util-mdx: 3.0.0 + mdast-util-mdx: 3.0.0(supports-color@8.1.1) micromark-extension-mdxjs: 3.0.0 transitivePeerDependencies: - supports-color - remark-parse@11.0.0: + remark-parse@11.0.0(supports-color@8.1.1): dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.3(supports-color@8.1.1) micromark-util-types: 2.0.2 unified: 11.0.5 transitivePeerDependencies: @@ -24961,9 +24879,9 @@ snapshots: require-from-string@2.0.2: {} - require-in-the-middle@8.0.1: + require-in-the-middle@8.0.1(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) module-details-from-path: 1.0.4 transitivePeerDependencies: - supports-color @@ -25092,9 +25010,9 @@ snapshots: points-on-curve: 0.2.0 points-on-path: 0.2.1 - router@2.2.0: + router@2.2.0(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 @@ -25109,7 +25027,7 @@ snapshots: dependencies: escalade: 3.2.0 picocolors: 1.1.1 - postcss: 8.5.19 + postcss: 8.5.25 strip-json-comments: 3.1.1 run-applescript@7.1.0: {} @@ -25120,14 +25038,14 @@ snapshots: dependencies: queue-microtask: 1.2.3 - runed@0.35.1(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + runed@0.35.1(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: dequal: 2.0.3 esm-env: 1.2.2 lz-string: 1.5.0 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) optionalDependencies: - '@sveltejs/kit': 2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + '@sveltejs/kit': 2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) rw@1.3.3: {} @@ -25153,7 +25071,7 @@ snapshots: dependencies: truncate-utf8-bytes: 1.0.2 - sass@1.101.0: + sass@1.102.0: dependencies: chokidar: 5.0.0 immutable: 5.1.6 @@ -25211,9 +25129,9 @@ snapshots: semver@7.8.5: {} - send@0.19.2: + send@0.19.2(supports-color@8.1.1): dependencies: - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) depd: 2.0.0 destroy: 1.2.0 encodeurl: 2.0.0 @@ -25229,9 +25147,9 @@ snapshots: transitivePeerDependencies: - supports-color - send@1.2.1: + send@1.2.1(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 @@ -25259,11 +25177,11 @@ snapshots: path-to-regexp: 3.3.0 range-parser: 1.2.0 - serve-index@1.9.2: + serve-index@1.9.2(supports-color@8.1.1): dependencies: accepts: 1.3.8 batch: 0.6.1 - debug: 2.6.9 + debug: 2.6.9(supports-color@8.1.1) escape-html: 1.0.3 http-errors: 1.8.1 mime-types: 2.1.35 @@ -25271,21 +25189,21 @@ snapshots: transitivePeerDependencies: - supports-color - serve-static@1.16.3: + serve-static@1.16.3(supports-color@8.1.1): dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 0.19.2 + send: 0.19.2(supports-color@8.1.1) transitivePeerDependencies: - supports-color - serve-static@2.2.1: + serve-static@2.2.1(supports-color@8.1.1): dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 1.2.1 + send: 1.2.1(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -25404,7 +25322,7 @@ snapshots: simple-concat: 1.0.1 optional: true - simple-icons@16.26.0: {} + simple-icons@16.27.1: {} sirv@2.0.4: dependencies: @@ -25442,42 +25360,42 @@ snapshots: dot-case: 3.0.4 tslib: 2.8.1 - socket.io-adapter@2.5.7: + socket.io-adapter@2.5.7(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) ws: 8.20.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - socket.io-client@4.8.3: + socket.io-client@4.8.3(supports-color@8.1.1): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.4.3 - engine.io-client: 6.6.5 - socket.io-parser: 4.2.6 + debug: 4.4.3(supports-color@8.1.1) + engine.io-client: 6.6.5(supports-color@8.1.1) + socket.io-parser: 4.2.6(supports-color@8.1.1) transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - socket.io-parser@4.2.6: + socket.io-parser@4.2.6(supports-color@8.1.1): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) transitivePeerDependencies: - supports-color - socket.io@4.8.3: + socket.io@4.8.3(supports-color@8.1.1): dependencies: accepts: 1.3.8 base64id: 2.0.0 cors: 2.8.6 - debug: 4.4.3 - engine.io: 6.6.8 - socket.io-adapter: 2.5.7 - socket.io-parser: 4.2.6 + debug: 4.4.3(supports-color@8.1.1) + engine.io: 6.6.8(supports-color@8.1.1) + socket.io-adapter: 2.5.7(supports-color@8.1.1) + socket.io-parser: 4.2.6(supports-color@8.1.1) transitivePeerDependencies: - bufferutil - supports-color @@ -25508,9 +25426,9 @@ snapshots: space-separated-tokens@2.0.2: {} - spdy-transport@3.0.0: + spdy-transport@3.0.0(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 @@ -25519,13 +25437,13 @@ snapshots: transitivePeerDependencies: - supports-color - spdy@4.0.2: + spdy@4.0.2(supports-color@8.1.1): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) handle-thing: 2.0.1 http-deceiver: 1.2.7 select-hose: 2.0.0 - spdy-transport: 3.0.0 + spdy-transport: 3.0.0(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -25665,10 +25583,10 @@ snapshots: dependencies: inline-style-parser: 0.2.7 - stylehacks@6.1.1(postcss@8.5.19): + stylehacks@6.1.1(postcss@8.5.25): dependencies: browserslist: 4.28.6 - postcss: 8.5.19 + postcss: 8.5.25 postcss-selector-parser: 6.1.4 stylis@4.4.0: {} @@ -25689,11 +25607,11 @@ snapshots: make-asynchronous: 1.1.0 time-span: 5.1.0 - superagent@10.3.0: + superagent@10.3.0(supports-color@8.1.1): dependencies: component-emitter: 1.3.1 cookiejar: 2.1.4 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) fast-safe-stringify: 2.1.1 form-data: 4.0.6 formidable: 3.5.4 @@ -25703,11 +25621,11 @@ snapshots: transitivePeerDependencies: - supports-color - supertest@7.2.2: + supertest@7.2.2(supports-color@8.1.1): dependencies: cookie-signature: 1.2.2 methods: 1.1.2 - superagent: 10.3.0 + superagent: 10.3.0(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -25721,11 +25639,11 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte-awesome@3.3.5(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + svelte-awesome@3.3.5(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) - svelte-check@4.7.3(@typescript/typescript6@6.0.2)(picomatch@4.0.5)(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + svelte-check@4.7.3(@typescript/typescript6@6.0.2)(picomatch@4.0.5)(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: '@jridgewell/trace-mapping': 0.3.31 '@sveltejs/load-config': 0.2.0 @@ -25733,27 +25651,27 @@ snapshots: fdir: 6.5.0(picomatch@4.0.5) picocolors: 1.1.1 sade: 1.8.1 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - picomatch - svelte-eslint-parser@1.8.0(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + svelte-eslint-parser@1.8.0(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 espree: 10.4.0 - postcss: 8.5.19 - postcss-scss: 4.0.9(postcss@8.5.19) + postcss: 8.5.25 + postcss-scss: 4.0.9(postcss@8.5.25) postcss-selector-parser: 7.1.4 semver: 7.8.5 optionalDependencies: - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) svelte-floating-ui@1.5.8: dependencies: - '@floating-ui/core': 1.7.5 - '@floating-ui/dom': 1.7.6 + '@floating-ui/core': 1.8.0 + '@floating-ui/dom': 1.8.0 svelte-gestures@5.2.2: {} @@ -25761,7 +25679,7 @@ snapshots: dependencies: highlight.js: 11.11.1 - svelte-i18n@4.0.1(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + svelte-i18n@4.0.1(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: cli-color: 2.0.4 deepmerge: 4.3.1 @@ -25769,85 +25687,85 @@ snapshots: estree-walker: 2.0.2 intl-messageformat: 10.7.18 sade: 1.8.1 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) tiny-glob: 0.2.9 - svelte-jsoneditor@3.12.0(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + svelte-jsoneditor@3.13.0(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: '@codemirror/autocomplete': 6.20.3 - '@codemirror/commands': 6.10.3 + '@codemirror/commands': 6.10.4 '@codemirror/lang-json': 6.0.2 - '@codemirror/language': 6.12.3 + '@codemirror/language': 6.12.4 '@codemirror/lint': 6.9.7 - '@codemirror/search': 6.7.0 - '@codemirror/state': 6.6.0 - '@codemirror/view': 6.43.1 - '@fortawesome/free-regular-svg-icons': 7.2.0 - '@fortawesome/free-solid-svg-icons': 7.2.0 + '@codemirror/search': 6.7.1 + '@codemirror/state': 6.7.1 + '@codemirror/view': 6.43.7 + '@fortawesome/free-regular-svg-icons': 7.3.1 + '@fortawesome/free-solid-svg-icons': 7.3.1 '@jsonquerylang/jsonquery': 5.1.1 '@lezer/highlight': 1.2.3 - '@replit/codemirror-indentation-markers': 6.5.3(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.43.1) + '@replit/codemirror-indentation-markers': 6.5.3(@codemirror/language@6.12.4)(@codemirror/state@6.7.1)(@codemirror/view@6.43.7) ajv: 8.20.0 - codemirror-wrapped-line-indent: 1.0.9(@codemirror/language@6.12.3)(@codemirror/state@6.6.0)(@codemirror/view@6.43.1) + codemirror-wrapped-line-indent: 1.0.9(@codemirror/language@6.12.4)(@codemirror/state@6.7.1)(@codemirror/view@6.43.7) diff-sequences: 29.6.3 - immutable-json-patch: 6.0.2 + immutable-json-patch: 6.0.3 jmespath: 0.16.0 json-source-map: 0.6.1 jsonpath-plus: 10.4.0 - jsonrepair: 3.14.0 + jsonrepair: 3.15.0 lodash-es: 4.18.1 memoize-one: 6.0.0 natural-compare-lite: 1.4.0 - sass: 1.101.0 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) - svelte-awesome: 3.3.5(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + sass: 1.102.0 + svelte: 5.56.8(@typescript-eslint/types@8.65.0) + svelte-awesome: 3.3.5(svelte@5.56.8(@typescript-eslint/types@8.65.0)) svelte-select: 5.8.3 vanilla-picker: 2.12.3 - svelte-maplibre@1.3.0(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + svelte-maplibre@1.3.0(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: d3-geo: 3.1.1 dequal: 2.0.3 just-compare: 2.3.0 maplibre-gl: 5.24.0 pmtiles: 3.2.1 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) - svelte-parse-markup@0.1.5(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + svelte-parse-markup@0.1.5(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) - svelte-persisted-store@0.12.0(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + svelte-persisted-store@0.12.0(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) svelte-select@5.8.3: dependencies: svelte-floating-ui: 1.5.8 - svelte-toolbelt@0.10.6(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.5(@typescript-eslint/types@8.64.0)): + svelte-toolbelt@0.10.6(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.65.0)): dependencies: clsx: 2.1.1 - runed: 0.35.1(@sveltejs/kit@2.69.3(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.5(@typescript-eslint/types@8.64.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.5(@typescript-eslint/types@8.64.0)) + runed: 0.35.1(@sveltejs/kit@2.70.1(@opentelemetry/api@1.9.1)(@sveltejs/vite-plugin-svelte@7.2.0(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(@typescript/typescript6@6.0.2)(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)))(svelte@5.56.8(@typescript-eslint/types@8.65.0)) style-to-object: 1.0.14 - svelte: 5.56.5(@typescript-eslint/types@8.64.0) + svelte: 5.56.8(@typescript-eslint/types@8.65.0) transitivePeerDependencies: - '@sveltejs/kit' - svelte@5.56.5(@typescript-eslint/types@8.64.0): + svelte@5.56.8(@typescript-eslint/types@8.65.0): dependencies: '@jridgewell/remapping': 2.3.5 '@jridgewell/sourcemap-codec': 1.5.5 - '@sveltejs/acorn-typescript': 1.0.11(acorn@8.17.0) + '@sveltejs/acorn-typescript': 1.0.11(acorn@8.18.0) '@types/estree': 1.0.9 '@types/trusted-types': 2.0.7 - acorn: 8.17.0 + acorn: 8.18.0 aria-query: 5.3.1 axobject-query: 4.1.0 clsx: 2.1.1 - devalue: 5.8.1 + devalue: 5.8.2 esm-env: 1.2.2 - esrap: 2.2.13(@typescript-eslint/types@8.64.0) + esrap: 2.2.13(@typescript-eslint/types@8.65.0) is-reference: 3.0.3 locate-character: 3.0.0 magic-string: 0.30.21 @@ -25890,9 +25808,9 @@ snapshots: tailwind-merge@3.6.0: {} - tailwind-variants@3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.2): + tailwind-variants@3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.3): dependencies: - tailwindcss: 4.3.2 + tailwindcss: 4.3.3 optionalDependencies: tailwind-merge: 3.6.0 @@ -25926,11 +25844,11 @@ snapshots: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.1.1 - postcss: 8.5.19 - postcss-import: 15.1.0(postcss@8.5.19) - postcss-js: 4.1.0(postcss@8.5.19) - postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.19)(tsx@4.23.1)(yaml@2.9.0) - postcss-nested: 6.2.0(postcss@8.5.19) + postcss: 8.5.25 + postcss-import: 15.1.0(postcss@8.5.25) + postcss-js: 4.1.0(postcss@8.5.25) + postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.25)(tsx@4.23.1)(yaml@2.9.0) + postcss-nested: 6.2.0(postcss@8.5.25) postcss-selector-parser: 6.1.4 resolve: 1.22.12 sucrase: 3.35.1 @@ -25938,7 +25856,7 @@ snapshots: - tsx - yaml - tailwindcss@4.3.2: {} + tailwindcss@4.3.3: {} tapable@2.3.3: {} @@ -26004,51 +25922,62 @@ snapshots: - bare-abort-controller - react-native-b4a - terser-webpack-plugin@5.6.1(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0)(webpack@5.106.2(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0)): + terser-webpack-plugin@5.6.1(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)(webpack@5.106.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.49.0 - webpack: 5.106.2(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0) - optionalDependencies: - '@swc/core': 1.15.43(@swc/helpers@0.5.23) - esbuild: 0.28.1 - lightningcss: 1.33.0 - - terser-webpack-plugin@5.6.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(webpack@5.108.4(postcss@8.5.19)): - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - jest-worker: 27.5.1 - schema-utils: 4.3.3 - terser: 5.49.0 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.106.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) optionalDependencies: + '@swc/core': 1.15.46(@swc/helpers@0.5.23) clean-css: 5.3.3 - cssnano: 6.1.2(postcss@8.5.19) + cssnano: 6.1.2(postcss@8.5.25) + csso: 5.0.5 + esbuild: 0.28.1 html-minifier-terser: 7.2.0 - postcss: 8.5.19 + lightningcss: 1.33.0 + postcss: 8.5.25 + uglify-js: 3.19.3 + + terser-webpack-plugin@5.6.1(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + jest-worker: 27.5.1 + schema-utils: 4.3.3 + terser: 5.49.0 + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) + optionalDependencies: + '@swc/core': 1.15.46(@swc/helpers@0.5.23) + clean-css: 5.3.3 + cssnano: 6.1.2(postcss@8.5.25) + csso: 5.0.5 + esbuild: 0.28.1 + html-minifier-terser: 7.2.0 + lightningcss: 1.33.0 + postcss: 8.5.25 + uglify-js: 3.19.3 terser@5.49.0: dependencies: '@jridgewell/source-map': 0.3.11 - acorn: 8.17.0 + acorn: 8.18.0 commander: 2.20.3 source-map-support: 0.5.21 - testcontainers@12.0.4: + testcontainers@12.0.4(supports-color@8.1.1): dependencies: '@balena/dockerignore': 1.0.2 '@types/dockerode': 4.0.1 archiver: 7.0.1 async-lock: 1.4.1 byline: 5.0.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) docker-compose: 1.4.2 - dockerode: 5.0.1 + dockerode: 5.0.1(supports-color@8.1.1) get-port: 5.1.1 proper-lockfile: 4.1.2 - properties-reader: 3.0.1 + properties-reader: 3.0.1(supports-color@8.1.1) ssh-remote-port-forward: 1.0.4 tar-fs: 3.1.3 tmp: 0.2.7 @@ -26079,8 +26008,6 @@ snapshots: dependencies: tslib: 2.8.1 - three@0.184.0: {} - three@0.185.1: {} through@2.3.8: {} @@ -26210,7 +26137,7 @@ snapshots: tsconfig-paths-webpack-plugin@4.2.0: dependencies: chalk: 4.1.2 - enhanced-resolve: 5.24.2 + enhanced-resolve: 5.24.4 tapable: 2.3.3 tsconfig-paths: 4.2.0 @@ -26278,13 +26205,13 @@ snapshots: typedarray@0.0.6: {} - typescript-eslint@8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)): + typescript-eslint@8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): dependencies: - '@typescript-eslint/eslint-plugin': 8.64.0(@typescript-eslint/parser@8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)))(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - '@typescript-eslint/parser': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - '@typescript-eslint/typescript-estree': 8.64.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/utils': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - eslint: 10.7.0(jiti@2.7.0) + '@typescript-eslint/eslint-plugin': 8.65.0(@typescript-eslint/parser@8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1))(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/parser': 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + '@typescript-eslint/typescript-estree': 8.65.0(@typescript/typescript6@6.0.2)(supports-color@8.1.1) + '@typescript-eslint/utils': 8.65.0(@typescript/typescript6@6.0.2)(eslint@10.8.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + eslint: 10.8.0(jiti@2.7.0)(supports-color@8.1.1) typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color @@ -26432,10 +26359,10 @@ snapshots: unpipe@1.0.0: {} - unplugin-swc@1.5.9(@swc/core@1.15.43(@swc/helpers@0.5.23))(rollup@4.62.0): + unplugin-swc@1.5.9(@swc/core@1.15.46(@swc/helpers@0.5.23))(rollup@4.62.0): dependencies: '@rollup/pluginutils': 5.4.0(rollup@4.62.0) - '@swc/core': 1.15.43(@swc/helpers@0.5.23) + '@swc/core': 1.15.46(@swc/helpers@0.5.23) load-tsconfig: 0.2.5 unplugin: 2.3.11 transitivePeerDependencies: @@ -26444,7 +26371,7 @@ snapshots: unplugin@2.3.11: dependencies: '@jridgewell/remapping': 2.3.5 - acorn: 8.17.0 + acorn: 8.18.0 picomatch: 4.0.5 webpack-virtual-modules: 0.6.2 @@ -26477,14 +26404,14 @@ snapshots: dependencies: punycode: 2.3.1 - url-loader@4.1.1(file-loader@6.2.0(webpack@5.108.4(postcss@8.5.19)))(webpack@5.108.4(postcss@8.5.19)): + url-loader@4.1.1(file-loader@6.2.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)))(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: loader-utils: 2.0.4 mime-types: 2.1.35 schema-utils: 3.3.0 - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) optionalDependencies: - file-loader: 6.2.0(webpack@5.108.4(postcss@8.5.19)) + file-loader: 6.2.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) url@0.11.4: dependencies: @@ -26503,9 +26430,9 @@ snapshots: utils-merge@1.0.1: {} - utimes@5.2.1: + utimes@5.2.1(supports-color@8.1.1): dependencies: - '@mapbox/node-pre-gyp': 1.0.11 + '@mapbox/node-pre-gyp': 1.0.11(supports-color@8.1.1) node-addon-api: 4.3.0 transitivePeerDependencies: - encoding @@ -26566,13 +26493,13 @@ snapshots: transitivePeerDependencies: - rollup - vite-node@3.2.4(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0): + vite-node@3.2.4(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0): dependencies: cac: 6.7.14 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vite: 7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) transitivePeerDependencies: - '@types/node' - jiti @@ -26587,22 +26514,22 @@ snapshots: - tsx - yaml - vite-tsconfig-paths@6.1.1(@typescript/typescript6@6.0.2)(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)): + vite-tsconfig-paths@6.1.1(@typescript/typescript6@6.0.2)(supports-color@8.1.1)(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) globrex: 0.1.2 tsconfck: 3.1.6(@typescript/typescript6@6.0.2) - vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) transitivePeerDependencies: - supports-color - typescript - vite@7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0): + vite@7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0): dependencies: esbuild: 0.28.1 fdir: 6.5.0(picomatch@4.0.5) picomatch: 4.0.5 - postcss: 8.5.19 + postcss: 8.5.25 rollup: 4.62.0 tinyglobby: 0.2.17 optionalDependencies: @@ -26610,16 +26537,16 @@ snapshots: fsevents: 2.3.3 jiti: 2.7.0 lightningcss: 1.33.0 - sass: 1.101.0 + sass: 1.102.0 terser: 5.49.0 tsx: 4.23.1 yaml: 2.9.0 - vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0): + vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0): dependencies: lightningcss: 1.33.0 picomatch: 4.0.5 - postcss: 8.5.19 + postcss: 8.5.25 rolldown: 1.1.5 tinyglobby: 0.2.17 optionalDependencies: @@ -26627,31 +26554,31 @@ snapshots: esbuild: 0.28.1 fsevents: 2.3.3 jiti: 2.7.0 - sass: 1.101.0 + sass: 1.102.0 terser: 5.49.0 tsx: 4.23.1 yaml: 2.9.0 - vitefu@1.1.3(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)): + vitefu@1.1.3(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)): optionalDependencies: - vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) vitest-fetch-mock@0.4.5(vitest@4.1.10): dependencies: - vitest: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.10.6)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + vitest: 4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) - vitest@3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.10.6)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3))(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0): + vitest@3.2.7(@types/debug@4.1.13)(@types/node@24.13.3)(happy-dom@20.11.1)(jiti@2.7.0)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0): dependencies: '@types/chai': 5.2.3 '@vitest/expect': 3.2.7 - '@vitest/mocker': 3.2.7(vite@7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + '@vitest/mocker': 3.2.7(vite@7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@vitest/pretty-format': 3.2.7 '@vitest/runner': 3.2.7 '@vitest/snapshot': 3.2.7 '@vitest/spy': 3.2.7 '@vitest/utils': 3.2.7 chai: 5.3.3 - debug: 4.4.3 + debug: 4.4.3(supports-color@8.1.1) expect-type: 1.4.0 magic-string: 0.30.21 pathe: 2.0.3 @@ -26662,14 +26589,14 @@ snapshots: tinyglobby: 0.2.17 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) - vite-node: 3.2.4(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vite: 7.3.6(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vite-node: 3.2.4(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.33.0)(sass@1.102.0)(supports-color@8.1.1)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.13 '@types/node': 24.13.3 - happy-dom: 20.10.6 - jsdom: 26.1.0(canvas@3.2.3) + happy-dom: 20.11.1 + jsdom: 26.1.0(canvas@3.2.3)(supports-color@8.1.1) transitivePeerDependencies: - jiti - less @@ -26684,10 +26611,10 @@ snapshots: - tsx - yaml - vitest@4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.10.6)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)): + vitest@4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3)(supports-color@8.1.1))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)): dependencies: '@vitest/expect': 4.1.10 - '@vitest/mocker': 4.1.10(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + '@vitest/mocker': 4.1.10(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@vitest/pretty-format': 4.1.10 '@vitest/runner': 4.1.10 '@vitest/snapshot': 4.1.10 @@ -26704,13 +26631,44 @@ snapshots: tinyexec: 1.2.4 tinyglobby: 0.2.17 tinyrainbow: 3.1.0 - vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.101.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) why-is-node-running: 2.3.0 optionalDependencies: '@opentelemetry/api': 1.9.1 '@types/node': 24.13.3 '@vitest/coverage-v8': 4.1.10(vitest@4.1.10) - happy-dom: 20.10.6 + happy-dom: 20.11.1 + jsdom: 26.1.0(canvas@3.2.3)(supports-color@8.1.1) + transitivePeerDependencies: + - msw + + vitest@4.1.10(@opentelemetry/api@1.9.1)(@types/node@24.13.3)(@vitest/coverage-v8@4.1.10)(happy-dom@20.11.1)(jsdom@26.1.0(canvas@3.2.3))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)): + dependencies: + '@vitest/expect': 4.1.10 + '@vitest/mocker': 4.1.10(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) + '@vitest/pretty-format': 4.1.10 + '@vitest/runner': 4.1.10 + '@vitest/snapshot': 4.1.10 + '@vitest/spy': 4.1.10 + '@vitest/utils': 4.1.10 + es-module-lexer: 2.3.1 + expect-type: 1.4.0 + magic-string: 0.30.21 + obug: 2.1.3 + pathe: 2.0.3 + picomatch: 4.0.5 + std-env: 4.2.0 + tinybench: 2.9.0 + tinyexec: 1.2.4 + tinyglobby: 0.2.17 + tinyrainbow: 3.1.0 + vite: 8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@opentelemetry/api': 1.9.1 + '@types/node': 24.13.3 + '@vitest/coverage-v8': 4.1.10(vitest@4.1.10) + happy-dom: 20.11.1 jsdom: 26.1.0(canvas@3.2.3) transitivePeerDependencies: - msw @@ -26748,7 +26706,7 @@ snapshots: webpack-bundle-analyzer@4.10.2: dependencies: '@discoveryjs/json-ext': 0.5.7 - acorn: 8.17.0 + acorn: 8.18.0 acorn-walk: 8.3.5 commander: 7.2.0 debounce: 1.2.1 @@ -26763,7 +26721,7 @@ snapshots: - bufferutil - utf-8-validate - webpack-dev-middleware@7.4.5(tslib@2.8.1)(webpack@5.108.4(postcss@8.5.19)): + webpack-dev-middleware@7.4.5(tslib@2.8.1)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: colorette: 2.0.20 memfs: 4.64.0(tslib@2.8.1) @@ -26772,11 +26730,11 @@ snapshots: range-parser: 1.3.0 schema-utils: 4.3.3 optionalDependencies: - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) transitivePeerDependencies: - tslib - webpack-dev-server@5.2.6(tslib@2.8.1)(webpack@5.108.4(postcss@8.5.19)): + webpack-dev-server@5.2.6(debug@4.4.3(supports-color@8.1.1))(supports-color@8.1.1)(tslib@2.8.1)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -26790,24 +26748,24 @@ snapshots: bonjour-service: 1.4.3 chokidar: 3.6.0 colorette: 2.0.20 - compression: 1.8.1 + compression: 1.8.1(supports-color@8.1.1) connect-history-api-fallback: 2.0.0 - express: 4.22.2 + express: 4.22.2(supports-color@8.1.1) graceful-fs: 4.2.11 - http-proxy-middleware: 2.0.10(@types/express@4.17.25) + http-proxy-middleware: 2.0.10(@types/express@4.17.25)(debug@4.4.3(supports-color@8.1.1)) ipaddr.js: 2.4.0 launch-editor: 2.14.1 open: 10.2.0 p-retry: 6.2.1 schema-utils: 4.3.3 selfsigned: 5.5.0 - serve-index: 1.9.2 + serve-index: 1.9.2(supports-color@8.1.1) sockjs: 0.3.24 - spdy: 4.0.2 - webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.108.4(postcss@8.5.19)) + spdy: 4.0.2(supports-color@8.1.1) + webpack-dev-middleware: 7.4.5(tslib@2.8.1)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) ws: 8.21.1 optionalDependencies: - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) transitivePeerDependencies: - bufferutil - debug @@ -26833,7 +26791,7 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.106.2(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0): + webpack@5.106.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.9 @@ -26841,11 +26799,11 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.17.0 - acorn-import-phases: 1.0.4(acorn@8.17.0) + acorn: 8.18.0 + acorn-import-phases: 1.0.4(acorn@8.18.0) browserslist: 4.28.6 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.24.2 + enhanced-resolve: 5.24.4 es-module-lexer: 2.3.1 eslint-scope: 5.1.1 events: 3.3.0 @@ -26856,7 +26814,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.3 - terser-webpack-plugin: 5.6.1(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0)(webpack@5.106.2(@swc/core@1.15.43(@swc/helpers@0.5.23))(esbuild@0.28.1)(lightningcss@1.33.0)) + terser-webpack-plugin: 5.6.1(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)(webpack@5.106.2(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) watchpack: 2.5.2 webpack-sources: 3.5.1 transitivePeerDependencies: @@ -26873,25 +26831,25 @@ snapshots: - postcss - uglify-js - webpack@5.108.4(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19): + webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3): dependencies: '@types/estree': 1.0.9 '@types/json-schema': 7.0.15 '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.17.0 - acorn-import-phases: 1.0.4(acorn@8.17.0) + acorn: 8.18.0 + acorn-import-phases: 1.0.4(acorn@8.18.0) browserslist: 4.28.6 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.24.2 + enhanced-resolve: 5.24.4 es-module-lexer: 2.3.1 eslint-scope: 5.1.1 events: 3.3.0 graceful-fs: 4.2.11 loader-runner: 4.3.2 mime-db: 1.54.0 - minimizer-webpack-plugin: 5.6.1(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.19))(html-minifier-terser@7.2.0)(postcss@8.5.19)(webpack@5.108.4(postcss@8.5.19)) + minimizer-webpack-plugin: 5.6.1(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)) neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.3 @@ -26911,52 +26869,14 @@ snapshots: - postcss - uglify-js - webpack@5.108.4(postcss@8.5.19): - dependencies: - '@types/estree': 1.0.9 - '@types/json-schema': 7.0.15 - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/wasm-edit': 1.14.1 - '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.17.0 - acorn-import-phases: 1.0.4(acorn@8.17.0) - browserslist: 4.28.6 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.24.2 - es-module-lexer: 2.3.1 - eslint-scope: 5.1.1 - events: 3.3.0 - graceful-fs: 4.2.11 - loader-runner: 4.3.2 - mime-db: 1.54.0 - minimizer-webpack-plugin: 5.6.1(postcss@8.5.19)(webpack@5.108.4(postcss@8.5.19)) - neo-async: 2.6.2 - schema-utils: 4.3.3 - tapable: 2.3.3 - watchpack: 2.5.2 - webpack-sources: 3.5.1 - transitivePeerDependencies: - - '@minify-html/node' - - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - - esbuild - - html-minifier-terser - - lightningcss - - postcss - - uglify-js - - webpackbar@7.0.0(webpack@5.108.4(postcss@8.5.19)): + webpackbar@7.0.0(webpack@5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3)): dependencies: ansis: 3.17.0 consola: 3.4.2 pretty-time: 1.1.0 std-env: 3.10.0 optionalDependencies: - webpack: 5.108.4(postcss@8.5.19) + webpack: 5.108.4(@swc/core@1.15.46(@swc/helpers@0.5.23))(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.25))(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.25)(uglify-js@3.19.3) websocket-driver@0.7.5: dependencies: diff --git a/server/package.json b/server/package.json index 048ea06040..8e3559874f 100644 --- a/server/package.json +++ b/server/package.json @@ -49,14 +49,14 @@ "@nestjs/websockets": "^11.0.4", "@opentelemetry/api": "^1.9.0", "@opentelemetry/context-async-hooks": "^2.0.0", - "@opentelemetry/exporter-prometheus": "^0.220.0", - "@opentelemetry/instrumentation-http": "^0.220.0", - "@opentelemetry/instrumentation-ioredis": "^0.68.0", - "@opentelemetry/instrumentation-nestjs-core": "^0.66.0", - "@opentelemetry/instrumentation-pg": "^0.72.0", + "@opentelemetry/exporter-prometheus": "^0.221.0", + "@opentelemetry/instrumentation-http": "^0.221.0", + "@opentelemetry/instrumentation-ioredis": "^0.69.0", + "@opentelemetry/instrumentation-nestjs-core": "^0.67.0", + "@opentelemetry/instrumentation-pg": "^0.73.0", "@opentelemetry/resources": "^2.0.1", "@opentelemetry/sdk-metrics": "^2.0.1", - "@opentelemetry/sdk-node": "^0.220.0", + "@opentelemetry/sdk-node": "^0.221.0", "@opentelemetry/semantic-conventions": "^1.34.0", "@react-email/components": "^1.0.0", "@react-email/render": "^2.0.0", diff --git a/web/package.json b/web/package.json index b23bc94edb..aeaeb3ee20 100644 --- a/web/package.json +++ b/web/package.json @@ -105,7 +105,7 @@ "prettier-plugin-sort-json": "^4.1.1", "prettier-plugin-svelte": "^4.0.0", "rollup-plugin-visualizer": "^7.0.0", - "svelte": "5.56.5", + "svelte": "5.56.8", "svelte-check": "^4.4.6", "svelte-eslint-parser": "^1.3.3", "tailwindcss": "^4.2.4", diff --git a/web/src/lib/components/timeline/Month.svelte b/web/src/lib/components/timeline/Month.svelte index 7cbfd67ddf..423f0bec55 100644 --- a/web/src/lib/components/timeline/Month.svelte +++ b/web/src/lib/components/timeline/Month.svelte @@ -61,10 +61,8 @@ {@const isTimelineDaySelected = assetInteraction.selectedGroup.has(timelineDay.groupTitle)}
(choosePersonToMerge = false)}>
+
{#each potentialMergePeople as person (person.id)}
From 36cb86c886d7459e89e615283e748c4e6e6dc579 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 13:24:39 +0200 Subject: [PATCH 37/69] fix(deps): update dependency js-yaml to v5 [security] (#30440) Co-authored-by: Daniel Dietzler --- pnpm-lock.yaml | 4 ++-- server/package.json | 2 +- server/src/services/system-config.service.spec.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1f9120825d..1e9a9333c5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -536,8 +536,8 @@ importers: specifier: ^6.0.0 version: 6.2.4 js-yaml: - specifier: ^4.1.0 - version: 4.3.0 + specifier: ^5.0.0 + version: 5.2.1 jsonwebtoken: specifier: ^9.0.2 version: 9.0.3 diff --git a/server/package.json b/server/package.json index 8e3559874f..7d5f73cc61 100644 --- a/server/package.json +++ b/server/package.json @@ -82,7 +82,7 @@ "i18n-iso-countries": "^7.6.0", "ioredis": "^5.8.2", "jose": "^6.0.0", - "js-yaml": "^4.1.0", + "js-yaml": "^5.0.0", "jsonwebtoken": "^9.0.2", "kysely": "0.28.17", "kysely-postgres-js": "^3.0.0", diff --git a/server/src/services/system-config.service.spec.ts b/server/src/services/system-config.service.spec.ts index d5404048c0..08851da96a 100644 --- a/server/src/services/system-config.service.spec.ts +++ b/server/src/services/system-config.service.spec.ts @@ -362,7 +362,7 @@ describe(SystemConfigService.name, () => { expect(mocks.logger.error).toHaveBeenCalledTimes(2); expect(mocks.logger.error.mock.calls[0][0]).toEqual('Unable to load configuration file: immich-config.json'); expect(mocks.logger.error.mock.calls[1][0].toString()).toEqual( - expect.stringContaining('YAMLException: duplicated mapping key (1:20)'), + expect.stringContaining('YAMLException: duplicated mapping key (1:21)'), ); }); From 7aa20683610e4c2a18c60d9ffe85f8c78f9cdc20 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 13:47:57 +0200 Subject: [PATCH 38/69] chore(deps): update dependency js-yaml to v5.2.2 [security] (#30441) --- pnpm-lock.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1e9a9333c5..b5503526c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -537,7 +537,7 @@ importers: version: 6.2.4 js-yaml: specifier: ^5.0.0 - version: 5.2.1 + version: 5.2.2 jsonwebtoken: specifier: ^9.0.2 version: 9.0.3 @@ -8796,6 +8796,10 @@ packages: resolution: {integrity: sha512-zfLtNfQqxVqq3uaTqSkh4x4hZw3KHobGUA0fJUj4wawW8bsQLTVqpHdXSIzidh7o+4lEW36tANuAGdaFx6Zgnw==} hasBin: true + js-yaml@5.2.2: + resolution: {integrity: sha512-dayzUzKkJ1MkuUtZglSebU43utNXH0OWQByK9rKOOuYIO8M5TV1y+n8ALMdG0rdzBnfNkOmZEqrURepb0ejqBw==} + hasBin: true + jsdom@26.1.0: resolution: {integrity: sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==} engines: {node: '>=18'} @@ -22082,6 +22086,10 @@ snapshots: dependencies: argparse: 2.0.1 + js-yaml@5.2.2: + dependencies: + argparse: 2.0.1 + jsdom@26.1.0(canvas@3.2.3): dependencies: cssstyle: 4.6.0 From 627b52fdaf03d3757b3b7f3e68eb66d8725407b7 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Fri, 31 Jul 2026 05:31:48 -0700 Subject: [PATCH 39/69] chore(mobile): remove last committed generated files (#30426) --- .gitattributes | 6 - mobile/.gitignore | 1 + .../album/current_album.provider.g.dart | 26 - mobile/lib/routing/router.gr.dart | 1890 ----------------- 4 files changed, 1 insertion(+), 1922 deletions(-) delete mode 100644 mobile/lib/providers/album/current_album.provider.g.dart delete mode 100644 mobile/lib/routing/router.gr.dart diff --git a/.gitattributes b/.gitattributes index 14bba0a3eb..e96e0676ca 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,15 +1,9 @@ -mobile/lib/**/*.g.dart -diff -merge -mobile/lib/**/*.g.dart linguist-generated=true - mobile/android/**/*.g.kt -diff -merge mobile/android/**/*.g.kt linguist-generated=true mobile/ios/**/*.g.swift -diff -merge mobile/ios/**/*.g.swift linguist-generated=true -mobile/lib/**/*.drift.dart -diff -merge -mobile/lib/**/*.drift.dart linguist-generated=true - mobile/drift_schemas/main/drift_schema_*.json -diff -merge mobile/drift_schemas/main/drift_schema_*.json linguist-generated=true diff --git a/mobile/.gitignore b/mobile/.gitignore index bdddf7bbcc..6730e3c46a 100644 --- a/mobile/.gitignore +++ b/mobile/.gitignore @@ -32,6 +32,7 @@ .pub/ /build/ lib/**/*.drift.dart +lib/routing/router.gr.dart test/drift/main/generated/ # Pigeon related diff --git a/mobile/lib/providers/album/current_album.provider.g.dart b/mobile/lib/providers/album/current_album.provider.g.dart deleted file mode 100644 index b6d079231f..0000000000 --- a/mobile/lib/providers/album/current_album.provider.g.dart +++ /dev/null @@ -1,26 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'current_album.provider.dart'; - -// ************************************************************************** -// RiverpodGenerator -// ************************************************************************** - -String _$currentAlbumHash() => r'61f00273d6b69da45add1532cc3d3a076ee55110'; - -/// See also [CurrentAlbum]. -@ProviderFor(CurrentAlbum) -final currentAlbumProvider = - AutoDisposeNotifierProvider.internal( - CurrentAlbum.new, - name: r'currentAlbumProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$currentAlbumHash, - dependencies: null, - allTransitiveDependencies: null, - ); - -typedef _$CurrentAlbum = AutoDisposeNotifier; -// ignore_for_file: type=lint -// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package diff --git a/mobile/lib/routing/router.gr.dart b/mobile/lib/routing/router.gr.dart deleted file mode 100644 index 1876a784dc..0000000000 --- a/mobile/lib/routing/router.gr.dart +++ /dev/null @@ -1,1890 +0,0 @@ -// dart format width=80 -// GENERATED CODE - DO NOT MODIFY BY HAND - -// ************************************************************************** -// AutoRouterGenerator -// ************************************************************************** - -// ignore_for_file: type=lint -// coverage:ignore-file - -part of 'router.dart'; - -/// generated route for -/// [AppLogDetailPage] -class AppLogDetailRoute extends PageRouteInfo { - AppLogDetailRoute({ - Key? key, - required LogMessage logMessage, - List? children, - }) : super( - AppLogDetailRoute.name, - args: AppLogDetailRouteArgs(key: key, logMessage: logMessage), - initialChildren: children, - ); - - static const String name = 'AppLogDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return AppLogDetailPage(key: args.key, logMessage: args.logMessage); - }, - ); -} - -class AppLogDetailRouteArgs { - const AppLogDetailRouteArgs({this.key, required this.logMessage}); - - final Key? key; - - final LogMessage logMessage; - - @override - String toString() { - return 'AppLogDetailRouteArgs{key: $key, logMessage: $logMessage}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! AppLogDetailRouteArgs) return false; - return key == other.key && logMessage == other.logMessage; - } - - @override - int get hashCode => key.hashCode ^ logMessage.hashCode; -} - -/// generated route for -/// [AppLogPage] -class AppLogRoute extends PageRouteInfo { - const AppLogRoute({List? children}) - : super(AppLogRoute.name, initialChildren: children); - - static const String name = 'AppLogRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const AppLogPage(); - }, - ); -} - -/// generated route for -/// [AssetTroubleshootPage] -class AssetTroubleshootRoute extends PageRouteInfo { - AssetTroubleshootRoute({ - Key? key, - required BaseAsset asset, - List? children, - }) : super( - AssetTroubleshootRoute.name, - args: AssetTroubleshootRouteArgs(key: key, asset: asset), - initialChildren: children, - ); - - static const String name = 'AssetTroubleshootRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return AssetTroubleshootPage(key: args.key, asset: args.asset); - }, - ); -} - -class AssetTroubleshootRouteArgs { - const AssetTroubleshootRouteArgs({this.key, required this.asset}); - - final Key? key; - - final BaseAsset asset; - - @override - String toString() { - return 'AssetTroubleshootRouteArgs{key: $key, asset: $asset}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! AssetTroubleshootRouteArgs) return false; - return key == other.key && asset == other.asset; - } - - @override - int get hashCode => key.hashCode ^ asset.hashCode; -} - -/// generated route for -/// [AssetViewerPage] -class AssetViewerRoute extends PageRouteInfo { - AssetViewerRoute({ - Key? key, - required int initialIndex, - required TimelineService timelineService, - int? heroOffset, - RemoteAlbum? currentAlbum, - List? children, - }) : super( - AssetViewerRoute.name, - args: AssetViewerRouteArgs( - key: key, - initialIndex: initialIndex, - timelineService: timelineService, - heroOffset: heroOffset, - currentAlbum: currentAlbum, - ), - initialChildren: children, - ); - - static const String name = 'AssetViewerRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return AssetViewerPage( - key: args.key, - initialIndex: args.initialIndex, - timelineService: args.timelineService, - heroOffset: args.heroOffset, - currentAlbum: args.currentAlbum, - ); - }, - ); -} - -class AssetViewerRouteArgs { - const AssetViewerRouteArgs({ - this.key, - required this.initialIndex, - required this.timelineService, - this.heroOffset, - this.currentAlbum, - }); - - final Key? key; - - final int initialIndex; - - final TimelineService timelineService; - - final int? heroOffset; - - final RemoteAlbum? currentAlbum; - - @override - String toString() { - return 'AssetViewerRouteArgs{key: $key, initialIndex: $initialIndex, timelineService: $timelineService, heroOffset: $heroOffset, currentAlbum: $currentAlbum}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! AssetViewerRouteArgs) return false; - return key == other.key && - initialIndex == other.initialIndex && - timelineService == other.timelineService && - heroOffset == other.heroOffset && - currentAlbum == other.currentAlbum; - } - - @override - int get hashCode => - key.hashCode ^ - initialIndex.hashCode ^ - timelineService.hashCode ^ - heroOffset.hashCode ^ - currentAlbum.hashCode; -} - -/// generated route for -/// [ChangePasswordPage] -class ChangePasswordRoute extends PageRouteInfo { - const ChangePasswordRoute({List? children}) - : super(ChangePasswordRoute.name, initialChildren: children); - - static const String name = 'ChangePasswordRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const ChangePasswordPage(); - }, - ); -} - -/// generated route for -/// [CleanupPreviewPage] -class CleanupPreviewRoute extends PageRouteInfo { - CleanupPreviewRoute({ - Key? key, - required List assets, - List? children, - }) : super( - CleanupPreviewRoute.name, - args: CleanupPreviewRouteArgs(key: key, assets: assets), - initialChildren: children, - ); - - static const String name = 'CleanupPreviewRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return CleanupPreviewPage(key: args.key, assets: args.assets); - }, - ); -} - -class CleanupPreviewRouteArgs { - const CleanupPreviewRouteArgs({this.key, required this.assets}); - - final Key? key; - - final List assets; - - @override - String toString() { - return 'CleanupPreviewRouteArgs{key: $key, assets: $assets}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! CleanupPreviewRouteArgs) return false; - return key == other.key && - const ListEquality().equals(assets, other.assets); - } - - @override - int get hashCode => - key.hashCode ^ const ListEquality().hash(assets); -} - -/// generated route for -/// [DownloadInfoPage] -class DownloadInfoRoute extends PageRouteInfo { - const DownloadInfoRoute({List? children}) - : super(DownloadInfoRoute.name, initialChildren: children); - - static const String name = 'DownloadInfoRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DownloadInfoPage(); - }, - ); -} - -/// generated route for -/// [DriftActivitiesPage] -class DriftActivitiesRoute extends PageRouteInfo { - DriftActivitiesRoute({ - Key? key, - required RemoteAlbum album, - String? assetId, - String? assetName, - List? children, - }) : super( - DriftActivitiesRoute.name, - args: DriftActivitiesRouteArgs( - key: key, - album: album, - assetId: assetId, - assetName: assetName, - ), - initialChildren: children, - ); - - static const String name = 'DriftActivitiesRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftActivitiesPage( - key: args.key, - album: args.album, - assetId: args.assetId, - assetName: args.assetName, - ); - }, - ); -} - -class DriftActivitiesRouteArgs { - const DriftActivitiesRouteArgs({ - this.key, - required this.album, - this.assetId, - this.assetName, - }); - - final Key? key; - - final RemoteAlbum album; - - final String? assetId; - - final String? assetName; - - @override - String toString() { - return 'DriftActivitiesRouteArgs{key: $key, album: $album, assetId: $assetId, assetName: $assetName}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftActivitiesRouteArgs) return false; - return key == other.key && - album == other.album && - assetId == other.assetId && - assetName == other.assetName; - } - - @override - int get hashCode => - key.hashCode ^ album.hashCode ^ assetId.hashCode ^ assetName.hashCode; -} - -/// generated route for -/// [DriftAlbumOptionsPage] -class DriftAlbumOptionsRoute extends PageRouteInfo { - DriftAlbumOptionsRoute({ - Key? key, - required RemoteAlbum album, - List? children, - }) : super( - DriftAlbumOptionsRoute.name, - args: DriftAlbumOptionsRouteArgs(key: key, album: album), - initialChildren: children, - ); - - static const String name = 'DriftAlbumOptionsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftAlbumOptionsPage(key: args.key, album: args.album); - }, - ); -} - -class DriftAlbumOptionsRouteArgs { - const DriftAlbumOptionsRouteArgs({this.key, required this.album}); - - final Key? key; - - final RemoteAlbum album; - - @override - String toString() { - return 'DriftAlbumOptionsRouteArgs{key: $key, album: $album}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftAlbumOptionsRouteArgs) return false; - return key == other.key && album == other.album; - } - - @override - int get hashCode => key.hashCode ^ album.hashCode; -} - -/// generated route for -/// [DriftAlbumsPage] -class DriftAlbumsRoute extends PageRouteInfo { - const DriftAlbumsRoute({List? children}) - : super(DriftAlbumsRoute.name, initialChildren: children); - - static const String name = 'DriftAlbumsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftAlbumsPage(); - }, - ); -} - -/// generated route for -/// [DriftArchivePage] -class DriftArchiveRoute extends PageRouteInfo { - const DriftArchiveRoute({List? children}) - : super(DriftArchiveRoute.name, initialChildren: children); - - static const String name = 'DriftArchiveRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftArchivePage(); - }, - ); -} - -/// generated route for -/// [DriftAssetSelectionTimelinePage] -class DriftAssetSelectionTimelineRoute - extends PageRouteInfo { - DriftAssetSelectionTimelineRoute({ - Key? key, - Set lockedSelectionAssets = const {}, - List? children, - }) : super( - DriftAssetSelectionTimelineRoute.name, - args: DriftAssetSelectionTimelineRouteArgs( - key: key, - lockedSelectionAssets: lockedSelectionAssets, - ), - initialChildren: children, - ); - - static const String name = 'DriftAssetSelectionTimelineRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const DriftAssetSelectionTimelineRouteArgs(), - ); - return DriftAssetSelectionTimelinePage( - key: args.key, - lockedSelectionAssets: args.lockedSelectionAssets, - ); - }, - ); -} - -class DriftAssetSelectionTimelineRouteArgs { - const DriftAssetSelectionTimelineRouteArgs({ - this.key, - this.lockedSelectionAssets = const {}, - }); - - final Key? key; - - final Set lockedSelectionAssets; - - @override - String toString() { - return 'DriftAssetSelectionTimelineRouteArgs{key: $key, lockedSelectionAssets: $lockedSelectionAssets}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftAssetSelectionTimelineRouteArgs) return false; - return key == other.key && - const SetEquality().equals( - lockedSelectionAssets, - other.lockedSelectionAssets, - ); - } - - @override - int get hashCode => - key.hashCode ^ const SetEquality().hash(lockedSelectionAssets); -} - -/// generated route for -/// [DriftBackupAlbumSelectionPage] -class DriftBackupAlbumSelectionRoute extends PageRouteInfo { - const DriftBackupAlbumSelectionRoute({List? children}) - : super(DriftBackupAlbumSelectionRoute.name, initialChildren: children); - - static const String name = 'DriftBackupAlbumSelectionRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftBackupAlbumSelectionPage(); - }, - ); -} - -/// generated route for -/// [DriftBackupAssetDetailPage] -class DriftBackupAssetDetailRoute extends PageRouteInfo { - const DriftBackupAssetDetailRoute({List? children}) - : super(DriftBackupAssetDetailRoute.name, initialChildren: children); - - static const String name = 'DriftBackupAssetDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftBackupAssetDetailPage(); - }, - ); -} - -/// generated route for -/// [DriftBackupOptionsPage] -class DriftBackupOptionsRoute extends PageRouteInfo { - const DriftBackupOptionsRoute({List? children}) - : super(DriftBackupOptionsRoute.name, initialChildren: children); - - static const String name = 'DriftBackupOptionsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftBackupOptionsPage(); - }, - ); -} - -/// generated route for -/// [DriftBackupPage] -class DriftBackupRoute extends PageRouteInfo { - const DriftBackupRoute({List? children}) - : super(DriftBackupRoute.name, initialChildren: children); - - static const String name = 'DriftBackupRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftBackupPage(); - }, - ); -} - -/// generated route for -/// [DriftCreateAlbumPage] -class DriftCreateAlbumRoute extends PageRouteInfo { - const DriftCreateAlbumRoute({List? children}) - : super(DriftCreateAlbumRoute.name, initialChildren: children); - - static const String name = 'DriftCreateAlbumRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftCreateAlbumPage(); - }, - ); -} - -/// generated route for -/// [DriftEditImagePage] -class DriftEditImageRoute extends PageRouteInfo { - DriftEditImageRoute({ - Key? key, - required Image image, - required Future Function(List) applyEdits, - List? children, - }) : super( - DriftEditImageRoute.name, - args: DriftEditImageRouteArgs( - key: key, - image: image, - applyEdits: applyEdits, - ), - initialChildren: children, - ); - - static const String name = 'DriftEditImageRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftEditImagePage( - key: args.key, - image: args.image, - applyEdits: args.applyEdits, - ); - }, - ); -} - -class DriftEditImageRouteArgs { - const DriftEditImageRouteArgs({ - this.key, - required this.image, - required this.applyEdits, - }); - - final Key? key; - - final Image image; - - final Future Function(List) applyEdits; - - @override - String toString() { - return 'DriftEditImageRouteArgs{key: $key, image: $image, applyEdits: $applyEdits}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftEditImageRouteArgs) return false; - return key == other.key && image == other.image; - } - - @override - int get hashCode => key.hashCode ^ image.hashCode; -} - -/// generated route for -/// [DriftFavoritePage] -class DriftFavoriteRoute extends PageRouteInfo { - const DriftFavoriteRoute({List? children}) - : super(DriftFavoriteRoute.name, initialChildren: children); - - static const String name = 'DriftFavoriteRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftFavoritePage(); - }, - ); -} - -/// generated route for -/// [DriftLibraryPage] -class DriftLibraryRoute extends PageRouteInfo { - const DriftLibraryRoute({List? children}) - : super(DriftLibraryRoute.name, initialChildren: children); - - static const String name = 'DriftLibraryRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftLibraryPage(); - }, - ); -} - -/// generated route for -/// [DriftLocalAlbumsPage] -class DriftLocalAlbumsRoute extends PageRouteInfo { - const DriftLocalAlbumsRoute({List? children}) - : super(DriftLocalAlbumsRoute.name, initialChildren: children); - - static const String name = 'DriftLocalAlbumsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftLocalAlbumsPage(); - }, - ); -} - -/// generated route for -/// [DriftLockedFolderPage] -class DriftLockedFolderRoute extends PageRouteInfo { - const DriftLockedFolderRoute({List? children}) - : super(DriftLockedFolderRoute.name, initialChildren: children); - - static const String name = 'DriftLockedFolderRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftLockedFolderPage(); - }, - ); -} - -/// generated route for -/// [DriftMapPage] -class DriftMapRoute extends PageRouteInfo { - DriftMapRoute({ - Key? key, - LatLng? initialLocation, - List? children, - }) : super( - DriftMapRoute.name, - args: DriftMapRouteArgs(key: key, initialLocation: initialLocation), - initialChildren: children, - ); - - static const String name = 'DriftMapRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const DriftMapRouteArgs(), - ); - return DriftMapPage(key: args.key, initialLocation: args.initialLocation); - }, - ); -} - -class DriftMapRouteArgs { - const DriftMapRouteArgs({this.key, this.initialLocation}); - - final Key? key; - - final LatLng? initialLocation; - - @override - String toString() { - return 'DriftMapRouteArgs{key: $key, initialLocation: $initialLocation}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftMapRouteArgs) return false; - return key == other.key && initialLocation == other.initialLocation; - } - - @override - int get hashCode => key.hashCode ^ initialLocation.hashCode; -} - -/// generated route for -/// [DriftMemoryPage] -class DriftMemoryRoute extends PageRouteInfo { - DriftMemoryRoute({ - required List memories, - required int memoryIndex, - Key? key, - List? children, - }) : super( - DriftMemoryRoute.name, - args: DriftMemoryRouteArgs( - memories: memories, - memoryIndex: memoryIndex, - key: key, - ), - initialChildren: children, - ); - - static const String name = 'DriftMemoryRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftMemoryPage( - memories: args.memories, - memoryIndex: args.memoryIndex, - key: args.key, - ); - }, - ); -} - -class DriftMemoryRouteArgs { - const DriftMemoryRouteArgs({ - required this.memories, - required this.memoryIndex, - this.key, - }); - - final List memories; - - final int memoryIndex; - - final Key? key; - - @override - String toString() { - return 'DriftMemoryRouteArgs{memories: $memories, memoryIndex: $memoryIndex, key: $key}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftMemoryRouteArgs) return false; - return const ListEquality().equals(memories, other.memories) && - memoryIndex == other.memoryIndex && - key == other.key; - } - - @override - int get hashCode => - const ListEquality().hash(memories) ^ - memoryIndex.hashCode ^ - key.hashCode; -} - -/// generated route for -/// [DriftPartnerDetailPage] -class DriftPartnerDetailRoute - extends PageRouteInfo { - DriftPartnerDetailRoute({ - Key? key, - required Partner partner, - List? children, - }) : super( - DriftPartnerDetailRoute.name, - args: DriftPartnerDetailRouteArgs(key: key, partner: partner), - initialChildren: children, - ); - - static const String name = 'DriftPartnerDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftPartnerDetailPage(key: args.key, partner: args.partner); - }, - ); -} - -class DriftPartnerDetailRouteArgs { - const DriftPartnerDetailRouteArgs({this.key, required this.partner}); - - final Key? key; - - final Partner partner; - - @override - String toString() { - return 'DriftPartnerDetailRouteArgs{key: $key, partner: $partner}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftPartnerDetailRouteArgs) return false; - return key == other.key && partner == other.partner; - } - - @override - int get hashCode => key.hashCode ^ partner.hashCode; -} - -/// generated route for -/// [DriftPeopleCollectionPage] -class DriftPeopleCollectionRoute extends PageRouteInfo { - const DriftPeopleCollectionRoute({List? children}) - : super(DriftPeopleCollectionRoute.name, initialChildren: children); - - static const String name = 'DriftPeopleCollectionRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftPeopleCollectionPage(); - }, - ); -} - -/// generated route for -/// [DriftPersonPage] -class DriftPersonRoute extends PageRouteInfo { - DriftPersonRoute({ - Key? key, - required DriftPerson person, - List? children, - }) : super( - DriftPersonRoute.name, - args: DriftPersonRouteArgs(key: key, person: person), - initialChildren: children, - ); - - static const String name = 'DriftPersonRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftPersonPage(key: args.key, person: args.person); - }, - ); -} - -class DriftPersonRouteArgs { - const DriftPersonRouteArgs({this.key, required this.person}); - - final Key? key; - - final DriftPerson person; - - @override - String toString() { - return 'DriftPersonRouteArgs{key: $key, person: $person}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftPersonRouteArgs) return false; - return key == other.key && person == other.person; - } - - @override - int get hashCode => key.hashCode ^ person.hashCode; -} - -/// generated route for -/// [DriftPlaceDetailPage] -class DriftPlaceDetailRoute extends PageRouteInfo { - DriftPlaceDetailRoute({ - Key? key, - required String place, - List? children, - }) : super( - DriftPlaceDetailRoute.name, - args: DriftPlaceDetailRouteArgs(key: key, place: place), - initialChildren: children, - ); - - static const String name = 'DriftPlaceDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftPlaceDetailPage(key: args.key, place: args.place); - }, - ); -} - -class DriftPlaceDetailRouteArgs { - const DriftPlaceDetailRouteArgs({this.key, required this.place}); - - final Key? key; - - final String place; - - @override - String toString() { - return 'DriftPlaceDetailRouteArgs{key: $key, place: $place}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftPlaceDetailRouteArgs) return false; - return key == other.key && place == other.place; - } - - @override - int get hashCode => key.hashCode ^ place.hashCode; -} - -/// generated route for -/// [DriftPlacePage] -class DriftPlaceRoute extends PageRouteInfo { - DriftPlaceRoute({ - Key? key, - LatLng? currentLocation, - List? children, - }) : super( - DriftPlaceRoute.name, - args: DriftPlaceRouteArgs(key: key, currentLocation: currentLocation), - initialChildren: children, - ); - - static const String name = 'DriftPlaceRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const DriftPlaceRouteArgs(), - ); - return DriftPlacePage( - key: args.key, - currentLocation: args.currentLocation, - ); - }, - ); -} - -class DriftPlaceRouteArgs { - const DriftPlaceRouteArgs({this.key, this.currentLocation}); - - final Key? key; - - final LatLng? currentLocation; - - @override - String toString() { - return 'DriftPlaceRouteArgs{key: $key, currentLocation: $currentLocation}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftPlaceRouteArgs) return false; - return key == other.key && currentLocation == other.currentLocation; - } - - @override - int get hashCode => key.hashCode ^ currentLocation.hashCode; -} - -/// generated route for -/// [DriftRecentlyAddedPage] -class DriftRecentlyAddedRoute extends PageRouteInfo { - const DriftRecentlyAddedRoute({List? children}) - : super(DriftRecentlyAddedRoute.name, initialChildren: children); - - static const String name = 'DriftRecentlyAddedRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftRecentlyAddedPage(); - }, - ); -} - -/// generated route for -/// [DriftRecentlyTakenPage] -class DriftRecentlyTakenRoute extends PageRouteInfo { - const DriftRecentlyTakenRoute({List? children}) - : super(DriftRecentlyTakenRoute.name, initialChildren: children); - - static const String name = 'DriftRecentlyTakenRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftRecentlyTakenPage(); - }, - ); -} - -/// generated route for -/// [DriftSearchPage] -class DriftSearchRoute extends PageRouteInfo { - const DriftSearchRoute({List? children}) - : super(DriftSearchRoute.name, initialChildren: children); - - static const String name = 'DriftSearchRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftSearchPage(); - }, - ); -} - -/// generated route for -/// [DriftSlideshowPage] -class DriftSlideshowRoute extends PageRouteInfo { - DriftSlideshowRoute({ - Key? key, - required TimelineService timeline, - List? children, - }) : super( - DriftSlideshowRoute.name, - args: DriftSlideshowRouteArgs(key: key, timeline: timeline), - initialChildren: children, - ); - - static const String name = 'DriftSlideshowRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftSlideshowPage(key: args.key, timeline: args.timeline); - }, - ); -} - -class DriftSlideshowRouteArgs { - const DriftSlideshowRouteArgs({this.key, required this.timeline}); - - final Key? key; - - final TimelineService timeline; - - @override - String toString() { - return 'DriftSlideshowRouteArgs{key: $key, timeline: $timeline}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftSlideshowRouteArgs) return false; - return key == other.key && timeline == other.timeline; - } - - @override - int get hashCode => key.hashCode ^ timeline.hashCode; -} - -/// generated route for -/// [DriftTrashPage] -class DriftTrashRoute extends PageRouteInfo { - const DriftTrashRoute({List? children}) - : super(DriftTrashRoute.name, initialChildren: children); - - static const String name = 'DriftTrashRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftTrashPage(); - }, - ); -} - -/// generated route for -/// [DriftUploadDetailPage] -class DriftUploadDetailRoute extends PageRouteInfo { - const DriftUploadDetailRoute({List? children}) - : super(DriftUploadDetailRoute.name, initialChildren: children); - - static const String name = 'DriftUploadDetailRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftUploadDetailPage(); - }, - ); -} - -/// generated route for -/// [DriftUserSelectionPage] -class DriftUserSelectionRoute - extends PageRouteInfo { - DriftUserSelectionRoute({ - Key? key, - required RemoteAlbum album, - List? children, - }) : super( - DriftUserSelectionRoute.name, - args: DriftUserSelectionRouteArgs(key: key, album: album), - initialChildren: children, - ); - - static const String name = 'DriftUserSelectionRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return DriftUserSelectionPage(key: args.key, album: args.album); - }, - ); -} - -class DriftUserSelectionRouteArgs { - const DriftUserSelectionRouteArgs({this.key, required this.album}); - - final Key? key; - - final RemoteAlbum album; - - @override - String toString() { - return 'DriftUserSelectionRouteArgs{key: $key, album: $album}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! DriftUserSelectionRouteArgs) return false; - return key == other.key && album == other.album; - } - - @override - int get hashCode => key.hashCode ^ album.hashCode; -} - -/// generated route for -/// [DriftVideoPage] -class DriftVideoRoute extends PageRouteInfo { - const DriftVideoRoute({List? children}) - : super(DriftVideoRoute.name, initialChildren: children); - - static const String name = 'DriftVideoRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const DriftVideoPage(); - }, - ); -} - -/// generated route for -/// [FolderPage] -class FolderRoute extends PageRouteInfo { - FolderRoute({ - Key? key, - RecursiveFolder? folder, - List? children, - }) : super( - FolderRoute.name, - args: FolderRouteArgs(key: key, folder: folder), - initialChildren: children, - ); - - static const String name = 'FolderRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const FolderRouteArgs(), - ); - return FolderPage(key: args.key, folder: args.folder); - }, - ); -} - -class FolderRouteArgs { - const FolderRouteArgs({this.key, this.folder}); - - final Key? key; - - final RecursiveFolder? folder; - - @override - String toString() { - return 'FolderRouteArgs{key: $key, folder: $folder}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! FolderRouteArgs) return false; - return key == other.key && folder == other.folder; - } - - @override - int get hashCode => key.hashCode ^ folder.hashCode; -} - -/// generated route for -/// [HeaderSettingsPage] -class HeaderSettingsRoute extends PageRouteInfo { - const HeaderSettingsRoute({List? children}) - : super(HeaderSettingsRoute.name, initialChildren: children); - - static const String name = 'HeaderSettingsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const HeaderSettingsPage(); - }, - ); -} - -/// generated route for -/// [LocalMediaSummaryPage] -class LocalMediaSummaryRoute extends PageRouteInfo { - const LocalMediaSummaryRoute({List? children}) - : super(LocalMediaSummaryRoute.name, initialChildren: children); - - static const String name = 'LocalMediaSummaryRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const LocalMediaSummaryPage(); - }, - ); -} - -/// generated route for -/// [LocalTimelinePage] -class LocalTimelineRoute extends PageRouteInfo { - LocalTimelineRoute({ - Key? key, - required LocalAlbum album, - List? children, - }) : super( - LocalTimelineRoute.name, - args: LocalTimelineRouteArgs(key: key, album: album), - initialChildren: children, - ); - - static const String name = 'LocalTimelineRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return LocalTimelinePage(key: args.key, album: args.album); - }, - ); -} - -class LocalTimelineRouteArgs { - const LocalTimelineRouteArgs({this.key, required this.album}); - - final Key? key; - - final LocalAlbum album; - - @override - String toString() { - return 'LocalTimelineRouteArgs{key: $key, album: $album}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! LocalTimelineRouteArgs) return false; - return key == other.key && album == other.album; - } - - @override - int get hashCode => key.hashCode ^ album.hashCode; -} - -/// generated route for -/// [LoginPage] -class LoginRoute extends PageRouteInfo { - const LoginRoute({List? children}) - : super(LoginRoute.name, initialChildren: children); - - static const String name = 'LoginRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const LoginPage(); - }, - ); -} - -/// generated route for -/// [MainTimelinePage] -class MainTimelineRoute extends PageRouteInfo { - const MainTimelineRoute({List? children}) - : super(MainTimelineRoute.name, initialChildren: children); - - static const String name = 'MainTimelineRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const MainTimelinePage(); - }, - ); -} - -/// generated route for -/// [MapLocationPickerPage] -class MapLocationPickerRoute extends PageRouteInfo { - MapLocationPickerRoute({ - Key? key, - LatLng initialLatLng = const LatLng(0, 0), - List? children, - }) : super( - MapLocationPickerRoute.name, - args: MapLocationPickerRouteArgs( - key: key, - initialLatLng: initialLatLng, - ), - initialChildren: children, - ); - - static const String name = 'MapLocationPickerRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const MapLocationPickerRouteArgs(), - ); - return MapLocationPickerPage( - key: args.key, - initialLatLng: args.initialLatLng, - ); - }, - ); -} - -class MapLocationPickerRouteArgs { - const MapLocationPickerRouteArgs({ - this.key, - this.initialLatLng = const LatLng(0, 0), - }); - - final Key? key; - - final LatLng initialLatLng; - - @override - String toString() { - return 'MapLocationPickerRouteArgs{key: $key, initialLatLng: $initialLatLng}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! MapLocationPickerRouteArgs) return false; - return key == other.key && initialLatLng == other.initialLatLng; - } - - @override - int get hashCode => key.hashCode ^ initialLatLng.hashCode; -} - -/// generated route for -/// [PartnerPage] -class PartnerRoute extends PageRouteInfo { - const PartnerRoute({List? children}) - : super(PartnerRoute.name, initialChildren: children); - - static const String name = 'PartnerRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const PartnerPage(); - }, - ); -} - -/// generated route for -/// [PinAuthPage] -class PinAuthRoute extends PageRouteInfo { - PinAuthRoute({ - Key? key, - bool createPinCode = false, - List? children, - }) : super( - PinAuthRoute.name, - args: PinAuthRouteArgs(key: key, createPinCode: createPinCode), - initialChildren: children, - ); - - static const String name = 'PinAuthRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const PinAuthRouteArgs(), - ); - return PinAuthPage(key: args.key, createPinCode: args.createPinCode); - }, - ); -} - -class PinAuthRouteArgs { - const PinAuthRouteArgs({this.key, this.createPinCode = false}); - - final Key? key; - - final bool createPinCode; - - @override - String toString() { - return 'PinAuthRouteArgs{key: $key, createPinCode: $createPinCode}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! PinAuthRouteArgs) return false; - return key == other.key && createPinCode == other.createPinCode; - } - - @override - int get hashCode => key.hashCode ^ createPinCode.hashCode; -} - -/// generated route for -/// [ProfilePictureCropPage] -class ProfilePictureCropRoute - extends PageRouteInfo { - ProfilePictureCropRoute({ - Key? key, - required BaseAsset asset, - List? children, - }) : super( - ProfilePictureCropRoute.name, - args: ProfilePictureCropRouteArgs(key: key, asset: asset), - initialChildren: children, - ); - - static const String name = 'ProfilePictureCropRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return ProfilePictureCropPage(key: args.key, asset: args.asset); - }, - ); -} - -class ProfilePictureCropRouteArgs { - const ProfilePictureCropRouteArgs({this.key, required this.asset}); - - final Key? key; - - final BaseAsset asset; - - @override - String toString() { - return 'ProfilePictureCropRouteArgs{key: $key, asset: $asset}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ProfilePictureCropRouteArgs) return false; - return key == other.key && asset == other.asset; - } - - @override - int get hashCode => key.hashCode ^ asset.hashCode; -} - -/// generated route for -/// [RemoteAlbumPage] -class RemoteAlbumRoute extends PageRouteInfo { - RemoteAlbumRoute({ - Key? key, - required RemoteAlbum album, - List? children, - }) : super( - RemoteAlbumRoute.name, - args: RemoteAlbumRouteArgs(key: key, album: album), - initialChildren: children, - ); - - static const String name = 'RemoteAlbumRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return RemoteAlbumPage(key: args.key, album: args.album); - }, - ); -} - -class RemoteAlbumRouteArgs { - const RemoteAlbumRouteArgs({this.key, required this.album}); - - final Key? key; - - final RemoteAlbum album; - - @override - String toString() { - return 'RemoteAlbumRouteArgs{key: $key, album: $album}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! RemoteAlbumRouteArgs) return false; - return key == other.key && album == other.album; - } - - @override - int get hashCode => key.hashCode ^ album.hashCode; -} - -/// generated route for -/// [RemoteMediaSummaryPage] -class RemoteMediaSummaryRoute extends PageRouteInfo { - const RemoteMediaSummaryRoute({List? children}) - : super(RemoteMediaSummaryRoute.name, initialChildren: children); - - static const String name = 'RemoteMediaSummaryRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const RemoteMediaSummaryPage(); - }, - ); -} - -/// generated route for -/// [SettingsPage] -class SettingsRoute extends PageRouteInfo { - const SettingsRoute({List? children}) - : super(SettingsRoute.name, initialChildren: children); - - static const String name = 'SettingsRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const SettingsPage(); - }, - ); -} - -/// generated route for -/// [SettingsSubPage] -class SettingsSubRoute extends PageRouteInfo { - SettingsSubRoute({ - required SettingSection section, - Key? key, - List? children, - }) : super( - SettingsSubRoute.name, - args: SettingsSubRouteArgs(section: section, key: key), - initialChildren: children, - ); - - static const String name = 'SettingsSubRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return SettingsSubPage(args.section, key: args.key); - }, - ); -} - -class SettingsSubRouteArgs { - const SettingsSubRouteArgs({required this.section, this.key}); - - final SettingSection section; - - final Key? key; - - @override - String toString() { - return 'SettingsSubRouteArgs{section: $section, key: $key}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! SettingsSubRouteArgs) return false; - return section == other.section && key == other.key; - } - - @override - int get hashCode => section.hashCode ^ key.hashCode; -} - -/// generated route for -/// [ShareIntentPage] -class ShareIntentRoute extends PageRouteInfo { - ShareIntentRoute({ - Key? key, - required List attachments, - List? children, - }) : super( - ShareIntentRoute.name, - args: ShareIntentRouteArgs(key: key, attachments: attachments), - initialChildren: children, - ); - - static const String name = 'ShareIntentRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs(); - return ShareIntentPage(key: args.key, attachments: args.attachments); - }, - ); -} - -class ShareIntentRouteArgs { - const ShareIntentRouteArgs({this.key, required this.attachments}); - - final Key? key; - - final List attachments; - - @override - String toString() { - return 'ShareIntentRouteArgs{key: $key, attachments: $attachments}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! ShareIntentRouteArgs) return false; - return key == other.key && - const ListEquality().equals( - attachments, - other.attachments, - ); - } - - @override - int get hashCode => - key.hashCode ^ - const ListEquality().hash(attachments); -} - -/// generated route for -/// [SharedLinkEditPage] -class SharedLinkEditRoute extends PageRouteInfo { - SharedLinkEditRoute({ - Key? key, - SharedLink? existingLink, - List? assetsList, - String? albumId, - List? children, - }) : super( - SharedLinkEditRoute.name, - args: SharedLinkEditRouteArgs( - key: key, - existingLink: existingLink, - assetsList: assetsList, - albumId: albumId, - ), - initialChildren: children, - ); - - static const String name = 'SharedLinkEditRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - final args = data.argsAs( - orElse: () => const SharedLinkEditRouteArgs(), - ); - return SharedLinkEditPage( - key: args.key, - existingLink: args.existingLink, - assetsList: args.assetsList, - albumId: args.albumId, - ); - }, - ); -} - -class SharedLinkEditRouteArgs { - const SharedLinkEditRouteArgs({ - this.key, - this.existingLink, - this.assetsList, - this.albumId, - }); - - final Key? key; - - final SharedLink? existingLink; - - final List? assetsList; - - final String? albumId; - - @override - String toString() { - return 'SharedLinkEditRouteArgs{key: $key, existingLink: $existingLink, assetsList: $assetsList, albumId: $albumId}'; - } - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! SharedLinkEditRouteArgs) return false; - return key == other.key && - existingLink == other.existingLink && - const ListEquality().equals(assetsList, other.assetsList) && - albumId == other.albumId; - } - - @override - int get hashCode => - key.hashCode ^ - existingLink.hashCode ^ - const ListEquality().hash(assetsList) ^ - albumId.hashCode; -} - -/// generated route for -/// [SharedLinkPage] -class SharedLinkRoute extends PageRouteInfo { - const SharedLinkRoute({List? children}) - : super(SharedLinkRoute.name, initialChildren: children); - - static const String name = 'SharedLinkRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const SharedLinkPage(); - }, - ); -} - -/// generated route for -/// [SplashScreenPage] -class SplashScreenRoute extends PageRouteInfo { - const SplashScreenRoute({List? children}) - : super(SplashScreenRoute.name, initialChildren: children); - - static const String name = 'SplashScreenRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const SplashScreenPage(); - }, - ); -} - -/// generated route for -/// [SyncStatusPage] -class SyncStatusRoute extends PageRouteInfo { - const SyncStatusRoute({List? children}) - : super(SyncStatusRoute.name, initialChildren: children); - - static const String name = 'SyncStatusRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const SyncStatusPage(); - }, - ); -} - -/// generated route for -/// [TabShellPage] -class TabShellRoute extends PageRouteInfo { - const TabShellRoute({List? children}) - : super(TabShellRoute.name, initialChildren: children); - - static const String name = 'TabShellRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const TabShellPage(); - }, - ); -} - -/// generated route for -/// [WhatsNewPage] -class WhatsNewRoute extends PageRouteInfo { - const WhatsNewRoute({List? children}) - : super(WhatsNewRoute.name, initialChildren: children); - - static const String name = 'WhatsNewRoute'; - - static PageInfo page = PageInfo( - name, - builder: (data) { - return const WhatsNewPage(); - }, - ); -} From 920552c1c245411e70c0179ba3577af2d4d74320 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Fri, 31 Jul 2026 05:52:59 -0700 Subject: [PATCH 40/69] chore(mobile): depend on OpenAPI generation in appropriate codegen tasks (#30425) --- mise.toml | 2 +- mobile/mise.toml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mise.toml b/mise.toml index f01c07f980..ad7fdf5a90 100644 --- a/mise.toml +++ b/mise.toml @@ -69,7 +69,7 @@ sources = [ "patch/*", "bin/generate-dart-sdk.sh", ] -outputs = ["../mobile/openapi/lib/"] +outputs = ["../mobile/generated/openapi/"] run = "bash ./bin/generate-dart-sdk.sh" [tasks.open-api] diff --git a/mobile/mise.toml b/mobile/mise.toml index ce7c626e18..91cdb77a19 100644 --- a/mobile/mise.toml +++ b/mobile/mise.toml @@ -17,7 +17,7 @@ windows-x64 = { asset_pattern = "dcm-windows-release.zip" } [tasks.codegen] alias = "codegen" description = "Generate all codegen artifacts" -depends = ["codegen:dart", "codegen:drift:schema", "codegen:pigeon", "codegen:translation"] +depends = ["//:open-api-dart", "codegen:dart", "codegen:drift:schema", "codegen:pigeon", "codegen:translation"] [tasks."codegen:dart"] description = "Execute build_runner to auto-generate dart code" @@ -32,12 +32,14 @@ run = [ "dart run build_runner build --delete-conflicting-outputs", "dart format lib/routing/router.gr.dart", ] +depends = ["//:open-api-dart"] [tasks."codegen:drift:schema"] description = "Generate Drift migration schema test code" sources = ["drift_schemas/main/*.json"] outputs = { auto = true } run = "dart run drift_dev schema generate --data-classes --companions drift_schemas/main/ test/drift/main/generated/" +depends = ["//:open-api-dart"] [tasks."codegen:watch"] alias = "watch" @@ -51,6 +53,7 @@ run = [ "ls pigeon/*.dart | xargs -n1 -P4 -I{} dart run pigeon --input {}", "dart format lib/platform/", ] +depends = ["//:open-api-dart"] [tasks."codegen:translation"] alias = "translation" @@ -123,6 +126,7 @@ run = [ "dart run easy_localization:generate -S ../i18n", "dart format lib/generated/codegen_loader.g.dart", ] +depends = ["//:open-api-dart"] [tasks."i18n:keys"] description = "Generate i18n keys" From dd8d068d4438ae24942201459391c722b002f3ee Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Fri, 31 Jul 2026 18:44:33 +0530 Subject: [PATCH 41/69] chore: drop removed build_runner flag (#30427) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- mobile/mise.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/mise.toml b/mobile/mise.toml index 91cdb77a19..ee312178a4 100644 --- a/mobile/mise.toml +++ b/mobile/mise.toml @@ -29,7 +29,7 @@ sources = [ ] outputs = { auto = true } run = [ - "dart run build_runner build --delete-conflicting-outputs", + "dart run build_runner build", "dart format lib/routing/router.gr.dart", ] depends = ["//:open-api-dart"] @@ -44,7 +44,7 @@ depends = ["//:open-api-dart"] [tasks."codegen:watch"] alias = "watch" description = "Watch and auto-generate dart code" -run = "dart run build_runner watch --delete-conflicting-outputs" +run = "dart run build_runner watch" [tasks."codegen:pigeon"] alias = "pigeon" From 483b375c26c91e9ad3d42666fff58b3fbda1164a Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Fri, 31 Jul 2026 07:37:12 -0700 Subject: [PATCH 42/69] fix(mobile): resolve owned assets when partner owns identical asset (#30137) * fix(mobile): resolve owned assets when partner owns identical asset * Add limit to auth user expressions * Change debug method semantics --- mobile/lib/domain/services/asset.service.dart | 4 +- .../repositories/local_asset.repository.dart | 22 ++-- .../repositories/remote_asset.repository.dart | 4 +- .../repositories/timeline.repository.dart | 12 +-- .../trashed_local_asset.repository.dart | 9 +- .../pages/drift_asset_troubleshoot.page.dart | 6 +- .../local_asset_repository_test.dart | 67 ++++++++++++ .../remote_asset_repository_test.dart | 67 ++++++++++++ .../timeline_repository_test.dart | 44 ++++++++ .../trashed_local_asset_repository_test.dart | 100 ++++++++++++++++++ mobile/test/medium/repository_context.dart | 46 ++++++++ 11 files changed, 359 insertions(+), 22 deletions(-) create mode 100644 mobile/test/medium/repositories/remote_asset_repository_test.dart create mode 100644 mobile/test/medium/repositories/trashed_local_asset_repository_test.dart diff --git a/mobile/lib/domain/services/asset.service.dart b/mobile/lib/domain/services/asset.service.dart index f35c962ff0..9cbdf1bdfe 100644 --- a/mobile/lib/domain/services/asset.service.dart +++ b/mobile/lib/domain/services/asset.service.dart @@ -36,8 +36,8 @@ class AssetService { return _localRepository.getByChecksum(checksum); } - Future getRemoteAssetByChecksum(String checksum) { - return _remoteRepository.getByChecksum(checksum); + Future> getAllRemoteAssetDebugByChecksum(String checksum) { + return _remoteRepository.getAllDebugForChecksum(checksum); } Future getRemoteAsset(String id) { diff --git a/mobile/lib/infrastructure/repositories/local_asset.repository.dart b/mobile/lib/infrastructure/repositories/local_asset.repository.dart index c34d2c4697..8396d6d2a6 100644 --- a/mobile/lib/infrastructure/repositories/local_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/local_asset.repository.dart @@ -24,13 +24,21 @@ class DriftLocalAssetRepository extends DriftDatabaseRepository { const DriftLocalAssetRepository(this._db) : super(_db); SingleOrNullSelectable _assetSelectable(String id) { - final query = _db.localAssetEntity.select().addColumns([_db.remoteAssetEntity.id]).join([ - leftOuterJoin( - _db.remoteAssetEntity, - _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum), - useColumns: false, - ), - ])..where(_db.localAssetEntity.id.equals(id)); + final query = + _db.localAssetEntity.select().addColumns([_db.remoteAssetEntity.id]).join([ + leftOuterJoin( + _db.remoteAssetEntity, + _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum) & + _db.remoteAssetEntity.ownerId.isInQuery( + _db.selectOnly(_db.authUserEntity) + ..addColumns([_db.authUserEntity.id]) + ..limit(1), + ), + useColumns: false, + ), + ]) + ..where(_db.localAssetEntity.id.equals(id)) + ..limit(1); return query.map((row) { final asset = row.readTable(_db.localAssetEntity).toDto(); diff --git a/mobile/lib/infrastructure/repositories/remote_asset.repository.dart b/mobile/lib/infrastructure/repositories/remote_asset.repository.dart index e97b05465b..d18284b636 100644 --- a/mobile/lib/infrastructure/repositories/remote_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/remote_asset.repository.dart @@ -59,10 +59,10 @@ class RemoteAssetRepository extends DriftDatabaseRepository { return _assetSelectable(id).getSingleOrNull(); } - Future getByChecksum(String checksum) { + Future> getAllDebugForChecksum(String checksum) { final query = _db.remoteAssetEntity.select()..where((row) => row.checksum.equals(checksum)); - return query.map((row) => row.toDto()).getSingleOrNull(); + return query.map((row) => row.toDto()).get(); } Future> getStackChildren(RemoteAsset asset) { diff --git a/mobile/lib/infrastructure/repositories/timeline.repository.dart b/mobile/lib/infrastructure/repositories/timeline.repository.dart index 6a9fbdb204..82ad38c80f 100644 --- a/mobile/lib/infrastructure/repositories/timeline.repository.dart +++ b/mobile/lib/infrastructure/repositories/timeline.repository.dart @@ -139,11 +139,6 @@ class DriftTimelineRepository extends DriftDatabaseRepository { _db.localAlbumAssetEntity.assetId.equalsExp(_db.localAssetEntity.id), useColumns: false, ), - leftOuterJoin( - _db.remoteAssetEntity, - _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum), - useColumns: false, - ), ]) ..addColumns([assetCountExp, dateExp]) ..where(_db.localAlbumAssetEntity.albumId.equals(albumId)) @@ -167,7 +162,12 @@ class DriftTimelineRepository extends DriftDatabaseRepository { ), leftOuterJoin( _db.remoteAssetEntity, - _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum), + _db.localAssetEntity.checksum.equalsExp(_db.remoteAssetEntity.checksum) & + _db.remoteAssetEntity.ownerId.isInQuery( + _db.selectOnly(_db.authUserEntity) + ..addColumns([_db.authUserEntity.id]) + ..limit(1), + ), useColumns: false, ), ]) diff --git a/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart index e31b47a9fc..0f50776e4e 100644 --- a/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart @@ -16,6 +16,11 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository { const DriftTrashedLocalAssetRepository(this._db) : super(_db); + /// Matches remote_asset_entity rows owned by the current user. The asset is unique over (owner, checksum), + /// so partners can have a duplicate checksum + Expression get _ownedByCurrentUser => + _db.remoteAssetEntity.ownerId.isInQuery(_db.selectOnly(_db.authUserEntity)..addColumns([_db.authUserEntity.id])); + Future updateHashes(Map hashes) { if (hashes.isEmpty) { return Future.value(); @@ -45,7 +50,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository { await (_db.select(_db.trashedLocalAssetEntity).join([ innerJoin( _db.remoteAssetEntity, - _db.remoteAssetEntity.checksum.equalsExp(_db.trashedLocalAssetEntity.checksum), + _db.remoteAssetEntity.checksum.equalsExp(_db.trashedLocalAssetEntity.checksum) & _ownedByCurrentUser, ), ])..where( _db.trashedLocalAssetEntity.source.equalsValue(TrashOrigin.remoteSync) & @@ -273,7 +278,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository { innerJoin(_db.localAssetEntity, _db.localAlbumAssetEntity.assetId.equalsExp(_db.localAssetEntity.id)), leftOuterJoin( _db.remoteAssetEntity, - _db.remoteAssetEntity.checksum.equalsExp(_db.localAssetEntity.checksum), + _db.remoteAssetEntity.checksum.equalsExp(_db.localAssetEntity.checksum) & _ownedByCurrentUser, ), ])..where( _db.localAlbumEntity.backupSelection.equalsValue(BackupSelection.selected) & diff --git a/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart b/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart index cee0cdc334..d50e4b190e 100644 --- a/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart +++ b/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart @@ -280,8 +280,8 @@ class _RemoteAssetSection extends ConsumerWidget { return const SizedBox.shrink(); } - return FutureBuilder( - future: assetService.getRemoteAssetByChecksum(asset.checksum!), + return FutureBuilder>( + future: assetService.getAllRemoteAssetDebugByChecksum(asset.checksum!), builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { return const _PropertySectionCard( @@ -297,7 +297,7 @@ class _RemoteAssetSection extends ConsumerWidget { ); } - final remoteAsset = snapshot.data; + final remoteAsset = snapshot.data?.firstOrNull; if (remoteAsset == null) { return _PropertySectionCard( diff --git a/mobile/test/medium/repositories/local_asset_repository_test.dart b/mobile/test/medium/repositories/local_asset_repository_test.dart index d92b1c0184..2376445d1a 100644 --- a/mobile/test/medium/repositories/local_asset_repository_test.dart +++ b/mobile/test/medium/repositories/local_asset_repository_test.dart @@ -19,6 +19,73 @@ void main() { await ctx.dispose(); }); + group('get', () { + late String userId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + // Owner-scoped queries resolve the current user via authUserEntity. + await ctx.newAuthUser(id: userId); + }); + + test('allows the same checksum to exist for multiple owners (#29973)', () async { + const checksum = 'some-shared-checksum'; + final mine = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + final local = await ctx.newLocalAsset(checksum: checksum); + + final result = await sut.get(local.id); + + expect(result, isNotNull); + expect(result!.id, local.id); + // We must explicitly get OUR asset, not the partner's + expect(result.remoteId, mine.id); + }); + + test('reports local-only when only a partner has a remote copy (#29973)', () async { + // The current user has NOT uploaded this file; only a partner owns an identical-checksum remote asset + const checksum = 'partner-only'; + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + final local = await ctx.newLocalAsset(checksum: checksum); + + final result = await sut.get(local.id); + + expect(result, isNotNull); + expect(result!.remoteId, isNull); + expect(result.storage, AssetState.local); + }); + + test('allows the current user to have access to multiple remote rows for one checksum (#29973)', () async { + // A single user can have their own remote asset, a partner's remote asset, and a local asset all with the same checksum + const checksum = 'multi-library'; + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final local = await ctx.newLocalAsset(checksum: checksum); + + final result = await sut.get(local.id); + + expect(result, isNotNull); + expect(result!.id, local.id); + expect(result.remoteId, isNotNull); + }); + + test('attaches remoteId to local asset automatically in simple scenarios', () async { + const checksum = 'simple'; + final remote = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final local = await ctx.newLocalAsset(checksum: checksum); + + final result = await sut.get(local.id); + + expect(result, isNotNull); + expect(result!.remoteId, remote.id); + expect(result.storage, AssetState.merged); + }); + }); + group('getRemovalCandidates', () { final cutoffDate = DateTime(2024, 1, 1); final beforeCutoff = DateTime(2023, 12, 31); diff --git a/mobile/test/medium/repositories/remote_asset_repository_test.dart b/mobile/test/medium/repositories/remote_asset_repository_test.dart new file mode 100644 index 0000000000..f534355d99 --- /dev/null +++ b/mobile/test/medium/repositories/remote_asset_repository_test.dart @@ -0,0 +1,67 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; + +import '../repository_context.dart'; + +void main() { + late MediumRepositoryContext ctx; + late RemoteAssetRepository sut; + + setUp(() { + ctx = MediumRepositoryContext(); + sut = RemoteAssetRepository(ctx.db); + }); + + tearDown(() async { + await ctx.dispose(); + }); + + group('getByChecksum', () { + late String userId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + await ctx.newAuthUser(id: userId); + }); + + test('returns all assets when a partner shares the checksum', () async { + const checksum = 'shared-partner-checksum'; + final mine = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final partner = await ctx.newUser(); + final theirs = await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + + final result = await sut.getAllDebugForChecksum(checksum); + final mineResult = result.firstWhere((asset) => asset.id == mine.id); + final theirResult = result.firstWhere((asset) => asset.id == theirs.id); + + expect(result, isNotEmpty); + expect(mineResult.id, mine.id); + expect(mineResult.ownerId, userId); + + expect(theirResult.id, theirs.id); + expect(theirResult.ownerId, partner.id); + }); + + test('returns partner asset only if there is no matching user asset', () async { + const checksum = 'partner-only'; + final partner = await ctx.newUser(); + final theirs = await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + + final result = await sut.getAllDebugForChecksum(checksum); + + expect(result.length, 1); + expect(result[0].id, theirs.id); + }); + + test('returns the current user\'s asset', () async { + const checksum = 'simple'; + final remote = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + + final result = await sut.getAllDebugForChecksum(checksum); + + expect(result.length, 1); + expect(result[0].id, remote.id); + }); + }); +} diff --git a/mobile/test/medium/repositories/timeline_repository_test.dart b/mobile/test/medium/repositories/timeline_repository_test.dart index d78d9b1ef7..502a65d45b 100644 --- a/mobile/test/medium/repositories/timeline_repository_test.dart +++ b/mobile/test/medium/repositories/timeline_repository_test.dart @@ -102,4 +102,48 @@ void main() { expect(remote.localId, local.id); }); }); + + group('localAlbum assets', () { + late String userId; + late String otherUserId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + await ctx.newAuthUser(id: userId); + final other = await ctx.newUser(); + otherUserId = other.id; + }); + + test('does not duplicate assets when a partner shares the checksum', () async { + const checksum = 'shared-partner-checksum'; + final album = await ctx.newLocalAlbum(); + final local = await ctx.newLocalAsset(checksum: checksum); + await ctx.newLocalAlbumAsset(albumId: album.id, assetId: local.id); + final myRemote = await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + await ctx.newRemoteAsset(ownerId: otherUserId, checksum: checksum); + + final assets = await sut.localAlbum(album.id, .day).assetSource(0, 10); + + expect(assets, hasLength(1)); + final asset = assets.single as LocalAsset; + expect(asset.id, local.id); + // Must resolve the current user's remote id + expect(asset.remoteId, myRemote.id); + }); + + test('bucket count ignores a partner sharing the checksum', () async { + const checksum = 'shared-partner-checksum'; + final album = await ctx.newLocalAlbum(); + final local = await ctx.newLocalAsset(checksum: checksum); + await ctx.newLocalAlbumAsset(albumId: album.id, assetId: local.id); + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + await ctx.newRemoteAsset(ownerId: otherUserId, checksum: checksum); + + final buckets = await sut.localAlbum(album.id, .day).bucketSource().first; + + expect(buckets, hasLength(1)); + expect(buckets.single.assetCount, 1); + }); + }); } diff --git a/mobile/test/medium/repositories/trashed_local_asset_repository_test.dart b/mobile/test/medium/repositories/trashed_local_asset_repository_test.dart new file mode 100644 index 0000000000..0af09715c7 --- /dev/null +++ b/mobile/test/medium/repositories/trashed_local_asset_repository_test.dart @@ -0,0 +1,100 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/album/local_album.model.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; + +import '../repository_context.dart'; + +void main() { + late MediumRepositoryContext ctx; + late DriftTrashedLocalAssetRepository sut; + + setUp(() { + ctx = MediumRepositoryContext(); + sut = DriftTrashedLocalAssetRepository(ctx.db); + }); + + tearDown(() async { + await ctx.dispose(); + }); + + group('getToRestore', () { + late String userId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + await ctx.newAuthUser(id: userId); + }); + + test('does not restore based on a partner\'s live remote copy', () async { + const checksum = 'shared-partner-checksum'; + final album = await ctx.newLocalAlbum(backupSelection: BackupSelection.selected); + final trashed = await ctx.newTrashedLocalAsset(albumId: album.id, checksum: checksum); + + // Current user's own remote copy is deleted; only a partner has an active copy. + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum, deletedAt: DateTime(2020, 1, 1)); + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum); + + final result = await sut.getToRestore(); + + final ids = result.map((a) => a.id); + expect(ids, isNot(contains(trashed.id))); + }); + + test('restores when the current user\'s own remote copy is live', () async { + const checksum = 'my-live-copy'; + final album = await ctx.newLocalAlbum(backupSelection: BackupSelection.selected); + final trashed = await ctx.newTrashedLocalAsset(albumId: album.id, checksum: checksum); + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + + final result = await sut.getToRestore(); + + final ids = result.map((a) => a.id); + expect(ids, contains(trashed.id)); + }); + }); + + group('getToTrash', () { + late String userId; + + setUp(() async { + final user = await ctx.newUser(); + userId = user.id; + await ctx.newAuthUser(id: userId); + }); + + Future addLocalAssetToBackupAlbum(String checksum) async { + final album = await ctx.newLocalAlbum(backupSelection: BackupSelection.selected); + final local = await ctx.newLocalAsset(checksum: checksum); + await ctx.newLocalAlbumAsset(albumId: album.id, assetId: local.id); + return local.id; + } + + test('does not trash when only a partner\'s remote copy is deleted', () async { + const checksum = 'shared-partner-checksum'; + final localId = await addLocalAssetToBackupAlbum(checksum); + + // Current user's own remote copy is live but a partner deleted theirs + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum); + final partner = await ctx.newUser(); + await ctx.newRemoteAsset(ownerId: partner.id, checksum: checksum, deletedAt: DateTime(2020, 1, 1)); + + final result = await sut.getToTrash(); + + final ids = result.values.expand((assets) => assets).map((a) => a.id); + expect(ids, isNot(contains(localId))); + }); + + test('trashes when the current user\'s own remote copy is deleted', () async { + const checksum = 'my-deleted-copy'; + final localId = await addLocalAssetToBackupAlbum(checksum); + await ctx.newRemoteAsset(ownerId: userId, checksum: checksum, deletedAt: DateTime(2020, 1, 1)); + + final result = await sut.getToTrash(); + + final ids = result.values.expand((assets) => assets).map((a) => a.id); + expect(ids, contains(localId)); + }); + }); +} diff --git a/mobile/test/medium/repository_context.dart b/mobile/test/medium/repository_context.dart index ed06774e82..09b8e2c7eb 100644 --- a/mobile/test/medium/repository_context.dart +++ b/mobile/test/medium/repository_context.dart @@ -6,6 +6,7 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/memory.model.dart'; import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/infrastructure/entities/asset_face.entity.drift.dart'; +import 'package:immich_mobile/infrastructure/entities/auth_user.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart'; @@ -18,6 +19,8 @@ import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity. import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.entity.drift.dart'; +import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.dart'; +import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart'; import 'package:immich_mobile/infrastructure/entities/user.entity.drift.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/utils/option.dart'; @@ -72,6 +75,22 @@ class MediumRepositoryContext { ); } + /// Seeds a user into `authUserEntity` as the currently authenticated user + Future newAuthUser({String? id, String? email, bool? isAdmin, AvatarColor? avatarColor}) async { + id ??= TestUtils.uuid(); + return db + .into(db.authUserEntity) + .insertReturning( + AuthUserEntityCompanion( + id: .new(id), + email: .new(email ?? '$id@test.com'), + name: .new('user_$id'), + isAdmin: .new(isAdmin ?? false), + avatarColor: .new(avatarColor ?? TestUtils.randElement(AvatarColor.values)), + ), + ); + } + Future newPartner({required String sharedById, required String sharedWithId, bool? inTimeline}) { return db .into(db.partnerEntity) @@ -286,6 +305,33 @@ class MediumRepositoryContext { ); } + /// Seeds a trashed local asset into `trashedLocalAssetEntity` + Future newTrashedLocalAsset({ + String? id, + required String albumId, + String? checksum, + TrashOrigin? source, + AssetType? type, + DateTime? createdAt, + bool? isFavorite, + }) async { + id ??= TestUtils.uuid(); + return db + .into(db.trashedLocalAssetEntity) + .insertReturning( + TrashedLocalAssetEntityCompanion( + id: .new(id), + albumId: .new(albumId), + name: .new('trashed_$id.jpg'), + type: .new(type ?? .image), + checksum: .new(checksum), + source: .new(source ?? TrashOrigin.remoteSync), + isFavorite: .new(isFavorite ?? false), + createdAt: .new(TestUtils.date(createdAt)), + ), + ); + } + Future newLocalAlbum({ String? id, String? name, From 5b0a324b68e1b795c527b9f64f59ec26d30fc2c3 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:40 +0530 Subject: [PATCH 43/69] feat: restore action (#29374) * refactor: existing actions to new structure # Conflicts: # mobile/lib/presentation/actions/action.dart # mobile/lib/presentation/actions/action.widget.dart # mobile/lib/presentation/actions/asset_debug.action.dart # mobile/lib/presentation/actions/favorite.action.dart # mobile/lib/presentation/actions/partner.action.dart # mobile/test/unit/presentation/actions/favorite_action_test.dart * rename to actionitem * review changes * refactor: mobile restore action --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../presentation/actions/favorite.action.dart | 4 +- .../presentation/actions/restore.action.dart | 47 ++++++++++++ .../restore_action_button.widget.dart | 56 -------------- .../restore_trash_action_button.widget.dart | 43 ----------- .../asset_viewer/bottom_bar.widget.dart | 9 +-- .../trash_bottom_sheet.widget.dart | 5 +- .../infrastructure/action.provider.dart | 11 --- mobile/lib/services/action.service.dart | 5 -- mobile/lib/utils/action_button.utils.dart | 8 +- .../services/sync_stream_service_test.dart | 1 - .../actions/restore_action_test.dart | 75 +++++++++++++++++++ 11 files changed, 133 insertions(+), 131 deletions(-) create mode 100644 mobile/lib/presentation/actions/restore.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart create mode 100644 mobile/test/unit/presentation/actions/restore_action_test.dart diff --git a/mobile/lib/presentation/actions/favorite.action.dart b/mobile/lib/presentation/actions/favorite.action.dart index 9ab3770163..9b7568610c 100644 --- a/mobile/lib/presentation/actions/favorite.action.dart +++ b/mobile/lib/presentation/actions/favorite.action.dart @@ -47,12 +47,12 @@ class FavoriteAction extends AssetActionBuilder { final message = shouldFavorite ? context.t.favorite_action_prompt(count: assetIds.length) : context.t.unfavorite_action_prompt(count: assetIds.length); - final assertService = ref.read(assetServiceProvider); + final assetService = ref.read(assetServiceProvider); final toastService = ref.read(toastServiceProvider); final clearSelection = ref.read(clearSelectionProvider(source)); try { - await assertService.update(assetIds, isFavorite: .some(shouldFavorite)); + await assetService.update(assetIds, isFavorite: .some(shouldFavorite)); toastService.success(message); clearSelection(); } catch (error, stack) { diff --git a/mobile/lib/presentation/actions/restore.action.dart b/mobile/lib/presentation/actions/restore.action.dart new file mode 100644 index 0000000000..0a2f34abf8 --- /dev/null +++ b/mobile/lib/presentation/actions/restore.action.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + final assetIds = assets.trashed().map((asset) => asset.id).toList(growable: false); + return assetIds.isEmpty ? null : assetIds; +}); + +class RestoreAction extends AssetActionBuilder { + const RestoreAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + if (!ref.watch(_stateProvider(source).select((state) => state != null))) { + return null; + } + + return .new(icon: Icons.history_rounded, label: context.t.restore, onAction: () => _restore(context, ref)); + } + + Future _restore(BuildContext context, WidgetRef ref) async { + final assetIds = ref.read(_stateProvider(source)); + if (assetIds == null) { + return; + } + + final message = context.t.assets_restored_count(count: assetIds.length); + final assetService = ref.read(assetServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + await assetService.restoreTrash(assetIds); + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to restore assets"); + } + } +} diff --git a/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart deleted file mode 100644 index 9270ce8351..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/restore_action_button.widget.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class RestoreActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const RestoreActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).restoreTrash(source); - ref.read(multiSelectProvider.notifier).reset(); - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - if (!context.mounted) { - return; - } - - final successMessage = 'assets_restored_count'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.history_rounded, - label: 'restore'.t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - maxWidth: 100.0, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart deleted file mode 100644 index f6cd26c189..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class RestoreTrashActionButton extends ConsumerWidget { - final ActionSource source; - - const RestoreTrashActionButton({super.key, required this.source}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).restoreTrash(source); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'assets_restored_count'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return TextButton.icon( - icon: const Icon(Icons.history_rounded), - label: Text('restore'.t(), style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold)), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart index 53a7aee700..14aa768626 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart @@ -4,12 +4,13 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/add_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_image_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/restore_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/ocr_toggle_button.widget.dart'; @@ -43,10 +44,8 @@ class ViewerBottomBar extends ConsumerWidget { final originalTheme = context.themeData; final actions = [ - if (isInTrash && isOwner && asset.hasRemote) - const RestoreActionButton(source: ActionSource.viewer) - else - const ShareActionButton(source: ActionSource.viewer), + const ActionColumnButton(action: RestoreAction(source: .viewer)), + const ShareActionButton(source: .viewer), if (!isInLockedView) ...[ if (!isInTrash) ...[ diff --git a/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart index c96e680966..4e438884b3 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart @@ -2,8 +2,9 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/restore_trash_action_button.widget.dart'; class TrashBottomBar extends ConsumerWidget { const TrashBottomBar({super.key}); @@ -21,7 +22,7 @@ class TrashBottomBar extends ConsumerWidget { mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ DeleteTrashActionButton(source: ActionSource.timeline), - RestoreTrashActionButton(source: ActionSource.timeline), + ActionColumnButton(action: RestoreAction(source: .timeline)), ], ), ), diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index d4cd39bbd3..2958d761c0 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -194,17 +194,6 @@ class ActionNotifier extends Notifier { } } - Future restoreTrash(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.restoreTrash(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to restore trash assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future emptyTrash(String userId) async { try { final count = await _service.emptyTrash(userId); diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index dd1b3e8496..b1219383f5 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -98,11 +98,6 @@ class ActionService { await _remoteAssetRepository.trash(remoteIds); } - Future restoreTrash(List ids) async { - await _assetApiRepository.restoreTrash(ids); - await _remoteAssetRepository.restoreTrash(ids); - } - Future emptyTrash(String userId) async { final count = await _assetApiRepository.emptyTrash(); await _remoteAssetRepository.emptyTrash(userId); diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 4219e0aed7..a838333475 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -9,6 +9,7 @@ import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/cast_action_button.widget.dart'; @@ -21,7 +22,6 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_f import 'package:immich_mobile/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/restore_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; @@ -208,11 +208,7 @@ enum ActionButtonType { ), ActionButtonType.download => DownloadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), ActionButtonType.trash => TrashActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.restoreTrash => RestoreActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), + ActionButtonType.restoreTrash => ActionMenuItem(action: RestoreAction(source: context.source)), ActionButtonType.deletePermanent => DeletePermanentActionButton( source: context.source, iconOnly: iconOnly, diff --git a/mobile/test/domain/services/sync_stream_service_test.dart b/mobile/test/domain/services/sync_stream_service_test.dart index ac81513d96..5cd4104f91 100644 --- a/mobile/test/domain/services/sync_stream_service_test.dart +++ b/mobile/test/domain/services/sync_stream_service_test.dart @@ -36,7 +36,6 @@ class _AbortCallbackWrapper { class _MockAbortCallbackWrapper extends Mock implements _AbortCallbackWrapper {} - void main() { late SyncStreamService sut; late SyncStreamRepository mockSyncStreamRepo; diff --git a/mobile/test/unit/presentation/actions/restore_action_test.dart b/mobile/test/unit/presentation/actions/restore_action_test.dart new file mode 100644 index 0000000000..d7992850e5 --- /dev/null +++ b/mobile/test/unit/presentation/actions/restore_action_test.dart @@ -0,0 +1,75 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/restore.action.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() { + context.dispose(); + }); + + RemoteAsset owned({bool trashed = true}) => + RemoteAssetFactory.create(ownerId: context.currentUser.id, deletedAt: trashed ? DateTime(2020) : null); + + Future pumpRestore(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const RestoreAction(source: .timeline), overrides: context.selected(selection)); + + group('RestoreAction', () { + testWidgets('restores the eligible owned trashed assets', (tester) async { + final asset = owned(); + + await pumpRestore(tester, {asset}); + + verify(() => assetService.restoreTrash([asset.id])).called(1); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(deletedAt: DateTime(2020)); + + await pumpRestore(tester, {mine, theirs}); + + verify(() => assetService.restoreTrash([mine.id])).called(1); + }); + + testWidgets('skips owned assets that are not trashed', (tester) async { + final trashed = owned(); + final live = owned(trashed: false); + + await pumpRestore(tester, {trashed, live}); + + verify(() => assetService.restoreTrash([trashed.id])).called(1); + }); + + testWidgets('clears the selection once the restore succeeds', (tester) async { + await pumpRestore(tester, {owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden when no owned asset is trashed', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: RestoreAction(source: .timeline)), + overrides: context.selected({owned(trashed: false)}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} From 208b7cf9cac5826ad02d56539d86cd37de7f71cc Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:40 +0530 Subject: [PATCH 44/69] feat: stack action (#29370) refactor: mobile stack action Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../presentation/actions/favorite.action.dart | 2 +- .../presentation/actions/stack.action.dart | 72 ++++++++++++++ .../stack_action_button.widget.dart | 50 ---------- .../unstack_action_button.widget.dart | 48 ---------- .../archive_bottom_sheet.widget.dart | 6 +- .../favorite_bottom_sheet.widget.dart | 6 +- .../general_bottom_sheet.widget.dart | 6 +- .../remote_album_bottom_sheet.widget.dart | 6 +- .../infrastructure/action.provider.dart | 48 ---------- .../timeline/multiselect.provider.dart | 2 - mobile/lib/services/action.service.dart | 10 -- mobile/lib/utils/action_button.utils.dart | 4 +- .../actions/stack_action_test.dart | 94 +++++++++++++++++++ 13 files changed, 177 insertions(+), 177 deletions(-) create mode 100644 mobile/lib/presentation/actions/stack.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart create mode 100644 mobile/test/unit/presentation/actions/stack_action_test.dart diff --git a/mobile/lib/presentation/actions/favorite.action.dart b/mobile/lib/presentation/actions/favorite.action.dart index 9b7568610c..17c841b745 100644 --- a/mobile/lib/presentation/actions/favorite.action.dart +++ b/mobile/lib/presentation/actions/favorite.action.dart @@ -43,7 +43,7 @@ class FavoriteAction extends AssetActionBuilder { return; } - final _State(:shouldFavorite, :assetIds) = state; + final (:shouldFavorite, :assetIds) = state; final message = shouldFavorite ? context.t.favorite_action_prompt(count: assetIds.length) : context.t.unfavorite_action_prompt(count: assetIds.length); diff --git a/mobile/lib/presentation/actions/stack.action.dart b/mobile/lib/presentation/actions/stack.action.dart new file mode 100644 index 0000000000..9697dc02be --- /dev/null +++ b/mobile/lib/presentation/actions/stack.action.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +typedef _State = ({bool shouldStack, List assetIds, List stackIds}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + final shouldStack = assets.stacked(isStacked: false).isNotEmpty; + // Stacking needs at least two assets; unstacking needs at least one stack. + if (shouldStack ? assets.elementAtOrNull(1) == null : assets.isEmpty) { + return null; + } + + return ( + shouldStack: shouldStack, + assetIds: assets.map((asset) => asset.id).toList(growable: false), + stackIds: assets.map((asset) => asset.stackId).nonNulls.toList(growable: false), + ); +}); + +class StackAction extends AssetActionBuilder { + const StackAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final shouldStack = ref.watch(_stateProvider(source).select((state) => state?.shouldStack)); + if (shouldStack == null) { + return null; + } + + return .new( + icon: shouldStack ? Icons.filter_none_rounded : Icons.layers_clear_outlined, + label: shouldStack ? context.t.stack : context.t.unstack, + onAction: () => _stack(context, ref), + ); + } + + Future _stack(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:shouldStack, :assetIds, :stackIds) = state; + final message = shouldStack + ? context.t.stacked_assets_count(count: assetIds.length) + : context.t.unstacked_assets_count(count: assetIds.length); + final assetService = ref.read(assetServiceProvider); + final userId = ref.read(authUserProvider).id; + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + if (shouldStack) { + await assetService.stack(userId, assetIds); + } else { + await assetService.unstack(stackIds); + } + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the stack for assets"); + } + } +} diff --git a/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart deleted file mode 100644 index 026268fe52..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/stack_action_button.widget.dart +++ /dev/null @@ -1,50 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class StackActionButton extends ConsumerWidget { - final ActionSource source; - - const StackActionButton({super.key, required this.source}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final user = ref.watch(currentUserProvider); - if (user == null) { - throw Exception('User must be logged in to access stack action'); - } - - final result = await ref.read(actionProvider.notifier).stack(user.id, source); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'stack_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.filter_none_rounded, - label: "stack".t(context: context), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart deleted file mode 100644 index 47cdfe9b5f..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/unstack_action_button.widget.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class UnStackActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const UnStackActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).unStack(source); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'unstack_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.layers_clear_outlined, - label: "unstack".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index 85fa8b4563..7c3f72756c 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -5,6 +5,7 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; @@ -13,10 +14,8 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_ import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/stack_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/unarchive_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -93,8 +92,7 @@ class _ArchiveBottomSheetState extends ConsumerState { const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), const MoveToLockFolderActionButton(source: ActionSource.timeline), - if (multiselect.selectedAssets.length > 1) const StackActionButton(source: ActionSource.timeline), - if (multiselect.hasStacked) const UnStackActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: StackAction(source: .timeline)), ], if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), ], diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index 6447c5ccf8..334d3a4309 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -6,6 +6,7 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; @@ -15,9 +16,7 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_ import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/stack_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; @@ -93,8 +92,7 @@ class FavoriteBottomSheet extends ConsumerWidget { const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), const MoveToLockFolderActionButton(source: ActionSource.timeline), - if (multiselect.selectedAssets.length > 1) const StackActionButton(source: ActionSource.timeline), - if (multiselect.hasStacked) const UnStackActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: StackAction(source: .timeline)), ], if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), ], diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index 2f1ffe4cbc..a35223137a 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -5,6 +5,7 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; @@ -16,9 +17,7 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_ import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/stack_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; @@ -102,8 +101,7 @@ class _GeneralBottomSheetState extends ConsumerState { const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), const MoveToLockFolderActionButton(source: ActionSource.timeline), - if (multiselect.selectedAssets.length > 1) const StackActionButton(source: ActionSource.timeline), - if (multiselect.hasStacked) const UnStackActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: StackAction(source: .timeline)), if (multiselect.onlyLocal || multiselect.hasMerged) const DeleteActionButton(source: ActionSource.timeline), ], if (multiselect.onlyLocal || multiselect.hasMerged) diff --git a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart index f6cbc5eac9..608a864101 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart @@ -5,6 +5,7 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; @@ -16,9 +17,7 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_al import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/stack_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -107,8 +106,7 @@ class _RemoteAlbumBottomSheetState extends ConsumerState const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), const MoveToLockFolderActionButton(source: ActionSource.timeline), - if (multiselect.selectedAssets.length > 1) const StackActionButton(source: ActionSource.timeline), - if (multiselect.hasStacked) const UnStackActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: StackAction(source: .timeline)), ], ], if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index 2958d761c0..11eda6d3de 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -7,12 +7,10 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/asset_edit.model.dart'; -import 'package:immich_mobile/domain/services/asset.service.dart'; import 'package:immich_mobile/domain/services/remote_album.service.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset_viewer/asset.provider.dart' show assetExifProvider; import 'package:immich_mobile/providers/infrastructure/tag.provider.dart'; import 'package:immich_mobile/providers/server_info.provider.dart'; @@ -53,7 +51,6 @@ class ActionNotifier extends Notifier { final Logger _logger = Logger('ActionNotifier'); late ActionService _service; late ForegroundUploadService _foregroundUploadService; - late AssetService _assetService; ActionNotifier() : super(); @@ -61,7 +58,6 @@ class ActionNotifier extends Notifier { void build() { _foregroundUploadService = ref.watch(foregroundUploadServiceProvider); _service = ref.watch(actionServiceProvider); - _assetService = ref.watch(assetServiceProvider); } List _getRemoteIdsForSource(ActionSource source) { @@ -91,21 +87,6 @@ class ActionNotifier extends Notifier { return _getAssets(source).whereType().ownedAssets(ownerId).toIds().toList(growable: false); } - List _getOwnedRemoteAssetsForSource(ActionSource source) { - final ownerId = ref.read(currentUserProvider)?.id; - return _getIdsForSource(source).ownedAssets(ownerId).toList(); - } - - Iterable _getIdsForSource(ActionSource source) { - final Set assets = _getAssets(source); - return switch (T) { - const (RemoteAsset) => assets.whereType(), - const (LocalAsset) => assets.whereType(), - _ => const [], - } - as Iterable; - } - Set _getAssets(ActionSource source) { return switch (source) { ActionSource.timeline => ref.read(multiSelectProvider).selectedAssets, @@ -438,35 +419,6 @@ class ActionNotifier extends Notifier { } } - Future stack(String userId, ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.stack(userId, ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to stack assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future unStack(ActionSource source) async { - final assets = _getOwnedRemoteAssetsForSource(source); - try { - await _service.unStack(assets.map((e) => e.stackId).nonNulls.toList()); - if (source == ActionSource.viewer) { - final updatedParent = await _assetService.getRemoteAsset(assets.first.id); - if (updatedParent != null) { - ref.read(assetViewerProvider.notifier).setAsset(updatedParent); - } - } - - return ActionResult(count: assets.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to unstack assets', error, stack); - return ActionResult(count: assets.length, success: false); - } - } - Future shareAssets( ActionSource source, BuildContext context, { diff --git a/mobile/lib/providers/timeline/multiselect.provider.dart b/mobile/lib/providers/timeline/multiselect.provider.dart index cb053e0041..64edd4cd3f 100644 --- a/mobile/lib/providers/timeline/multiselect.provider.dart +++ b/mobile/lib/providers/timeline/multiselect.provider.dart @@ -22,8 +22,6 @@ class MultiSelectState { bool get hasRemote => selectedAssets.any((asset) => asset.storage == AssetState.remote || asset.storage == AssetState.merged); - bool get hasStacked => selectedAssets.any((asset) => asset is RemoteAsset && asset.stackId != null); - bool get hasMerged => selectedAssets.any((asset) => asset.storage == AssetState.merged); bool get onlyLocal => selectedAssets.any((asset) => asset.storage == AssetState.local); diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index b1219383f5..ad4f3098b8 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -261,16 +261,6 @@ class ActionService { return _tagService.bulkTagAssets(remoteIds, selectedTagIds.toList()); } - Future stack(String userId, List remoteIds) async { - final stack = await _assetApiRepository.stack(remoteIds); - await _remoteAssetRepository.stack(userId, stack); - } - - Future unStack(List stackIds) async { - await _remoteAssetRepository.unStack(stackIds); - await _assetApiRepository.unStack(stackIds); - } - Future shareAssets( List assets, BuildContext context, { diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index a838333475..8b51a5ea6a 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -10,6 +10,7 @@ import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/cast_action_button.widget.dart'; @@ -30,7 +31,6 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/similar_photos import 'package:immich_mobile/presentation/widgets/action_buttons/slideshow_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/unarchive_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unstack_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -244,7 +244,7 @@ enum ActionButtonType { menuItem: menuItem, ), ActionButtonType.likeActivity => LikeActivityActionButton(iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.unstack => UnStackActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), + ActionButtonType.unstack => ActionMenuItem(action: StackAction(source: context.source)), ActionButtonType.openInBrowser => OpenInBrowserActionButton( remoteId: context.asset.remoteId!, origin: context.timelineOrigin, diff --git a/mobile/test/unit/presentation/actions/stack_action_test.dart b/mobile/test/unit/presentation/actions/stack_action_test.dart new file mode 100644 index 0000000000..fdaf83886c --- /dev/null +++ b/mobile/test/unit/presentation/actions/stack_action_test.dart @@ -0,0 +1,94 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/stack.action.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() { + context.dispose(); + }); + + RemoteAsset owned({String? stackId}) => RemoteAssetFactory.create(ownerId: context.currentUser.id, stackId: stackId); + + Future pumpStack(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const StackAction(source: .timeline), overrides: context.selected(selection)); + + group('StackAction', () { + testWidgets('stacks the eligible owned assets', (tester) async { + final first = owned(); + final second = owned(); + + await pumpStack(tester, {first, second}); + + verify(() => assetService.stack(context.currentUser.id, [first.id, second.id])).called(1); + }); + + testWidgets('unstacks the eligible owned assets', (tester) async { + final asset = owned(stackId: 'stack'); + + await pumpStack(tester, {asset}); + + verify(() => assetService.unstack(['stack'])).called(1); + }); + + testWidgets('prioritizes stack when mixed state', (tester) async { + final first = owned(); + final second = owned(stackId: 'stack'); + + await pumpStack(tester, {first, second}); + + verify(() => assetService.stack(context.currentUser.id, [first.id, second.id])).called(1); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final other = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpStack(tester, {mine, other, theirs}); + + verify(() => assetService.stack(context.currentUser.id, [mine.id, other.id])).called(1); + }); + + testWidgets('clears the selection once the stack succeeds', (tester) async { + await pumpStack(tester, {owned(), owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden when a unstacked asset has nothing to stack onto', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: StackAction(source: .timeline)), + overrides: context.selected({owned()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden when none of the selected assets are owned', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: StackAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create(), RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} From e6b5b0deb6a4fbcaac47e1203dfab142e38c7e99 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:40 +0530 Subject: [PATCH 45/69] feat: archive action (#29362) refactor: mobile archive action Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../presentation/actions/archive.action.dart | 66 ++++++++++ .../add_action_button.widget.dart | 36 ++---- .../archive_action_button.widget.dart | 60 --------- .../unarchive_action_button.widget.dart | 62 --------- .../archive_bottom_sheet.widget.dart | 4 +- .../favorite_bottom_sheet.widget.dart | 4 +- .../general_bottom_sheet.widget.dart | 4 +- .../remote_album_bottom_sheet.widget.dart | 4 +- .../infrastructure/action.provider.dart | 22 ---- mobile/lib/services/action.service.dart | 10 -- mobile/lib/utils/action_button.utils.dart | 11 +- .../actions/archive_action_test.dart | 118 ++++++++++++++++++ .../actions/restore_action_test.dart | 4 +- 13 files changed, 204 insertions(+), 201 deletions(-) create mode 100644 mobile/lib/presentation/actions/archive.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart create mode 100644 mobile/test/unit/presentation/actions/archive_action_test.dart diff --git a/mobile/lib/presentation/actions/archive.action.dart b/mobile/lib/presentation/actions/archive.action.dart new file mode 100644 index 0000000000..f04611c4c0 --- /dev/null +++ b/mobile/lib/presentation/actions/archive.action.dart @@ -0,0 +1,66 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/routes.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +typedef _State = ({bool shouldArchive, List assetIds}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + if (ref.watch(inLockedViewProvider)) { + return null; + } + + final assets = ref.watch(ownedAssetsActionProvider(source)); + final shouldArchive = assets.notVisibility(.archive).isNotEmpty; + final assetIds = assets + .visibility(shouldArchive ? .timeline : .archive) + .map((asset) => asset.id) + .toList(growable: false); + return assetIds.isEmpty ? null : (shouldArchive: shouldArchive, assetIds: assetIds); +}); + +class ArchiveAction extends AssetActionBuilder { + const ArchiveAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final shouldArchive = ref.watch(_stateProvider(source).select((state) => state?.shouldArchive)); + if (shouldArchive == null) { + return null; + } + + return .new( + icon: shouldArchive ? Icons.archive_outlined : Icons.unarchive_outlined, + label: shouldArchive ? context.t.archive : context.t.unarchive, + onAction: () => _archive(context, ref), + ); + } + + Future _archive(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:shouldArchive, :assetIds) = state; + final message = shouldArchive + ? context.t.archive_action_prompt(count: assetIds.length) + : context.t.unarchive_action_prompt(count: assetIds.length); + final assetService = ref.read(assetServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + await assetService.update(assetIds, visibility: .some(shouldArchive ? .archive : .timeline)); + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the archive status for assets"); + } + } +} diff --git a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart index 533bc72971..ea211797cf 100644 --- a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart @@ -8,20 +8,20 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unarchive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; -import 'package:immich_mobile/providers/routes.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; +import 'package:immich_ui/immich_ui.dart'; -enum AddToMenuItem { album, archive, unarchive, lockedFolder } +enum AddToMenuItem { album, lockedFolder } class AddActionButton extends ConsumerStatefulWidget { const AddActionButton({super.key, this.originalTheme}); @@ -37,10 +37,6 @@ class _AddActionButtonState extends ConsumerState { switch (selected) { case AddToMenuItem.album: _openAlbumSelector(); - case AddToMenuItem.archive: - unawaited(performArchiveAction(context, ref, source: ActionSource.viewer)); - case AddToMenuItem.unarchive: - unawaited(performUnArchiveAction(context, ref, source: ActionSource.viewer)); case AddToMenuItem.lockedFolder: unawaited(performMoveToLockFolderAction(context, ref, source: ActionSource.viewer)); } @@ -54,11 +50,6 @@ class _AddActionButtonState extends ConsumerState { final user = ref.read(currentUserProvider); final isOwner = asset is RemoteAsset && asset.ownerId == user?.id; - final isInLockedView = ref.watch(inLockedViewProvider); - final isArchived = asset is RemoteAsset && asset.visibility == AssetVisibility.archive; - final hasRemote = asset is RemoteAsset; - final showArchive = isOwner && !isInLockedView && hasRemote && !isArchived; - final showUnarchive = isOwner && !isInLockedView && hasRemote && isArchived; return [ Padding( @@ -78,20 +69,7 @@ class _AddActionButtonState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), child: Text("move_to".tr(), style: context.textTheme.labelMedium), ), - if (showArchive) - BaseActionButton( - iconData: Icons.archive_outlined, - label: "archive".tr(), - menuItem: true, - onPressed: () => _handleMenuSelection(AddToMenuItem.archive), - ), - if (showUnarchive) - BaseActionButton( - iconData: Icons.unarchive_outlined, - label: "unarchive".tr(), - menuItem: true, - onPressed: () => _handleMenuSelection(AddToMenuItem.unarchive), - ), + const ActionMenuItem(action: ArchiveAction(source: .viewer)), BaseActionButton( iconData: Icons.lock_outline, label: "locked_folder".tr(), @@ -190,7 +168,7 @@ class _AddActionButtonState extends ConsumerState { final themeData = widget.originalTheme ?? context.themeData; - return MenuAnchor( + return ImmichMenu( consumeOutsideTap: true, style: MenuStyle( backgroundColor: WidgetStatePropertyAll(themeData.scaffoldBackgroundColor), @@ -201,7 +179,7 @@ class _AddActionButtonState extends ConsumerState { ), padding: const WidgetStatePropertyAll(EdgeInsets.symmetric(vertical: 6)), ), - menuChildren: widget.originalTheme != null + children: widget.originalTheme != null ? [ Theme( data: widget.originalTheme!, diff --git a/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart deleted file mode 100644 index 3322dd3a85..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart +++ /dev/null @@ -1,60 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -// used to allow performing archive action from different sources (without duplicating code) -Future performArchiveAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).archive(source); - ref.read(multiSelectProvider.notifier).reset(); - - if (!context.mounted) { - return; - } - - final successMessage = 'archive_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); -} - -class ArchiveActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const ArchiveActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - await performArchiveAction(context, ref, source: source); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.archive_outlined, - label: "to_archive".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart deleted file mode 100644 index 552608f83f..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart +++ /dev/null @@ -1,62 +0,0 @@ -// dart -// File: `lib/presentation/widgets/action_buttons/unarchive_action_button.widget.dart` -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -// used to allow performing unarchive action from different sources (without duplicating code) -Future performUnArchiveAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).unArchive(source); - ref.read(multiSelectProvider.notifier).reset(); - - if (!context.mounted) { - return; - } - - final successMessage = 'unarchive_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); -} - -class UnArchiveActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const UnArchiveActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - await performUnArchiveAction(context, ref, source: source); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.unarchive_outlined, - label: "unarchive".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index 7c3f72756c..509853a36e 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -4,6 +4,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; @@ -15,7 +16,6 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_f import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unarchive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -83,7 +83,7 @@ class _ArchiveBottomSheetState extends ConsumerState { const ShareActionButton(source: ActionSource.timeline), if (multiselect.hasRemote) ...[ const ShareLinkActionButton(source: ActionSource.timeline), - const UnArchiveActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ArchiveAction(source: .timeline)), const ActionColumnButton(action: FavoriteAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), isTrashEnable diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index 334d3a4309..fb92a084da 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -5,9 +5,9 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; @@ -84,7 +84,7 @@ class FavoriteBottomSheet extends ConsumerWidget { if (multiselect.hasRemote) ...[ const ShareLinkActionButton(source: ActionSource.timeline), const ActionColumnButton(action: FavoriteAction(source: .timeline)), - const ArchiveActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ArchiveAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), isTrashEnable ? const TrashActionButton(source: ActionSource.timeline) diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index a35223137a..6ffd23bfb1 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -4,9 +4,9 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; @@ -96,7 +96,7 @@ class _GeneralBottomSheetState extends ConsumerState { ? const TrashActionButton(source: ActionSource.timeline) : const DeletePermanentActionButton(source: ActionSource.timeline), const ActionColumnButton(action: FavoriteAction(source: .timeline)), - const ArchiveActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ArchiveAction(source: .timeline)), if (tagsEnabled) const BulkTagAssetsActionButton(source: ActionSource.timeline), const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart index 608a864101..7ffc4f41aa 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart @@ -4,9 +4,9 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; @@ -95,7 +95,7 @@ class _RemoteAlbumBottomSheetState extends ConsumerState const ShareLinkActionButton(source: ActionSource.timeline), if (ownsAlbum) ...[ - const ArchiveActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ArchiveAction(source: .timeline)), const ActionColumnButton(action: FavoriteAction(source: .timeline)), ], const DownloadActionButton(source: ActionSource.timeline), diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index 11eda6d3de..30d815f1e0 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -118,28 +118,6 @@ class ActionNotifier extends Notifier { } } - Future archive(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.archive(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to archive assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future unArchive(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.unArchive(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to unarchive assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future moveToLockFolder(ActionSource source) async { final ids = _getOwnedRemoteIdsForSource(source); final localIds = _getLocalIdsForSource(source, ignoreLocalOnly: true); diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index ad4f3098b8..12e3bd6b93 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -68,16 +68,6 @@ class ActionService { unawaited(context.pushRoute(SharedLinkEditRoute(assetsList: remoteIds))); } - Future archive(List remoteIds) async { - await _assetApiRepository.updateVisibility(remoteIds, .archive); - await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.archive); - } - - Future unArchive(List remoteIds) async { - await _assetApiRepository.updateVisibility(remoteIds, .timeline); - await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.timeline); - } - Future moveToLockFolder(List remoteIds, List localIds) async { await _assetApiRepository.updateVisibility(remoteIds, .locked); await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.locked); diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 8b51a5ea6a..3e70205702 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -8,10 +8,10 @@ import 'package:immich_mobile/domain/models/events.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/archive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/cast_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; @@ -30,7 +30,6 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_act import 'package:immich_mobile/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/slideshow_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/unarchive_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -200,12 +199,8 @@ enum ActionButtonType { menuItem: menuItem, ), ActionButtonType.slideshow => SlideshowActionButton(iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.archive => ArchiveActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.unarchive => UnArchiveActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), + ActionButtonType.archive || + ActionButtonType.unarchive => ActionMenuItem(action: ArchiveAction(source: context.source)), ActionButtonType.download => DownloadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), ActionButtonType.trash => TrashActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), ActionButtonType.restoreTrash => ActionMenuItem(action: RestoreAction(source: context.source)), diff --git a/mobile/test/unit/presentation/actions/archive_action_test.dart b/mobile/test/unit/presentation/actions/archive_action_test.dart new file mode 100644 index 0000000000..82f015903f --- /dev/null +++ b/mobile/test/unit/presentation/actions/archive_action_test.dart @@ -0,0 +1,118 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/providers/routes.provider.dart'; +import 'package:immich_mobile/utils/option.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() { + context.dispose(); + }); + + RemoteAsset owned({AssetVisibility visibility = .timeline}) => + RemoteAssetFactory.create(ownerId: context.currentUser.id, visibility: visibility); + + Future pumpArchive(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const ArchiveAction(source: .timeline), overrides: context.selected(selection)); + + group('ArchiveAction', () { + testWidgets('archives the eligible owned assets', (tester) async { + final asset = owned(); + + await pumpArchive(tester, {asset}); + + verify(() => assetService.update([asset.id], visibility: const Option.some(AssetVisibility.archive))).called(1); + }); + + testWidgets('unarchive the eligible owned assets', (tester) async { + final asset = owned(visibility: .archive); + + await pumpArchive(tester, {asset}); + + verify(() => assetService.update([asset.id], visibility: const .some(.timeline))).called(1); + }); + + testWidgets('prioritizes archive when mixed state', (tester) async { + final onTimeline = owned(); + final archived = owned(visibility: .archive); + + await pumpArchive(tester, {onTimeline, archived}); + + verify(() => assetService.update([onTimeline.id], visibility: const .some(.archive))).called(1); + verifyNever(() => assetService.update(any(), visibility: const .some(.timeline))); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpArchive(tester, {mine, theirs}); + + verify(() => assetService.update([mine.id], visibility: const .some(.archive))).called(1); + }); + + testWidgets('skips owned assets already in the target state', (tester) async { + final stale = owned(); + final alreadyArchived = owned(visibility: .archive); + + await pumpArchive(tester, {stale, alreadyArchived}); + + verify(() => assetService.update([stale.id], visibility: const .some(.archive))).called(1); + }); + + testWidgets('clears the selection once the update succeeds', (tester) async { + await pumpArchive(tester, {owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden for locked assets, which belong to neither direction', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ArchiveAction(source: .timeline)), + overrides: context.selected({owned(visibility: .locked)}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden inside the locked folder view', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ArchiveAction(source: .timeline)), + overrides: [ + ...context.selected({owned()}), + inLockedViewProvider.overrideWithValue(true), + ], + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden when none of the selected assets are owned', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ArchiveAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/actions/restore_action_test.dart b/mobile/test/unit/presentation/actions/restore_action_test.dart index d7992850e5..4597e7ccb0 100644 --- a/mobile/test/unit/presentation/actions/restore_action_test.dart +++ b/mobile/test/unit/presentation/actions/restore_action_test.dart @@ -23,7 +23,7 @@ void main() { }); RemoteAsset owned({bool trashed = true}) => - RemoteAssetFactory.create(ownerId: context.currentUser.id, deletedAt: trashed ? DateTime(2020) : null); + RemoteAssetFactory.create(ownerId: context.currentUser.id, deletedAt: trashed ? .new(2020) : null); Future pumpRestore(WidgetTester tester, Set selection) => tester.pumpTestAction(context, const RestoreAction(source: .timeline), overrides: context.selected(selection)); @@ -39,7 +39,7 @@ void main() { testWidgets('ignores assets owned by someone else', (tester) async { final mine = owned(); - final theirs = RemoteAssetFactory.create(deletedAt: DateTime(2020)); + final theirs = RemoteAssetFactory.create(deletedAt: .new(2020)); await pumpRestore(tester, {mine, theirs}); From 47d34e3b4b17e34f4e4e5c0d2d29f9e15d2f16a9 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:41 +0530 Subject: [PATCH 46/69] refactor: mobile lock action (#29767) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- mobile/lib/domain/services/asset.service.dart | 28 ++++- .../lib/presentation/actions/lock.action.dart | 71 +++++++++++ .../add_action_button.widget.dart | 13 +- ...e_to_lock_folder_action_button.widget.dart | 63 ---------- ...from_lock_folder_action_button.widget.dart | 57 --------- .../asset_viewer/bottom_bar.widget.dart | 13 +- .../archive_bottom_sheet.widget.dart | 4 +- .../favorite_bottom_sheet.widget.dart | 4 +- .../general_bottom_sheet.widget.dart | 4 +- .../locked_folder_bottom_sheet.widget.dart | 5 +- .../remote_album_bottom_sheet.widget.dart | 4 +- .../infrastructure/action.provider.dart | 23 ---- .../infrastructure/asset.provider.dart | 3 + mobile/lib/services/action.service.dart | 15 --- mobile/lib/utils/action_button.utils.dart | 15 +-- mobile/test/unit/mocks.dart | 4 + .../actions/lock_action_test.dart | 114 ++++++++++++++++++ .../unit/services/asset_service_test.dart | 2 + 18 files changed, 249 insertions(+), 193 deletions(-) create mode 100644 mobile/lib/presentation/actions/lock.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart create mode 100644 mobile/test/unit/presentation/actions/lock_action_test.dart diff --git a/mobile/lib/domain/services/asset.service.dart b/mobile/lib/domain/services/asset.service.dart index 9cbdf1bdfe..59f41f1e51 100644 --- a/mobile/lib/domain/services/asset.service.dart +++ b/mobile/lib/domain/services/asset.service.dart @@ -2,10 +2,15 @@ import 'package:immich_mobile/domain/models/album/local_album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/asset_edit.model.dart'; import 'package:immich_mobile/domain/models/exif.model.dart'; +import 'package:immich_mobile/domain/models/store.model.dart'; +import 'package:immich_mobile/entities/store.entity.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; import 'package:immich_mobile/infrastructure/repositories/local_asset.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_exif.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; +import 'package:immich_mobile/repositories/asset_media.repository.dart'; import 'package:immich_mobile/utils/option.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; @@ -14,12 +19,16 @@ class AssetService { final RemoteExifRepository _exifRepository; final DriftLocalAssetRepository _localRepository; final AssetApiRepository _apiRepository; + final AssetMediaRepository _mediaRepository; + final DriftTrashedLocalAssetRepository _trashedLocalRepository; const AssetService({ required this._remoteRepository, required this._exifRepository, required this._localRepository, required this._apiRepository, + required this._mediaRepository, + required this._trashedLocalRepository, }); Future getAsset(BaseAsset asset) { @@ -167,7 +176,24 @@ class AssetService { } } - // TODO(shenlong): remove after action migration + Future deleteLocal(List localIds) async { + if (localIds.isEmpty) { + return 0; + } + + final deletedIds = await _mediaRepository.deleteAll(localIds); + if (deletedIds.isEmpty) { + return 0; + } + + if (CurrentPlatform.isAndroid && Store.get(StoreKey.manageLocalMediaAndroid, false)) { + await _trashedLocalRepository.applyTrashedAssets(deletedIds); + } else { + await _localRepository.delete(deletedIds); + } + return deletedIds.length; + } + Future getLocalAsset(String id) { return _localRepository.get(id); } diff --git a/mobile/lib/presentation/actions/lock.action.dart b/mobile/lib/presentation/actions/lock.action.dart new file mode 100644 index 0000000000..b7fd01ad18 --- /dev/null +++ b/mobile/lib/presentation/actions/lock.action.dart @@ -0,0 +1,71 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +typedef _State = ({bool shouldLock, List assetIds, List localIds}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + if (assets.isEmpty) { + return null; + } + + final shouldLock = assets.locked(isLocked: false).isNotEmpty; + final targets = assets.locked(isLocked: !shouldLock); + return ( + shouldLock: shouldLock, + assetIds: targets.map((asset) => asset.id).toList(growable: false), + // Only locking has an on-device copy to clean up; unlocking leaves the device alone. + localIds: shouldLock ? targets.map((asset) => asset.localId).nonNulls.toList(growable: false) : const [], + ); +}); + +class LockAction extends AssetActionBuilder { + const LockAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final shouldLock = ref.watch(_stateProvider(source).select((state) => state?.shouldLock)); + if (shouldLock == null) { + return null; + } + + return .new( + icon: shouldLock ? Icons.lock_rounded : Icons.lock_open_rounded, + label: shouldLock ? context.t.move_to_locked_folder : context.t.remove_from_locked_folder, + onAction: () => _lock(context, ref), + ); + } + + Future _lock(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:shouldLock, :assetIds, :localIds) = state; + final message = shouldLock + ? context.t.move_to_lock_folder_action_prompt(count: assetIds.length) + : context.t.remove_from_lock_folder_action_prompt(count: assetIds.length); + final assetService = ref.read(assetServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + await assetService.update(assetIds, visibility: .some(shouldLock ? .locked : .timeline)); + if (localIds.isNotEmpty) { + // A locked asset still sits in the device gallery, so offer to remove the local copy. + await assetService.deleteLocal(localIds); + } + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the locked folder for assets"); + } + } +} diff --git a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart index ea211797cf..cfb5887c7c 100644 --- a/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/add_action_button.widget.dart @@ -10,8 +10,8 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; @@ -21,7 +21,7 @@ import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; import 'package:immich_ui/immich_ui.dart'; -enum AddToMenuItem { album, lockedFolder } +enum AddToMenuItem { album } class AddActionButton extends ConsumerStatefulWidget { const AddActionButton({super.key, this.originalTheme}); @@ -37,8 +37,6 @@ class _AddActionButtonState extends ConsumerState { switch (selected) { case AddToMenuItem.album: _openAlbumSelector(); - case AddToMenuItem.lockedFolder: - unawaited(performMoveToLockFolderAction(context, ref, source: ActionSource.viewer)); } } @@ -70,12 +68,7 @@ class _AddActionButtonState extends ConsumerState { child: Text("move_to".tr(), style: context.textTheme.labelMedium), ), const ActionMenuItem(action: ArchiveAction(source: .viewer)), - BaseActionButton( - iconData: Icons.lock_outline, - label: "locked_folder".tr(), - menuItem: true, - onPressed: () => _handleMenuSelection(AddToMenuItem.lockedFolder), - ), + const ActionMenuItem(action: LockAction(source: .viewer)), ], ]; } diff --git a/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart deleted file mode 100644 index 6d5f5b387a..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -// Reusable helper: move to locked folder from any source (e.g called from menu) -Future performMoveToLockFolderAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).moveToLockFolder(source); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'move_to_lock_folder_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); -} - -class MoveToLockFolderActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const MoveToLockFolderActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - await performMoveToLockFolderAction(context, ref, source: source); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 115.0, - iconData: Icons.lock_outline_rounded, - label: "move_to_locked_folder".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart deleted file mode 100644 index ea0d9f384f..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart +++ /dev/null @@ -1,57 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class RemoveFromLockFolderActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const RemoveFromLockFolderActionButton({ - super.key, - required this.source, - this.iconOnly = false, - this.menuItem = false, - }); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).removeFromLockFolder(source); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'remove_from_lock_folder_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 100.0, - iconData: Icons.lock_open_rounded, - label: "remove_from_locked_folder".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart index 14aa768626..2819d2502d 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart @@ -4,7 +4,7 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/add_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; @@ -22,6 +22,15 @@ import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/utils/semver.dart'; import 'package:immich_mobile/widgets/asset_viewer/video_controls.dart'; +import 'package:immich_ui/immich_ui.dart'; + +// Resolved here rather than as an ActionColumnButton so a hidden restore +// takes no slot in the spaceEvenly row below. +List _actionColumnButtons(BuildContext context, WidgetRef ref, List actions) => actions + .map((a) => a.create(context, ref)) + .nonNulls + .map((item) => ImmichColumnButton(icon: item.icon, label: item.label, onPressed: item.onAction)) + .toList(growable: false); class ViewerBottomBar extends ConsumerWidget { const ViewerBottomBar({super.key}); @@ -44,7 +53,7 @@ class ViewerBottomBar extends ConsumerWidget { final originalTheme = context.themeData; final actions = [ - const ActionColumnButton(action: RestoreAction(source: .viewer)), + ..._actionColumnButtons(context, ref, const [RestoreAction(source: .viewer)]), const ShareActionButton(source: .viewer), if (!isInLockedView) ...[ diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index 509853a36e..5b041452c0 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -6,13 +6,13 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; @@ -91,7 +91,7 @@ class _ArchiveBottomSheetState extends ConsumerState { : const DeletePermanentActionButton(source: ActionSource.timeline), const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), - const MoveToLockFolderActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index fb92a084da..7ae0fb6055 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -7,13 +7,13 @@ import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; @@ -91,7 +91,7 @@ class FavoriteBottomSheet extends ConsumerWidget { : const DeletePermanentActionButton(source: ActionSource.timeline), const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), - const MoveToLockFolderActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index 6ffd23bfb1..40e75adf86 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -6,6 +6,7 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; @@ -14,7 +15,6 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permane import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; @@ -100,7 +100,7 @@ class _GeneralBottomSheetState extends ConsumerState { if (tagsEnabled) const BulkTagAssetsActionButton(source: ActionSource.timeline), const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), - const MoveToLockFolderActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), if (multiselect.onlyLocal || multiselect.hasMerged) const DeleteActionButton(source: ActionSource.timeline), ], diff --git a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart index a644e6a035..9b4fef1a13 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart @@ -1,9 +1,10 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; @@ -20,7 +21,7 @@ class LockedFolderBottomSheet extends ConsumerWidget { ShareActionButton(source: ActionSource.timeline), DownloadActionButton(source: ActionSource.timeline), DeletePermanentActionButton(source: ActionSource.timeline), - RemoveFromLockFolderActionButton(source: ActionSource.timeline), + ActionColumnButton(action: LockAction(source: .timeline)), ], ); } diff --git a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart index 7ffc4f41aa..ac9b85caa1 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart @@ -6,13 +6,13 @@ import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; @@ -105,7 +105,7 @@ class _RemoteAlbumBottomSheetState extends ConsumerState : const DeletePermanentActionButton(source: ActionSource.timeline), const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), - const MoveToLockFolderActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], ], diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index 30d815f1e0..20826ddd8e 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -118,29 +118,6 @@ class ActionNotifier extends Notifier { } } - Future moveToLockFolder(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - final localIds = _getLocalIdsForSource(source, ignoreLocalOnly: true); - try { - await _service.moveToLockFolder(ids, localIds); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to move assets to lock folder', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future removeFromLockFolder(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - await _service.removeFromLockFolder(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to remove assets from lock folder', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future trash(ActionSource source) async { final ids = _getOwnedRemoteIdsForSource(source); diff --git a/mobile/lib/providers/infrastructure/asset.provider.dart b/mobile/lib/providers/infrastructure/asset.provider.dart index fed55208e4..8ca0ca0ec9 100644 --- a/mobile/lib/providers/infrastructure/asset.provider.dart +++ b/mobile/lib/providers/infrastructure/asset.provider.dart @@ -7,6 +7,7 @@ import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.re import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; +import 'package:immich_mobile/repositories/asset_media.repository.dart'; final localAssetRepository = Provider( (ref) => DriftLocalAssetRepository(ref.watch(driftProvider)), @@ -28,6 +29,8 @@ final assetServiceProvider = Provider( exifRepository: ref.watch(remoteExifRepositoryProvider), localRepository: ref.watch(localAssetRepository), apiRepository: ref.watch(assetApiRepositoryProvider), + mediaRepository: ref.watch(assetMediaRepositoryProvider), + trashedLocalRepository: ref.watch(trashedLocalAssetRepository), ), ); diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index 12e3bd6b93..00b608c8a6 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -68,21 +68,6 @@ class ActionService { unawaited(context.pushRoute(SharedLinkEditRoute(assetsList: remoteIds))); } - Future moveToLockFolder(List remoteIds, List localIds) async { - await _assetApiRepository.updateVisibility(remoteIds, .locked); - await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.locked); - - // Ask user if they want to delete local copies - if (localIds.isNotEmpty) { - await _deleteLocalAssets(localIds); - } - } - - Future removeFromLockFolder(List remoteIds) async { - await _assetApiRepository.updateVisibility(remoteIds, .timeline); - await _remoteAssetRepository.updateVisibility(remoteIds, AssetVisibility.timeline); - } - Future trash(List remoteIds) async { await _assetApiRepository.delete(remoteIds, false); await _remoteAssetRepository.trash(remoteIds); diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 3e70205702..2924907423 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -10,6 +10,7 @@ import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; @@ -19,10 +20,8 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_a import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/move_to_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_lock_folder_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; @@ -210,16 +209,8 @@ enum ActionButtonType { menuItem: menuItem, ), ActionButtonType.delete => DeleteActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.moveToLockFolder => MoveToLockFolderActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.removeFromLockFolder => RemoveFromLockFolderActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), + ActionButtonType.moveToLockFolder || + ActionButtonType.removeFromLockFolder => ActionMenuItem(action: LockAction(source: context.source)), ActionButtonType.deleteLocal => DeleteLocalActionButton( source: context.source, iconOnly: iconOnly, diff --git a/mobile/test/unit/mocks.dart b/mobile/test/unit/mocks.dart index 7dd15eb9a3..31dfb6f862 100644 --- a/mobile/test/unit/mocks.dart +++ b/mobile/test/unit/mocks.dart @@ -167,6 +167,7 @@ class ServiceMocks { when(asset.trash).thenAnswer((_) async {}); when(asset.delete).thenAnswer((_) async {}); when(asset.applyEdits).thenAnswer((_) async {}); + when(asset.deleteLocal).thenAnswer((_) async => 0); } void _stubRemoteAlbumService() { @@ -342,6 +343,9 @@ extension type const AssetServiceStub(MockAssetService service) implements Stub< Future Function() get applyEdits => () => service.applyEdits(any(), any()); + + Future Function() get deleteLocal => + () => service.deleteLocal(any()); } extension type const RemoteAlbumServiceStub(MockRemoteAlbumService service) implements Stub { diff --git a/mobile/test/unit/presentation/actions/lock_action_test.dart b/mobile/test/unit/presentation/actions/lock_action_test.dart new file mode 100644 index 0000000000..f5ffbd73d4 --- /dev/null +++ b/mobile/test/unit/presentation/actions/lock_action_test.dart @@ -0,0 +1,114 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() { + context.dispose(); + }); + + RemoteAsset owned({AssetVisibility visibility = .timeline}) => + RemoteAssetFactory.create(ownerId: context.currentUser.id, visibility: visibility); + + Future pumpLock(WidgetTester tester, Set selection) => + tester.pumpTestAction(context, const LockAction(source: .timeline), overrides: context.selected(selection)); + + group('LockAction', () { + testWidgets('locks the eligible owned assets', (tester) async { + final asset = owned(); + + await pumpLock(tester, {asset}); + + verify(() => assetService.update([asset.id], visibility: const .some(.locked))).called(1); + }); + + testWidgets('unlocks the eligible owned assets', (tester) async { + final asset = owned(visibility: .locked); + + await pumpLock(tester, {asset}); + + verify(() => assetService.update([asset.id], visibility: const .some(.timeline))).called(1); + }); + + testWidgets('prioritizes lock when mixed state', (tester) async { + final unlocked = owned(); + final locked = owned(visibility: .locked); + + await pumpLock(tester, {unlocked, locked}); + + verify(() => assetService.update([unlocked.id], visibility: const .some(.locked))).called(1); + verifyNever(() => assetService.update(any(), visibility: const .some(.timeline))); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpLock(tester, {mine, theirs}); + + verify(() => assetService.update([mine.id], visibility: const .some(.locked))).called(1); + }); + + testWidgets('locks only the owned assets not already locked', (tester) async { + final stale = owned(); + final alreadyLocked = owned(visibility: .locked); + + await pumpLock(tester, {stale, alreadyLocked}); + + verify(() => assetService.update([stale.id], visibility: const .some(.locked))).called(1); + }); + + testWidgets('removes the local copies of the assets it locks', (tester) async { + final merged = RemoteAssetFactory.create(ownerId: context.currentUser.id, localId: 'local-1'); + final remoteOnly = owned(); + + await pumpLock(tester, {merged, remoteOnly}); + + verify(() => assetService.deleteLocal(['local-1'])).called(1); + }); + + testWidgets('leaves the local copies alone when unlocking', (tester) async { + final merged = RemoteAssetFactory.create( + ownerId: context.currentUser.id, + localId: 'local-1', + visibility: .locked, + ); + + await pumpLock(tester, {merged}); + + verifyNever(() => assetService.deleteLocal(any())); + }); + + testWidgets('clears the selection once the update succeeds', (tester) async { + await pumpLock(tester, {owned()}); + await tester.pumpAndSettle(); + + expect(find.byType(ImmichIconButton), findsNothing, reason: 'an empty selection hides the action'); + }); + + testWidgets('is hidden when none of the selected assets are owned', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: LockAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/services/asset_service_test.dart b/mobile/test/unit/services/asset_service_test.dart index 5e473d8f66..a09465701b 100644 --- a/mobile/test/unit/services/asset_service_test.dart +++ b/mobile/test/unit/services/asset_service_test.dart @@ -24,6 +24,8 @@ void main() { exifRepository: exifRepository, localRepository: MockDriftLocalAssetRepository(), apiRepository: apiRepository, + mediaRepository: mocks.assetMedia.api, + trashedLocalRepository: mocks.trashedAsset, ); }); From 3f3bc44258c9b39ddaab59343a9430a15f227cd0 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:41 +0530 Subject: [PATCH 47/69] refactor: mobile delete action (#29771) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../presentation/actions/delete.action.dart | 229 ++++++++++++++++ .../delete_action_button.widget.dart | 100 ------- .../delete_local_action_button.widget.dart | 69 ----- ...delete_permanent_action_button.widget.dart | 80 ------ .../delete_trash_action_button.widget.dart | 67 ----- .../trash_action_button.widget.dart | 58 ---- .../asset_viewer/bottom_bar.widget.dart | 17 +- .../archive_bottom_sheet.widget.dart | 12 +- .../favorite_bottom_sheet.widget.dart | 12 +- .../general_bottom_sheet.widget.dart | 15 +- .../local_album_bottom_sheet.widget.dart | 6 +- .../locked_folder_bottom_sheet.widget.dart | 4 +- .../remote_album_bottom_sheet.widget.dart | 12 +- .../trash_bottom_sheet.widget.dart | 5 +- .../infrastructure/action.provider.dart | 85 ------ mobile/lib/services/action.service.dart | 51 ---- mobile/lib/utils/action_button.utils.dart | 41 +-- mobile/test/services/action.service_test.dart | 53 ---- .../actions/delete_action_test.dart | 257 ++++++++++++++++++ .../presentation/presentation_context.dart | 2 + .../action_button_utils_test.dart | 112 +------- 21 files changed, 517 insertions(+), 770 deletions(-) create mode 100644 mobile/lib/presentation/actions/delete.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart create mode 100644 mobile/test/unit/presentation/actions/delete_action_test.dart diff --git a/mobile/lib/presentation/actions/delete.action.dart b/mobile/lib/presentation/actions/delete.action.dart new file mode 100644 index 0000000000..0fe297bd03 --- /dev/null +++ b/mobile/lib/presentation/actions/delete.action.dart @@ -0,0 +1,229 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/store.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/services/cleanup.service.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_mobile/widgets/common/confirm_dialog.dart'; + +typedef _State = ({List localIds, List remoteIds, bool trash}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final authUserId = ref.watch(authUserProvider).id; + + final localIds = []; + final ownedRemote = []; + for (final asset in assets) { + if (asset.localId case final localId?) { + localIds.add(localId); + } + if (asset case final RemoteAsset remote when remote.ownerId == authUserId) { + ownedRemote.add(remote); + } + } + + if (localIds.isEmpty && ownedRemote.isEmpty) { + return null; + } + + final trashEnabled = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); + // Assets already in the trash or in the locked folder are deleted outright, irrespective of the server setting. + final trash = trashEnabled && !ownedRemote.every((asset) => asset.isTrashed || asset.isLocked); + + return (localIds: localIds, remoteIds: ownedRemote.map((asset) => asset.id).toList(growable: false), trash: trash); +}); + +class DeleteAction extends AssetActionBuilder { + const DeleteAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final trash = ref.watch(_stateProvider(source).select((state) => state?.trash)); + if (trash == null) { + return null; + } + + return .new( + icon: Icons.delete_outline, + label: trash ? context.t.trash : context.t.delete, + onAction: () => _delete(context, ref), + ); + } + + Future _delete(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:localIds, :remoteIds, :trash) = state; + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + final String? message; + if (remoteIds.isEmpty) { + message = await _removeLocalAssets(context, ref, localIds); + } else if (trash) { + message = await _moveToTrash(context, ref, remoteIds, localIds); + } else { + message = await _deletePermanently(context, ref, remoteIds, localIds); + } + + if (message == null) { + return; + } + + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to delete assets"); + } + } + + Future _removeLocalAssets(BuildContext context, WidgetRef ref, List localIds) async { + final count = await _cleanupLocalAssets(context, ref, localIds); + if (count <= 0 || !context.mounted) { + return null; + } + + return context.t.cleanup_deleted_assets(count: count); + } + + Future _moveToTrash( + BuildContext context, + WidgetRef ref, + List remoteIds, + List localIds, + ) async { + final assetService = ref.read(assetServiceProvider); + if (localIds.isNotEmpty) { + await _cleanupLocalAssets(context, ref, localIds); + if (!context.mounted) { + return null; + } + } + + final message = context.t.trash_action_prompt(count: remoteIds.length); + await assetService.trash(remoteIds); + return message; + } + + Future _deletePermanently( + BuildContext context, + WidgetRef ref, + List remoteIds, + List localIds, + ) async { + final assetService = ref.read(assetServiceProvider); + final confirmed = await showDialog( + context: context, + builder: (_) => + const ConfirmDialog(title: 'delete_dialog_title', content: 'delete_dialog_alert', ok: 'delete_permanently'), + ); + if (confirmed != true || !context.mounted) { + return null; + } + + final message = context.t.delete_permanently_action_prompt(count: remoteIds.length); + // Server first, so a failed request will not remove the local copy + await assetService.delete(remoteIds); + if (localIds.isNotEmpty && context.mounted) { + await _cleanupLocalAssets(context, ref, localIds, requestCustomPrompt: false); + } + + return message; + } +} + +final _cleanupStateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final assetIds = assets.backedUp().map((asset) => asset.localId).nonNulls.toList(growable: false); + return assetIds.isEmpty ? null : assetIds; +}); + +class CleanupLocalAction extends AssetActionBuilder { + const CleanupLocalAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final isVisible = ref.watch(_cleanupStateProvider(source).select((state) => state != null)); + if (!isVisible) { + return null; + } + + return .new( + icon: Icons.no_cell_outlined, + label: context.t.control_bottom_app_bar_delete_from_local, + onAction: () => _cleanup(context, ref), + ); + } + + Future _cleanup(BuildContext context, WidgetRef ref) async { + final assetIds = ref.read(_cleanupStateProvider(source)); + if (assetIds == null) { + return; + } + + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + final count = await _cleanupLocalAssets(context, ref, assetIds); + if (count <= 0 || !context.mounted) { + return; + } + + toastService.success(context.t.cleanup_deleted_assets(count: count)); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to remove the device copies"); + } + } +} + +/// Removes the device copies of [assetIds], returning how many were deleted. +/// +/// iOS and Android without MANAGE_MEDIA prompt the user +/// with MANAGE_MEDIA, we do it ourselves unless [requestCustomPrompt] is false. +Future _cleanupLocalAssets( + BuildContext context, + WidgetRef ref, + List assetIds, { + bool requestCustomPrompt = true, +}) async { + if (assetIds.isEmpty) { + return 0; + } + + final cleanupService = ref.read(cleanupServiceProvider); + final requiresPrompt = + requestCustomPrompt && + CurrentPlatform.isAndroid && + ref.read(storeServiceProvider).get(.manageLocalMediaAndroid, false); + + if (requiresPrompt) { + final confirmed = await showDialog( + context: context, + builder: (_) => ConfirmDialog( + title: context.t.move_to_device_trash, + content: context.t.free_up_space_description, + ok: context.t.ok, + ), + ); + if (confirmed != true) { + return 0; + } + } + + return cleanupService.deleteLocalAssets(assetIds); +} diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart deleted file mode 100644 index a6ed4c4246..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/delete_action_button.widget.dart +++ /dev/null @@ -1,100 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -/// This delete action has the following behavior: -/// - Set the deletedAt information, put the asset in the trash in the server -/// which will be permanently deleted after the number of days configure by the admin -/// - Prompt to delete the asset locally -class DeleteActionButton extends ConsumerWidget { - final ActionSource source; - final bool showConfirmation; - final bool iconOnly; - final bool menuItem; - const DeleteActionButton({ - super.key, - required this.source, - this.showConfirmation = false, - this.iconOnly = false, - this.menuItem = false, - }); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - if (showConfirmation) { - final confirm = await showDialog( - context: context, - builder: (context) => AlertDialog( - title: Text('delete'.t(context: context)), - content: Text('delete_action_confirmation_message'.t(context: context)), - actions: [ - TextButton( - onPressed: () => Navigator.of(context).pop(false), - child: Text('cancel'.t(context: context)), - ), - TextButton( - onPressed: () => Navigator.of(context).pop(true), - child: Text( - 'confirm'.t(context: context), - style: TextStyle(color: context.colorScheme.error), - ), - ), - ], - ), - ); - if (confirm != true) { - return; - } - } - - final currentAsset = ref.read(assetViewerProvider).currentAsset; - final stackIndex = ref.read(assetViewerProvider).stackIndex; - - final result = await ref.read(actionProvider.notifier).trashRemoteAndDeleteLocal(source); - ref.read(multiSelectProvider.notifier).reset(); - - if (source == ActionSource.viewer && result.success) { - final shouldRefreshStack = currentAsset is RemoteAsset && currentAsset.stackId != null; - EventStream.shared.emit( - shouldRefreshStack ? ViewerStackAssetDeletedEvent(stackIndex: stackIndex) : const ViewerReloadAssetEvent(), - ); - } - if (!context.mounted) { - return; - } - - final successMessage = 'delete_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 110.0, - iconData: Icons.delete_sweep_outlined, - label: "delete".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart deleted file mode 100644 index 09969d8b8a..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/delete_local_action_button.widget.dart +++ /dev/null @@ -1,69 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -/// This delete action has the following behavior: -/// - Prompt to delete the asset locally -class DeleteLocalActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const DeleteLocalActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).deleteLocal(source, context); - if (result == null) { - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - if (result.count == 0) { - return; - } - - ref.invalidate(localAlbumProvider); - - if (!context.mounted) { - return; - } - - final successMessage = 'delete_local_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 95.0, - iconData: Icons.no_cell_outlined, - label: "control_bottom_app_bar_delete_from_local".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart deleted file mode 100644 index c02fcf8f79..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart +++ /dev/null @@ -1,80 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/asset_grid/permanent_delete_dialog.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -/// This delete action has the following behavior: -/// - Delete permanently on the server -/// - Prompt to delete the asset locally -class DeletePermanentActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - final bool useShortLabel; - - const DeletePermanentActionButton({ - super.key, - required this.source, - this.iconOnly = false, - this.menuItem = false, - this.useShortLabel = false, - }); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final count = source == ActionSource.viewer ? 1 : ref.read(multiSelectProvider).selectedAssets.length; - final confirm = - await showDialog( - context: context, - builder: (context) => PermanentDeleteDialog(count: count), - ) ?? - false; - if (!confirm) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).deleteRemoteAndLocal(source); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'delete_permanently_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 110.0, - iconData: Icons.delete_forever, - label: useShortLabel ? "delete".t(context: context) : "delete_permanently".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart deleted file mode 100644 index 3312e4f2a3..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/asset_grid/permanent_delete_dialog.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -/// This delete action has the following behavior: -/// - Delete permanently on the server -/// - Prompt to delete the asset locally -/// -/// This action is used when the asset is selected in multi-selection mode in the trash page -class DeleteTrashActionButton extends ConsumerWidget { - final ActionSource source; - - const DeleteTrashActionButton({super.key, required this.source}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final selectCount = ref.watch(multiSelectProvider.select((s) => s.selectedAssets.length)); - - final confirmDelete = - await showDialog( - context: context, - builder: (context) => PermanentDeleteDialog(count: selectCount), - ) ?? - false; - if (!confirmDelete) { - return; - } - - final result = await ref.read(actionProvider.notifier).deleteRemoteAndLocal(source); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'assets_permanently_deleted_count'.t( - context: context, - args: {'count': result.count.toString()}, - ); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return TextButton.icon( - icon: Icon(Icons.delete_forever, color: Colors.red[400]), - label: Text( - "delete".t(context: context), - style: TextStyle(fontSize: 14, color: Colors.red[400], fontWeight: FontWeight.bold), - ), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart deleted file mode 100644 index 2be2049a07..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/trash_action_button.widget.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -/// This delete action has the following behavior: -/// - Set the deletedAt information, put the asset in the trash in the server -/// which will be permanently deleted after the number of days configure by the admin -class TrashActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const TrashActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).trash(source); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'trash_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 85.0, - iconData: Icons.delete_outline_rounded, - label: "control_bottom_app_bar_trash_from_immich".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart index 2819d2502d..33eb917c69 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart @@ -1,15 +1,12 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/add_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_image_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; @@ -19,7 +16,6 @@ import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.da import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; import 'package:immich_mobile/providers/server_info.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/utils/semver.dart'; import 'package:immich_mobile/widgets/asset_viewer/video_controls.dart'; import 'package:immich_ui/immich_ui.dart'; @@ -43,8 +39,6 @@ class ViewerBottomBar extends ConsumerWidget { } final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); - final user = ref.watch(currentUserProvider); - final isOwner = asset is RemoteAsset && asset.ownerId == user?.id; final showingDetails = ref.watch(assetViewerProvider.select((s) => s.showingDetails)); final isInLockedView = ref.watch(inLockedViewProvider); final serverInfo = ref.watch(serverInfoProvider); @@ -64,14 +58,7 @@ class ViewerBottomBar extends ConsumerWidget { const EditImageActionButton(), if (asset.hasRemote) AddActionButton(originalTheme: originalTheme), ], - if (isOwner) ...[ - if (asset.isLocalOnly) - const DeleteLocalActionButton(source: ActionSource.viewer) - else if (asset.isTrashed) - const DeletePermanentActionButton(source: ActionSource.viewer, useShortLabel: true) - else - const DeleteActionButton(source: ActionSource.viewer, showConfirmation: true), - ], + ..._actionColumnButtons(context, ref, const [DeleteAction(source: .viewer)]), ], ]; diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index 5b041452c0..c8e62c8ec1 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -5,21 +5,18 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -48,7 +45,6 @@ class _ArchiveBottomSheetState extends ConsumerState { @override Widget build(BuildContext context) { final multiselect = ref.watch(multiSelectProvider); - final isTrashEnable = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); Future addToAlbum(RemoteAlbum album) async { final result = await ref.read(actionProvider.notifier).addToAlbum(ActionSource.timeline, album); @@ -86,15 +82,13 @@ class _ArchiveBottomSheetState extends ConsumerState { const ActionColumnButton(action: ArchiveAction(source: .timeline)), const ActionColumnButton(action: FavoriteAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), - isTrashEnable - ? const TrashActionButton(source: ActionSource.timeline) - : const DeletePermanentActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: DeleteAction(source: .timeline)), const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], - if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index 7ae0fb6055..ece09d5a76 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -6,21 +6,18 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -30,7 +27,6 @@ class FavoriteBottomSheet extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final multiselect = ref.watch(multiSelectProvider); - final isTrashEnable = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); Future addAssetsToAlbum(RemoteAlbum album) async { final selectedAssets = multiselect.selectedAssets; @@ -86,15 +82,13 @@ class FavoriteBottomSheet extends ConsumerWidget { const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ActionColumnButton(action: ArchiveAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), - isTrashEnable - ? const TrashActionButton(source: ActionSource.timeline) - : const DeletePermanentActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: DeleteAction(source: .timeline)), const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], - if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), ], slivers: multiselect.hasRemote ? [const AddToAlbumHeader(), AlbumSelector(onAlbumSelected: addAssetsToAlbum)] diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index 40e75adf86..c2bf3edf96 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -5,25 +5,21 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/providers/infrastructure/user_metadata.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -52,7 +48,6 @@ class _GeneralBottomSheetState extends ConsumerState { @override Widget build(BuildContext context) { final multiselect = ref.watch(multiSelectProvider); - final isTrashEnable = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); final tagsEnabled = ref.watch( userMetadataPreferencesProvider.select((value) => value.valueOrNull?.tagsEnabled ?? false), ); @@ -92,9 +87,6 @@ class _GeneralBottomSheetState extends ConsumerState { if (multiselect.hasRemote) ...[ const ShareLinkActionButton(source: ActionSource.timeline), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), - isTrashEnable - ? const TrashActionButton(source: ActionSource.timeline) - : const DeletePermanentActionButton(source: ActionSource.timeline), const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ActionColumnButton(action: ArchiveAction(source: .timeline)), if (tagsEnabled) const BulkTagAssetsActionButton(source: ActionSource.timeline), @@ -102,10 +94,9 @@ class _GeneralBottomSheetState extends ConsumerState { const EditLocationActionButton(source: ActionSource.timeline), const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), - if (multiselect.onlyLocal || multiselect.hasMerged) const DeleteActionButton(source: ActionSource.timeline), ], - if (multiselect.onlyLocal || multiselect.hasMerged) - const DeleteLocalActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: DeleteAction(source: .timeline)), + const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), if (multiselect.onlyLocal) const UploadActionButton(source: ActionSource.timeline), ], slivers: [ diff --git a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart index ac8c77af03..dc49f22cfc 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart @@ -3,7 +3,8 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; @@ -66,7 +67,8 @@ class _LocalAlbumBottomSheetState extends ConsumerState { shouldCloseOnMinExtent: false, actions: const [ ShareActionButton(source: ActionSource.timeline), - DeleteLocalActionButton(source: ActionSource.timeline), + ActionColumnButton(action: DeleteAction(source: .timeline)), + ActionColumnButton(action: CleanupLocalAction(source: .timeline)), UploadActionButton(source: ActionSource.timeline), ], slivers: [ diff --git a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart index 9b4fef1a13..e0074c7866 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; @@ -20,7 +20,7 @@ class LockedFolderBottomSheet extends ConsumerWidget { actions: [ ShareActionButton(source: ActionSource.timeline), DownloadActionButton(source: ActionSource.timeline), - DeletePermanentActionButton(source: ActionSource.timeline), + ActionColumnButton(action: DeleteAction(source: .timeline)), ActionColumnButton(action: LockAction(source: .timeline)), ], ); diff --git a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart index ac9b85caa1..a9175577b0 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart @@ -5,11 +5,10 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; @@ -17,11 +16,9 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_al import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -52,7 +49,6 @@ class _RemoteAlbumBottomSheetState extends ConsumerState @override Widget build(BuildContext context) { final multiselect = ref.watch(multiSelectProvider); - final isTrashEnable = ref.watch(serverInfoProvider.select((state) => state.serverFeatures.trash)); final ownsAlbum = ref.watch(currentUserProvider)?.id == widget.album.ownerId; Future addToAlbum(RemoteAlbum album) async { @@ -100,16 +96,14 @@ class _RemoteAlbumBottomSheetState extends ConsumerState ], const DownloadActionButton(source: ActionSource.timeline), if (ownsAlbum) ...[ - isTrashEnable - ? const TrashActionButton(source: ActionSource.timeline) - : const DeletePermanentActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: DeleteAction(source: .timeline)), const EditDateTimeActionButton(source: ActionSource.timeline), const EditLocationActionButton(source: ActionSource.timeline), const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], ], - if (multiselect.hasMerged) const DeleteLocalActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), if (ownsAlbum) RemoveFromAlbumActionButton(source: ActionSource.timeline, albumId: widget.album.id), if (ownsAlbum && multiselect.selectedAssets.length == 1) SetAlbumCoverActionButton(source: ActionSource.timeline, albumId: widget.album.id), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart index 4e438884b3..31a36cb970 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart @@ -1,10 +1,9 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_trash_action_button.widget.dart'; class TrashBottomBar extends ConsumerWidget { const TrashBottomBar({super.key}); @@ -21,7 +20,7 @@ class TrashBottomBar extends ConsumerWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - DeleteTrashActionButton(source: ActionSource.timeline), + ActionColumnButton(action: DeleteAction(source: .timeline)), ActionColumnButton(action: RestoreAction(source: .timeline)), ], ), diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index 20826ddd8e..2222cbf722 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -21,7 +21,6 @@ import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/services/action.service.dart'; import 'package:immich_mobile/services/foreground_upload.service.dart'; import 'package:immich_mobile/utils/semver.dart'; -import 'package:immich_mobile/widgets/asset_grid/delete_dialog.dart'; import 'package:logging/logging.dart'; import 'package:openapi/api.dart'; @@ -64,24 +63,6 @@ class ActionNotifier extends Notifier { return _getAssets(source).whereType().toIds().toList(growable: false); } - List _getLocalIdsForSource(ActionSource source, {bool ignoreLocalOnly = false}) { - final Set assets = _getAssets(source); - final List localIds = []; - - for (final asset in assets) { - if (ignoreLocalOnly && asset.storage != AssetState.merged) { - continue; - } - if (asset is LocalAsset) { - localIds.add(asset.id); - } else if (asset is RemoteAsset && asset.localId != null) { - localIds.add(asset.localId!); - } - } - - return localIds; - } - List _getOwnedRemoteIdsForSource(ActionSource source) { final ownerId = ref.read(currentUserProvider)?.id; return _getAssets(source).whereType().ownedAssets(ownerId).toIds().toList(growable: false); @@ -118,18 +99,6 @@ class ActionNotifier extends Notifier { } } - Future trash(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - - try { - await _service.trash(ids); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to trash assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future emptyTrash(String userId) async { try { final count = await _service.emptyTrash(userId); @@ -150,60 +119,6 @@ class ActionNotifier extends Notifier { } } - Future trashRemoteAndDeleteLocal(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - final localIds = _getLocalIdsForSource(source); - try { - await _service.trashRemoteAndDeleteLocal(ids, localIds); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to delete assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future deleteRemoteAndLocal(ActionSource source) async { - final ids = _getOwnedRemoteIdsForSource(source); - final localIds = _getLocalIdsForSource(source); - try { - await _service.deleteRemoteAndLocal(ids, localIds); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to delete assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future deleteLocal(ActionSource source, BuildContext context) async { - final assets = _getAssets(source); - final bool? backedUpOnly = assets.every((asset) => asset.storage == AssetState.merged) - ? true - : await showDialog( - context: context, - builder: (BuildContext context) => DeleteLocalOnlyDialog(onDeleteLocal: (_) {}), - ); - - if (backedUpOnly == null) { - // User cancelled the dialog - return null; - } - - final List ids; - if (backedUpOnly) { - ids = assets.where((asset) => asset.storage == AssetState.merged).map((asset) => asset.localId!).toList(); - } else { - ids = _getLocalIdsForSource(source); - } - - try { - final deletedCount = await _service.deleteLocal(ids); - return ActionResult(count: deletedCount, success: true); - } catch (error, stack) { - _logger.severe('Failed to delete assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future editLocation(ActionSource source, BuildContext context) async { final ids = _getOwnedRemoteIdsForSource(source); try { diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index 00b608c8a6..28e2d27c7e 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -6,14 +6,9 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/asset_edit.model.dart'; -import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/domain/services/tag.service.dart'; -import 'package:immich_mobile/entities/store.entity.dart'; -import 'package:immich_mobile/extensions/platform_extensions.dart'; -import 'package:immich_mobile/infrastructure/repositories/local_asset.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_album.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; -import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; @@ -31,10 +26,8 @@ final actionServiceProvider = Provider( (ref) => ActionService( ref.watch(assetApiRepositoryProvider), ref.watch(remoteAssetRepositoryProvider), - ref.watch(localAssetRepository), ref.watch(driftAlbumApiRepositoryProvider), ref.watch(remoteAlbumRepository), - ref.watch(trashedLocalAssetRepository), ref.watch(assetMediaRepositoryProvider), ref.watch(downloadRepositoryProvider), ref.watch(tagServiceProvider), @@ -44,10 +37,8 @@ final actionServiceProvider = Provider( class ActionService { final AssetApiRepository _assetApiRepository; final RemoteAssetRepository _remoteAssetRepository; - final DriftLocalAssetRepository _localAssetRepository; final DriftAlbumApiRepository _albumApiRepository; final DriftRemoteAlbumRepository _remoteAlbumRepository; - final DriftTrashedLocalAssetRepository _trashedLocalAssetRepository; final AssetMediaRepository _assetMediaRepository; final DownloadRepository _downloadRepository; final TagService _tagService; @@ -55,10 +46,8 @@ class ActionService { const ActionService( this._assetApiRepository, this._remoteAssetRepository, - this._localAssetRepository, this._albumApiRepository, this._remoteAlbumRepository, - this._trashedLocalAssetRepository, this._assetMediaRepository, this._downloadRepository, this._tagService, @@ -68,11 +57,6 @@ class ActionService { unawaited(context.pushRoute(SharedLinkEditRoute(assetsList: remoteIds))); } - Future trash(List remoteIds) async { - await _assetApiRepository.delete(remoteIds, false); - await _remoteAssetRepository.trash(remoteIds); - } - Future emptyTrash(String userId) async { final count = await _assetApiRepository.emptyTrash(); await _remoteAssetRepository.emptyTrash(userId); @@ -85,28 +69,6 @@ class ActionService { return count; } - Future trashRemoteAndDeleteLocal(List remoteIds, List localIds) async { - await _assetApiRepository.delete(remoteIds, false); - await _remoteAssetRepository.trash(remoteIds); - - if (localIds.isNotEmpty) { - await _deleteLocalAssets(localIds); - } - } - - Future deleteRemoteAndLocal(List remoteIds, List localIds) async { - await _assetApiRepository.delete(remoteIds, true); - await _remoteAssetRepository.delete(remoteIds); - - if (localIds.isNotEmpty) { - await _deleteLocalAssets(localIds); - } - } - - Future deleteLocal(List localIds) async { - return await _deleteLocalAssets(localIds); - } - Future editLocation(List remoteIds, BuildContext context) async { maplibre.LatLng? initialLatLng; if (remoteIds.length == 1) { @@ -270,17 +232,4 @@ class ActionService { await _assetApiRepository.editAsset(remoteId, edits); } } - - Future _deleteLocalAssets(List localIds) async { - final deletedIds = await _assetMediaRepository.deleteAll(localIds); - if (deletedIds.isEmpty) { - return 0; - } - if (CurrentPlatform.isAndroid && Store.get(StoreKey.manageLocalMediaAndroid, false)) { - await _trashedLocalAssetRepository.applyTrashedAssets(deletedIds); - } else { - await _localAssetRepository.delete(deletedIds); - } - return deletedIds.length; - } } diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 2924907423..b8d231e436 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -10,14 +10,12 @@ import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/cast_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_local_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/delete_permanent_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart'; @@ -28,7 +26,6 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_b import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/slideshow_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/trash_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -83,9 +80,7 @@ enum ActionButtonType { removeFromLockFolder, removeFromAlbum, restoreTrash, - trash, deleteLocal, - deletePermanent, delete, advancedInfo; @@ -110,25 +105,12 @@ enum ActionButtonType { !context.isInLockedView && // context.asset.hasRemote && // !context.asset.hasLocal, - ActionButtonType.trash => - context.isOwner && // - !context.isInLockedView && // - context.asset.hasRemote && // - context.isTrashEnabled && // - context.timelineOrigin != TimelineOrigin.trash, ActionButtonType.restoreTrash => context.isOwner && // !context.isInLockedView && // context.asset.hasRemote && // context.timelineOrigin == TimelineOrigin.trash, - ActionButtonType.deletePermanent => - context.isOwner && // - context.asset.hasRemote && // - (!context.isTrashEnabled || context.timelineOrigin == TimelineOrigin.trash || context.isInLockedView), - ActionButtonType.delete => - context.isOwner && // - !context.isInLockedView && // - context.asset.hasRemote, + ActionButtonType.delete => true, ActionButtonType.moveToLockFolder => context.isOwner && // !context.isInLockedView && // @@ -139,7 +121,7 @@ enum ActionButtonType { context.asset.hasRemote, ActionButtonType.deleteLocal => !context.isInLockedView && // - context.asset.hasLocal, + context.asset.isMerged, ActionButtonType.upload => !context.isInLockedView && // context.asset.storage == AssetState.local, @@ -201,21 +183,11 @@ enum ActionButtonType { ActionButtonType.archive || ActionButtonType.unarchive => ActionMenuItem(action: ArchiveAction(source: context.source)), ActionButtonType.download => DownloadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.trash => TrashActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), ActionButtonType.restoreTrash => ActionMenuItem(action: RestoreAction(source: context.source)), - ActionButtonType.deletePermanent => DeletePermanentActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.delete => DeleteActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), + ActionButtonType.delete => ActionMenuItem(action: DeleteAction(source: context.source)), ActionButtonType.moveToLockFolder || ActionButtonType.removeFromLockFolder => ActionMenuItem(action: LockAction(source: context.source)), - ActionButtonType.deleteLocal => DeleteLocalActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), + ActionButtonType.deleteLocal => ActionMenuItem(action: CleanupLocalAction(source: context.source)), ActionButtonType.upload => UploadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), ActionButtonType.removeFromAlbum => RemoveFromAlbumActionButton( albumId: context.currentAlbum!.id, @@ -276,8 +248,6 @@ enum ActionButtonType { // 0: info ActionButtonType.openInfo => 0, // 10: move, remove, and delete - ActionButtonType.trash => 10, - ActionButtonType.deletePermanent => 10, ActionButtonType.removeFromLockFolder => 10, ActionButtonType.removeFromAlbum => 10, ActionButtonType.unstack => 10, @@ -305,7 +275,6 @@ class ActionButtonBuilder { ActionButtonType.archive, ActionButtonType.unarchive, ActionButtonType.restoreTrash, - ActionButtonType.deletePermanent, }; static List build(ActionButtonContext context) { diff --git a/mobile/test/services/action.service_test.dart b/mobile/test/services/action.service_test.dart index 72691a3802..76f02e29d0 100644 --- a/mobile/test/services/action.service_test.dart +++ b/mobile/test/services/action.service_test.dart @@ -2,7 +2,6 @@ import 'package:drift/drift.dart' as drift; import 'package:drift/native.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/domain/services/store.service.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; @@ -18,10 +17,8 @@ void main() { late MockAssetApiRepository assetApiRepository; late MockRemoteAssetRepository remoteAssetRepository; - late MockDriftLocalAssetRepository localAssetRepository; late MockDriftAlbumApiRepository albumApiRepository; late MockRemoteAlbumRepository remoteAlbumRepository; - late MockTrashedLocalAssetRepository trashedLocalAssetRepository; late MockAssetMediaRepository assetMediaRepository; late MockDownloadRepository downloadRepository; late MockTagService tagService; @@ -45,10 +42,8 @@ void main() { setUp(() { assetApiRepository = MockAssetApiRepository(); remoteAssetRepository = MockRemoteAssetRepository(); - localAssetRepository = MockDriftLocalAssetRepository(); albumApiRepository = MockDriftAlbumApiRepository(); remoteAlbumRepository = MockRemoteAlbumRepository(); - trashedLocalAssetRepository = MockTrashedLocalAssetRepository(); assetMediaRepository = MockAssetMediaRepository(); downloadRepository = MockDownloadRepository(); tagService = MockTagService(); @@ -56,10 +51,8 @@ void main() { sut = ActionService( assetApiRepository, remoteAssetRepository, - localAssetRepository, albumApiRepository, remoteAlbumRepository, - trashedLocalAssetRepository, assetMediaRepository, downloadRepository, tagService, @@ -138,50 +131,4 @@ void main() { verify(() => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: null)).called(1); }); }); - - group('ActionService.deleteLocal', () { - test('routes deleted ids to trashed repository when Android trash handling is enabled', () async { - await Store.put(StoreKey.manageLocalMediaAndroid, true); - const ids = ['a', 'b']; - - when(() => assetMediaRepository.deleteAll(ids)).thenAnswer((_) async => ids); - when(() => trashedLocalAssetRepository.applyTrashedAssets(ids)).thenAnswer((_) async {}); - - final result = await sut.deleteLocal(ids); - - expect(result, ids.length); - verify(() => assetMediaRepository.deleteAll(ids)).called(1); - verify(() => trashedLocalAssetRepository.applyTrashedAssets(ids)).called(1); - verifyNever(() => localAssetRepository.delete(any())); - }); - - test('deletes locally when Android trash handling is disabled', () async { - await Store.put(StoreKey.manageLocalMediaAndroid, false); - const ids = ['c']; - - when(() => assetMediaRepository.deleteAll(ids)).thenAnswer((_) async => ids); - when(() => localAssetRepository.delete(ids)).thenAnswer((_) async {}); - - final result = await sut.deleteLocal(ids); - - expect(result, ids.length); - verify(() => assetMediaRepository.deleteAll(ids)).called(1); - verify(() => localAssetRepository.delete(ids)).called(1); - verifyNever(() => trashedLocalAssetRepository.applyTrashedAssets(any())); - }); - - test('short-circuits when nothing was deleted', () async { - await Store.put(StoreKey.manageLocalMediaAndroid, true); - const ids = ['x']; - - when(() => assetMediaRepository.deleteAll(ids)).thenAnswer((_) async => []); - - final result = await sut.deleteLocal(ids); - - expect(result, 0); - verify(() => assetMediaRepository.deleteAll(ids)).called(1); - verifyNever(() => trashedLocalAssetRepository.applyTrashedAssets(any())); - verifyNever(() => localAssetRepository.delete(any())); - }); - }); } diff --git a/mobile/test/unit/presentation/actions/delete_action_test.dart b/mobile/test/unit/presentation/actions/delete_action_test.dart new file mode 100644 index 0000000000..4b75b01eaf --- /dev/null +++ b/mobile/test/unit/presentation/actions/delete_action_test.dart @@ -0,0 +1,257 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/store.model.dart'; +import 'package:immich_mobile/domain/services/store.service.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; +import 'package:immich_mobile/widgets/common/confirm_dialog.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + late MockCleanupService cleanupService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + cleanupService = context.service.cleanup.service; + }); + + tearDown(() async { + debugDefaultTargetPlatformOverride = null; + await StoreService.I.put(StoreKey.manageLocalMediaAndroid, false); + context.dispose(); + }); + + RemoteAsset owned({AssetVisibility visibility = .timeline, DateTime? deletedAt, String? localId}) => + RemoteAssetFactory.create( + ownerId: context.currentUser.id, + visibility: visibility, + deletedAt: deletedAt, + localId: localId, + ); + + Future pumpDelete(WidgetTester tester, Set selection, {bool trashEnabled = true}) async { + if (!trashEnabled) { + when( + () => context.service.serverInfo.getServerFeatures(), + ).thenAnswer((_) async => const .new(trash: false, map: true, oauthEnabled: false, passwordLogin: true)); + } + + await tester.pumpTestWidget( + context, + const ActionIconButton(action: DeleteAction(source: .timeline)), + overrides: context.selected(selection), + ); + + if (!trashEnabled) { + final scope = ProviderScope.containerOf(tester.element(find.byType(ActionIconButton)), listen: false); + await scope.read(serverInfoProvider.notifier).getServerFeatures(); + await tester.pumpAndSettle(); + } + + await tester.tap(find.byType(ImmichIconButton)); + await tester.pump(); + } + + Future respondToDialog(WidgetTester tester, {required bool confirm}) async { + await tester.pump(const Duration(milliseconds: 300)); + expect(find.byType(ConfirmDialog), findsOneWidget); + await tester.tap(find.byType(TextButton).at(confirm ? 1 : 0)); // [cancel, ok] + await tester.pumpAndSettle(); + } + + group('DeleteAction', () { + group('trash', () { + testWidgets('trashes a remote-only owned asset', (tester) async { + final asset = owned(); + + await pumpDelete(tester, {asset}); + await tester.pumpAndSettle(); + + verify(() => assetService.trash([asset.id])).called(1); + verifyNever(() => assetService.delete(any())); + verifyNever(() => cleanupService.deleteLocalAssets(any())); + }); + + testWidgets('ignores assets owned by someone else', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpDelete(tester, {mine, theirs}); + await tester.pumpAndSettle(); + + verify(() => assetService.trash([mine.id])).called(1); + }); + + testWidgets('trashes a merged asset and removes its device copy', (tester) async { + final asset = owned(localId: 'local'); + + await pumpDelete(tester, {asset}); + await tester.pumpAndSettle(); + + verify(() => cleanupService.deleteLocalAssets(['local'])).called(1); + verify(() => assetService.trash([asset.id])).called(1); + }); + }); + + group('permanent', () { + testWidgets('permanently deletes when the trash feature is disabled', (tester) async { + final asset = owned(); + + await pumpDelete(tester, {asset}, trashEnabled: false); + await respondToDialog(tester, confirm: true); + + verify(() => assetService.delete([asset.id])).called(1); + verifyNever(() => assetService.trash(any())); + }); + + testWidgets('permanently deletes a merged asset and removes its device copy', (tester) async { + final asset = owned(localId: 'local'); + + await pumpDelete(tester, {asset}, trashEnabled: false); + await respondToDialog(tester, confirm: true); + + verify(() => assetService.delete([asset.id])).called(1); + verify(() => cleanupService.deleteLocalAssets(['local'])).called(1); + }); + + testWidgets('permanently deletes already trashed assets even with trash enabled', (tester) async { + final asset = owned(deletedAt: DateTime(2024)); + + await pumpDelete(tester, {asset}); + await respondToDialog(tester, confirm: true); + + verify(() => assetService.delete([asset.id])).called(1); + verifyNever(() => assetService.trash(any())); + }); + + testWidgets('permanently deletes locked folder assets even with trash enabled', (tester) async { + final asset = owned(visibility: .locked, localId: 'local'); + + await pumpDelete(tester, {asset}); + await respondToDialog(tester, confirm: true); + + verify(() => assetService.delete([asset.id])).called(1); + verify(() => cleanupService.deleteLocalAssets(['local'])).called(1); + }); + + testWidgets('does nothing when the confirmation is cancelled', (tester) async { + final asset = owned(visibility: .locked, localId: 'local'); + + await pumpDelete(tester, {asset}); + await respondToDialog(tester, confirm: false); + + verifyNever(() => assetService.delete(any())); + verifyNever(() => cleanupService.deleteLocalAssets(any())); + }); + }); + + group('local only', () { + testWidgets('removes the device copy with no remote call', (tester) async { + final asset = LocalAssetFactory.create(); + + await pumpDelete(tester, {asset}); + await tester.pumpAndSettle(); + + verify(() => cleanupService.deleteLocalAssets([asset.id])).called(1); + verifyNever(() => assetService.trash(any())); + verifyNever(() => assetService.delete(any())); + }); + }); + + group('prompt handling', () { + testWidgets('permanent delete shows a single app dialog', (tester) async { + final asset = owned(localId: 'local'); + + await pumpDelete(tester, {asset}, trashEnabled: false); + await tester.pump(const Duration(milliseconds: 300)); + + expect(find.text(StaticTranslations.instance.delete_dialog_title), findsOneWidget); + await tester.tap(find.byType(TextButton).at(1)); + await tester.pumpAndSettle(); + + expect(find.text(StaticTranslations.instance.move_to_device_trash), findsNothing); + verify(() => assetService.delete([asset.id])).called(1); + verify(() => cleanupService.deleteLocalAssets(['local'])).called(1); + }); + + testWidgets('local only delete on Android with MANAGE_MEDIA shows the prompt', (tester) async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + await StoreService.I.put(StoreKey.manageLocalMediaAndroid, true); + final asset = LocalAssetFactory.create(); + + await pumpDelete(tester, {asset}); + await tester.pump(const Duration(milliseconds: 300)); + + expect(find.text(StaticTranslations.instance.move_to_device_trash), findsOneWidget); + await tester.tap(find.byType(TextButton).at(1)); // confirm + await tester.pumpAndSettle(); + + verify(() => cleanupService.deleteLocalAssets([asset.id])).called(1); + // Has to be cleared inside the body; the framework asserts on it before tearDown runs. + debugDefaultTargetPlatformOverride = null; + }); + + testWidgets('local only delete on Android with MANAGE_MEDIA deletes nothing when cancelled', (tester) async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + await StoreService.I.put(StoreKey.manageLocalMediaAndroid, true); + final asset = LocalAssetFactory.create(); + + await pumpDelete(tester, {asset}); + await respondToDialog(tester, confirm: false); + + verifyNever(() => cleanupService.deleteLocalAssets(any())); + debugDefaultTargetPlatformOverride = null; + }); + }); + + testWidgets('is hidden when nothing can be deleted', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: DeleteAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('CleanupLocalAction', () { + testWidgets('deletes only backed up device copies', (tester) async { + final backedUp = LocalAssetFactory.create(remoteId: 'remote'); + final localOnly = LocalAssetFactory.create(); + + await tester.pumpTestAction( + context, + const CleanupLocalAction(source: .timeline), + overrides: context.selected({backedUp, localOnly}), + ); + await tester.pumpAndSettle(); + + verify(() => cleanupService.deleteLocalAssets([backedUp.id])).called(1); + }); + + testWidgets('is hidden when no backed up assets are selected', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: CleanupLocalAction(source: .timeline)), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/presentation_context.dart b/mobile/test/unit/presentation/presentation_context.dart index a45c1c14f9..2e5871a419 100644 --- a/mobile/test/unit/presentation/presentation_context.dart +++ b/mobile/test/unit/presentation/presentation_context.dart @@ -19,6 +19,7 @@ import 'package:immich_mobile/providers/infrastructure/user.provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/services/cleanup.service.dart'; import 'package:immich_mobile/services/gcast.service.dart'; import 'package:immich_mobile/services/server_info.service.dart'; import 'package:immich_ui/immich_ui.dart'; @@ -48,6 +49,7 @@ class PresentationContext { List get overrides => [ currentUserProvider.overrideWith((ref) => CurrentUserProvider(service.user.service)), assetServiceProvider.overrideWithValue(service.asset.service), + cleanupServiceProvider.overrideWithValue(service.cleanup.service), partnerServiceProvider.overrideWithValue(service.partner.service), gCastServiceProvider.overrideWithValue(service.cast), serverInfoServiceProvider.overrideWithValue(service.serverInfo), diff --git a/mobile/test/utils_legacy/action_button_utils_test.dart b/mobile/test/utils_legacy/action_button_utils_test.dart index 52d25c4c75..65e1cad7f7 100644 --- a/mobile/test/utils_legacy/action_button_utils_test.dart +++ b/mobile/test/utils_legacy/action_button_utils_test.dart @@ -427,60 +427,6 @@ void main() { }); }); - group('trash button', () { - test('should show when owner, not locked, has remote, and trash enabled', () { - final remoteAsset = createRemoteAsset(); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: true, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.timeline, - ); - - expect(ActionButtonType.trash.shouldShow(context), isTrue); - }); - - test('should not show when trash disabled', () { - final remoteAsset = createRemoteAsset(); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: false, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.timeline, - ); - - expect(ActionButtonType.trash.shouldShow(context), isFalse); - }); - - test('should not show when asset is already trashed', () { - final remoteAsset = createRemoteAsset(deletedAt: DateTime(2024)); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: true, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.viewer, - timelineOrigin: TimelineOrigin.trash, - ); - - expect(ActionButtonType.trash.shouldShow(context), isFalse); - }); - }); - group('restoreTrash button', () { test('should show when owner, not locked, has remote, and is in trash timeline', () { final remoteAsset = createRemoteAsset(); @@ -519,60 +465,6 @@ void main() { }); }); - group('deletePermanent button', () { - test('should show when owner, not locked, has remote, and trash disabled', () { - final remoteAsset = createRemoteAsset(); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: false, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.timeline, - ); - - expect(ActionButtonType.deletePermanent.shouldShow(context), isTrue); - }); - - test('should not show when trash enabled', () { - final remoteAsset = createRemoteAsset(); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: true, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.timeline, - ); - - expect(ActionButtonType.deletePermanent.shouldShow(context), isFalse); - }); - - test('should show when asset is trashed even with trash enabled', () { - final remoteAsset = createRemoteAsset(deletedAt: DateTime(2024)); - final context = ActionButtonContext( - asset: remoteAsset, - isOwner: true, - isArchived: false, - isTrashEnabled: true, - isInLockedView: false, - currentAlbum: null, - advancedTroubleshooting: false, - isStacked: false, - source: ActionSource.viewer, - timelineOrigin: TimelineOrigin.trash, - ); - - expect(ActionButtonType.deletePermanent.shouldShow(context), isTrue); - }); - }); - group('delete button', () { test('should show when owner, not locked, and has remote', () { final remoteAsset = createRemoteAsset(); @@ -612,7 +504,7 @@ void main() { }); group('deleteLocal button', () { - test('should show when not locked and asset is local only', () { + test('should not show when asset is local only, as there is no backup to fall back on', () { final localAsset = createLocalAsset(); final context = ActionButtonContext( asset: localAsset, @@ -626,7 +518,7 @@ void main() { source: ActionSource.timeline, ); - expect(ActionButtonType.deleteLocal.shouldShow(context), isTrue); + expect(ActionButtonType.deleteLocal.shouldShow(context), isFalse); }); test('should not show when asset is not local only', () { From 36f12ec805f7c181ead39f3603ac9402e1d91b31 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:41 +0530 Subject: [PATCH 48/69] refactor: mobile open in browser, similar, set profile action (#29769) refactor: mobile browser and similar photos action Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../actions/open_in_browser.action.dart | 35 +++++++++++ .../actions/set_profile_picture.action.dart | 22 +++++++ .../actions/similar_photos.action.dart | 42 ++++++++++++++ .../open_in_browser_action_button.widget.dart | 55 ------------------ ..._profile_picture_action_button.widget.dart | 37 ------------ .../similar_photos_action_button.widget.dart | 58 ------------------- mobile/lib/utils/action_button.utils.dart | 25 +++----- .../actions/open_in_browser_action_test.dart | 48 +++++++++++++++ 8 files changed, 155 insertions(+), 167 deletions(-) create mode 100644 mobile/lib/presentation/actions/open_in_browser.action.dart create mode 100644 mobile/lib/presentation/actions/set_profile_picture.action.dart create mode 100644 mobile/lib/presentation/actions/similar_photos.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart create mode 100644 mobile/test/unit/presentation/actions/open_in_browser_action_test.dart diff --git a/mobile/lib/presentation/actions/open_in_browser.action.dart b/mobile/lib/presentation/actions/open_in_browser.action.dart new file mode 100644 index 0000000000..6b05762977 --- /dev/null +++ b/mobile/lib/presentation/actions/open_in_browser.action.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/services/timeline.service.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/store.provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class OpenInBrowserAction extends ActionBuilder { + final String remoteId; + final TimelineOrigin origin; + + const OpenInBrowserAction({required this.remoteId, required this.origin}); + + @override + ActionItem create(BuildContext context, WidgetRef ref) => + .new(icon: Icons.open_in_browser, label: context.t.open_in_browser, onAction: () => _open(ref)); + + Future _open(WidgetRef ref) async { + final serverEndpoint = ref.read(storeServiceProvider).get(.serverEndpoint).replaceFirst('/api', ''); + final url = Uri.parse('$serverEndpoint${webPathFor(origin)}/photos/$remoteId'); + + if (await canLaunchUrl(url)) { + await launchUrl(url, mode: .externalApplication); + } + } +} + +@visibleForTesting +String webPathFor(TimelineOrigin origin) => switch (origin) { + .favorite => '/favorites', + .trash => '/trash', + .archive => '/archive', + _ => '', +}; diff --git a/mobile/lib/presentation/actions/set_profile_picture.action.dart b/mobile/lib/presentation/actions/set_profile_picture.action.dart new file mode 100644 index 0000000000..c14be1dc87 --- /dev/null +++ b/mobile/lib/presentation/actions/set_profile_picture.action.dart @@ -0,0 +1,22 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/routing/router.dart'; + +class SetProfilePictureAction extends ActionBuilder { + final BaseAsset asset; + + const SetProfilePictureAction({required this.asset}); + + @override + ActionItem create(BuildContext context, WidgetRef ref) => .new( + icon: Icons.account_circle_outlined, + label: context.t.set_as_profile_picture, + onAction: () async => unawaited(context.pushRoute(ProfilePictureCropRoute(asset: asset))), + ); +} diff --git a/mobile/lib/presentation/actions/similar_photos.action.dart b/mobile/lib/presentation/actions/similar_photos.action.dart new file mode 100644 index 0000000000..3c0b7b129b --- /dev/null +++ b/mobile/lib/presentation/actions/similar_photos.action.dart @@ -0,0 +1,42 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/pages/search/paginated_search.provider.dart'; +import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; +import 'package:immich_mobile/routing/router.dart'; + +class SimilarPhotosAction extends ActionBuilder { + final String assetId; + + const SimilarPhotosAction({required this.assetId}); + + @override + ActionItem create(BuildContext context, WidgetRef ref) => + .new(icon: Icons.compare, label: context.t.view_similar_photos, onAction: () => _search(context, ref)); + + Future _search(BuildContext context, WidgetRef ref) async { + ref.invalidate(assetViewerProvider); + ref.invalidate(paginatedSearchProvider); + + ref.read(searchPreFilterProvider.notifier) + ..clear() + ..setFilter( + .new( + assetId: assetId, + people: {}, + location: .new(), + camera: .new(), + date: .new(), + display: .new(isNotInAlbum: false, isArchive: false, isFavorite: false), + rating: .new(), + mediaType: .other, + ), + ); + + unawaited(context.navigateTo(const DriftSearchRoute())); + } +} diff --git a/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart deleted file mode 100644 index adf73e4107..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/store.model.dart'; -import 'package:immich_mobile/domain/services/timeline.service.dart'; -import 'package:immich_mobile/entities/store.entity.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:url_launcher/url_launcher.dart'; - -class OpenInBrowserActionButton extends ConsumerWidget { - final String remoteId; - final TimelineOrigin origin; - final bool iconOnly; - final bool menuItem; - - const OpenInBrowserActionButton({ - super.key, - required this.remoteId, - required this.origin, - this.iconOnly = false, - this.menuItem = false, - }); - - Future _onTap() async { - final serverEndpoint = Store.get(StoreKey.serverEndpoint).replaceFirst('/api', ''); - - String originPath = ''; - switch (origin) { - case TimelineOrigin.favorite: - originPath = '/favorites'; - case TimelineOrigin.trash: - originPath = '/trash'; - case TimelineOrigin.archive: - originPath = '/archive'; - default: - break; - } - - final url = '$serverEndpoint$originPath/photos/$remoteId'; - if (await canLaunchUrl(Uri.parse(url))) { - await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - label: 'open_in_browser'.t(context: context), - iconData: Icons.open_in_browser, - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: _onTap, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart deleted file mode 100644 index 5b41715022..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'dart:async'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/routing/router.dart'; - -class SetProfilePictureActionButton extends ConsumerWidget { - final BaseAsset asset; - final bool iconOnly; - final bool menuItem; - - const SetProfilePictureActionButton({super.key, required this.asset, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context) async { - if (!context.mounted) { - return; - } - - await context.pushRoute(ProfilePictureCropRoute(asset: asset)); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.account_circle_outlined, - label: "set_as_profile_picture".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => unawaited(_onTap(context)), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart deleted file mode 100644 index 02da265f31..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'dart:async'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/models/search/search_filter.model.dart'; -import 'package:immich_mobile/presentation/pages/search/paginated_search.provider.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/routing/router.dart'; - -class SimilarPhotosActionButton extends ConsumerWidget { - final String assetId; - final bool iconOnly; - final bool menuItem; - - const SimilarPhotosActionButton({super.key, required this.assetId, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - ref.invalidate(assetViewerProvider); - ref.invalidate(paginatedSearchProvider); - - ref.read(searchPreFilterProvider.notifier) - ..clear() - ..setFilter( - SearchFilter( - assetId: assetId, - people: {}, - location: SearchLocationFilter(), - camera: SearchCameraFilter(), - date: SearchDateFilter(), - display: SearchDisplayFilters(isNotInAlbum: false, isArchive: false, isFavorite: false), - rating: SearchRatingFilter(), - mediaType: AssetType.other, - ), - ); - - unawaited(context.navigateTo(const DriftSearchRoute())); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.compare, - label: "view_similar_photos".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index b8d231e436..32aaf360d0 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -12,19 +12,19 @@ import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/open_in_browser.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; +import 'package:immich_mobile/presentation/actions/set_profile_picture.action.dart'; +import 'package:immich_mobile/presentation/actions/similar_photos.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/cast_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/open_in_browser_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/set_profile_picture_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/slideshow_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -203,22 +203,13 @@ enum ActionButtonType { ), ActionButtonType.likeActivity => LikeActivityActionButton(iconOnly: iconOnly, menuItem: menuItem), ActionButtonType.unstack => ActionMenuItem(action: StackAction(source: context.source)), - ActionButtonType.openInBrowser => OpenInBrowserActionButton( - remoteId: context.asset.remoteId!, - origin: context.timelineOrigin, - iconOnly: iconOnly, - menuItem: menuItem, + ActionButtonType.openInBrowser => ActionMenuItem( + action: OpenInBrowserAction(remoteId: context.asset.remoteId!, origin: context.timelineOrigin), ), - ActionButtonType.similarPhotos => SimilarPhotosActionButton( - assetId: (context.asset as RemoteAsset).id, - iconOnly: iconOnly, - menuItem: menuItem, - ), - ActionButtonType.setProfilePicture => SetProfilePictureActionButton( - asset: context.asset, - iconOnly: iconOnly, - menuItem: menuItem, + ActionButtonType.similarPhotos => ActionMenuItem( + action: SimilarPhotosAction(assetId: (context.asset as RemoteAsset).id), ), + ActionButtonType.setProfilePicture => ActionMenuItem(action: SetProfilePictureAction(asset: context.asset)), ActionButtonType.openInfo => BaseActionButton( label: 'info'.tr(), iconData: Icons.info_outline, diff --git a/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart b/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart new file mode 100644 index 0000000000..0ed99e7704 --- /dev/null +++ b/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart @@ -0,0 +1,48 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/services/timeline.service.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/open_in_browser.action.dart'; +import 'package:immich_ui/immich_ui.dart'; + +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + + setUp(() async { + context = await PresentationContext.create(); + }); + + tearDown(() { + context.dispose(); + }); + + group('webPathFor', () { + const dedicatedPages = { + TimelineOrigin.favorite: '/favorites', + TimelineOrigin.trash: '/trash', + TimelineOrigin.archive: '/archive', + }; + + for (final origin in TimelineOrigin.values) { + final expected = dedicatedPages[origin] ?? ''; + + test('opens ${origin.name} on ${expected.isEmpty ? 'the main timeline' : expected}', () { + expect(webPathFor(origin), expected); + }); + } + }); + + group('OpenInBrowserAction', () { + testWidgets('always renders, since the kebab menu decides whether to offer it', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton( + action: OpenInBrowserAction(remoteId: 'remote-1', origin: .main), + ), + ); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + }); +} From a048e86217b5bfbbf8c0ba388e390268cfb7d6cf Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:42 +0530 Subject: [PATCH 49/69] refactor: mobile cast and slideshow action (#29768) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../lib/presentation/actions/cast.action.dart | 23 ++++++++ .../actions/slideshow.action.dart | 21 ++++++++ .../cast_action_button.widget.dart | 32 ------------ .../slideshow_action_button.widget.dart | 36 ------------- mobile/lib/utils/action_button.utils.dart | 8 +-- .../actions/cast_action_test.dart | 52 +++++++++++++++++++ 6 files changed, 100 insertions(+), 72 deletions(-) create mode 100644 mobile/lib/presentation/actions/cast.action.dart create mode 100644 mobile/lib/presentation/actions/slideshow.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart create mode 100644 mobile/test/unit/presentation/actions/cast_action_test.dart diff --git a/mobile/lib/presentation/actions/cast.action.dart b/mobile/lib/presentation/actions/cast.action.dart new file mode 100644 index 0000000000..5d90479647 --- /dev/null +++ b/mobile/lib/presentation/actions/cast.action.dart @@ -0,0 +1,23 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/cast.provider.dart'; +import 'package:immich_mobile/widgets/asset_viewer/cast_dialog.dart'; + +class CastAction extends ActionBuilder { + const CastAction(); + + @override + ActionItem create(BuildContext context, WidgetRef ref) { + final isCasting = ref.watch(castProvider.select((state) => state.isCasting)); + + return .new( + icon: isCasting ? Icons.cast_connected_rounded : Icons.cast_rounded, + label: context.t.cast, + onAction: () async => unawaited(showDialog(context: context, builder: (_) => const CastDialog())), + ); + } +} diff --git a/mobile/lib/presentation/actions/slideshow.action.dart b/mobile/lib/presentation/actions/slideshow.action.dart new file mode 100644 index 0000000000..4b6c90b517 --- /dev/null +++ b/mobile/lib/presentation/actions/slideshow.action.dart @@ -0,0 +1,21 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; +import 'package:immich_mobile/routing/router.dart'; + +class SlideshowAction extends ActionBuilder { + const SlideshowAction(); + + @override + ActionItem create(BuildContext context, WidgetRef ref) => .new( + icon: Icons.slideshow, + label: context.t.slideshow, + onAction: () async => + unawaited(context.pushRoute(DriftSlideshowRoute(timeline: ref.read(timelineServiceProvider)))), + ); +} diff --git a/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart deleted file mode 100644 index 9465f50500..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/cast_action_button.widget.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/cast.provider.dart'; -import 'package:immich_mobile/widgets/asset_viewer/cast_dialog.dart'; - -class CastActionButton extends ConsumerWidget { - const CastActionButton({super.key, this.iconOnly = false, this.menuItem = false}); - - final bool iconOnly; - final bool menuItem; - - @override - Widget build(BuildContext context, WidgetRef ref) { - final isCasting = ref.watch(castProvider.select((c) => c.isCasting)); - - return BaseActionButton( - iconData: isCasting ? Icons.cast_connected_rounded : Icons.cast_rounded, - iconColor: isCasting ? context.primaryColor : null, // null = default color - label: "cast".t(context: context), - onPressed: () { - unawaited(showDialog(context: context, builder: (context) => const CastDialog())); - }, - iconOnly: iconOnly, - menuItem: menuItem, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart deleted file mode 100644 index fdbc7a8cda..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/slideshow_action_button.widget.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'dart:async'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; -import 'package:immich_mobile/routing/router.dart'; - -class SlideshowActionButton extends ConsumerWidget { - final bool iconOnly; - final bool menuItem; - - const SlideshowActionButton({super.key, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - await context.pushRoute(DriftSlideshowRoute(timeline: ref.read(timelineServiceProvider))); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.slideshow, - label: "slideshow".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => unawaited(_onTap(context, ref)), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 32aaf360d0..41015fb064 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -10,22 +10,22 @@ import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; +import 'package:immich_mobile/presentation/actions/cast.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/open_in_browser.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/actions/set_profile_picture.action.dart'; import 'package:immich_mobile/presentation/actions/similar_photos.action.dart'; +import 'package:immich_mobile/presentation/actions/slideshow.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/cast_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/slideshow_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -179,7 +179,7 @@ enum ActionButtonType { iconOnly: iconOnly, menuItem: menuItem, ), - ActionButtonType.slideshow => SlideshowActionButton(iconOnly: iconOnly, menuItem: menuItem), + ActionButtonType.slideshow => const ActionMenuItem(action: SlideshowAction()), ActionButtonType.archive || ActionButtonType.unarchive => ActionMenuItem(action: ArchiveAction(source: context.source)), ActionButtonType.download => DownloadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), @@ -228,7 +228,7 @@ enum ActionButtonType { EventStream.shared.emit(ScrollToDateEvent(context.asset.createdAt)); }, ), - ActionButtonType.cast => CastActionButton(iconOnly: iconOnly, menuItem: menuItem), + ActionButtonType.cast => const ActionMenuItem(action: CastAction()), }; } diff --git a/mobile/test/unit/presentation/actions/cast_action_test.dart b/mobile/test/unit/presentation/actions/cast_action_test.dart new file mode 100644 index 0000000000..45f1a842f5 --- /dev/null +++ b/mobile/test/unit/presentation/actions/cast_action_test.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/cast.action.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + + setUp(() async { + context = await PresentationContext.create(); + }); + + tearDown(() { + context.dispose(); + }); + + void Function(bool) captureConnectionListener() => + verify(() => context.service.cast.onConnectionState = captureAny()).captured.single as void Function(bool); + + group('CastAction', () { + testWidgets('offers to cast when nothing is connected', (tester) async { + await tester.pumpTestWidget(context, const ActionIconButton(action: CastAction())); + + expect(find.byIcon(Icons.cast_rounded), findsOneWidget); + }); + + testWidgets('switches to the connected icon once casting starts', (tester) async { + await tester.pumpTestWidget(context, const ActionIconButton(action: CastAction())); + + captureConnectionListener()(true); + await tester.pump(); + + expect(find.byIcon(Icons.cast_connected_rounded), findsOneWidget); + expect(find.byIcon(Icons.cast_rounded), findsNothing); + }); + + testWidgets('switches back when casting stops', (tester) async { + await tester.pumpTestWidget(context, const ActionIconButton(action: CastAction())); + + final onConnectionState = captureConnectionListener(); + onConnectionState(true); + await tester.pump(); + onConnectionState(false); + await tester.pump(); + + expect(find.byIcon(Icons.cast_rounded), findsOneWidget); + }); + }); +} From 9fcbb6eefc84dd9227e2d5f9abb3b5b1efa222c3 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:42 +0530 Subject: [PATCH 50/69] refactor: mobile edit asset actions (#30264) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../actions/asset_debug.action.dart | 7 +- .../actions/edit_asset.action.dart | 84 +++++++++ .../actions/edit_datetime.action.dart | 100 ++++++++++ .../actions/edit_location.action.dart | 85 +++++++++ .../edit_date_time_action_button.widget.dart | 52 ------ .../edit_image_action_button.widget.dart | 59 ------ .../edit_location_action_button.widget.dart | 48 ----- .../date_time_details.widget.dart | 8 +- .../location_details.widget.dart | 14 +- .../asset_viewer/bottom_bar.widget.dart | 9 +- .../archive_bottom_sheet.widget.dart | 8 +- .../favorite_bottom_sheet.widget.dart | 8 +- .../general_bottom_sheet.widget.dart | 8 +- .../remote_album_bottom_sheet.widget.dart | 8 +- .../infrastructure/action.provider.dart | 81 --------- mobile/lib/services/action.service.dart | 98 ---------- .../infrastructure/action_provider_test.dart | 112 ------------ mobile/test/riverpod_mocks.dart | 8 + mobile/test/services/action.service_test.dart | 42 ----- .../actions/edit_action_test.dart | 172 ++++++++++++++++++ .../presentation/presentation_context.dart | 1 + 21 files changed, 481 insertions(+), 531 deletions(-) create mode 100644 mobile/lib/presentation/actions/edit_asset.action.dart create mode 100644 mobile/lib/presentation/actions/edit_datetime.action.dart create mode 100644 mobile/lib/presentation/actions/edit_location.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/edit_image_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart delete mode 100644 mobile/test/providers/infrastructure/action_provider_test.dart create mode 100644 mobile/test/riverpod_mocks.dart create mode 100644 mobile/test/unit/presentation/actions/edit_action_test.dart diff --git a/mobile/lib/presentation/actions/asset_debug.action.dart b/mobile/lib/presentation/actions/asset_debug.action.dart index ff2935fc96..16ad15700e 100644 --- a/mobile/lib/presentation/actions/asset_debug.action.dart +++ b/mobile/lib/presentation/actions/asset_debug.action.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:auto_route/auto_route.dart'; +import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/generated/translations.g.dart'; @@ -13,16 +14,16 @@ class AssetDebugAction extends AssetActionBuilder { @override ActionItem? create(BuildContext context, WidgetRef ref) { - final assets = ref.watch(assetsActionProvider(source)).assets; + final asset = ref.watch(assetsActionProvider(source)).assets.singleOrNull; final troubleshootEnabled = ref.watch(settingsProvider.notifier).get(.advancedTroubleshooting); - if (!troubleshootEnabled || assets.length != 1) { + if (!troubleshootEnabled || asset == null) { return null; } return .new( icon: Icons.help_outline_rounded, label: context.t.troubleshoot, - onAction: () => unawaited(context.pushRoute(AssetTroubleshootRoute(asset: assets.single))), + onAction: () => unawaited(context.pushRoute(AssetTroubleshootRoute(asset: asset))), ); } } diff --git a/mobile/lib/presentation/actions/edit_asset.action.dart b/mobile/lib/presentation/actions/edit_asset.action.dart new file mode 100644 index 0000000000..d0a7e73122 --- /dev/null +++ b/mobile/lib/presentation/actions/edit_asset.action.dart @@ -0,0 +1,84 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/asset_edit.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/pages/edit/editor.provider.dart'; +import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; +import 'package:immich_mobile/providers/websocket.provider.dart'; +import 'package:immich_mobile/routing/router.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_mobile/utils/semver.dart'; + +const _minimumServerVersion = SemVer(major: 2, minor: 6, patch: 0); + +final _stateProvider = Provider.family.autoDispose((ref, source) { + final isSupported = ref.watch(serverInfoProvider.select((state) => state.serverVersion >= _minimumServerVersion)); + if (!isSupported) { + return null; + } + + final assets = ref.watch(ownedAssetsActionProvider(source)); + return assets.where((asset) => asset.isEditable).singleOrNull; +}); + +class EditAssetAction extends AssetActionBuilder { + const EditAssetAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + if (!ref.watch(_stateProvider(source).select((asset) => asset != null))) { + return null; + } + + return .new(icon: Icons.tune, label: context.t.edit, onAction: () => _edit(context, ref)); + } + + Future _edit(BuildContext context, WidgetRef ref) async { + final asset = ref.read(_stateProvider(source)); + if (asset == null) { + return; + } + + try { + // TODO(shenlong): Move all EXIF and Apply Edits logic onto the Route + final repository = ref.read(remoteAssetRepositoryProvider); + final (edits, exif) = await (repository.getAssetEdits(asset.id), repository.getExif(asset.id)).wait; + if (exif == null || !context.mounted) { + return; + } + + ref.read(editorStateProvider.notifier).init(edits, exif); + unawaited( + context.pushRoute( + DriftEditImageRoute( + image: Image(image: getFullImageProvider(asset, edited: false)), + applyEdits: (newEdits) => applyEdits(ref, asset.id, newEdits), + ), + ), + ); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to open the editor for the asset"); + } + } +} + +@visibleForTesting +Future applyEdits(WidgetRef ref, String remoteId, List edits) async { + final websocket = ref.read(websocketProvider.notifier); + + bool isCurrentId(dynamic data) => data is Map && (data['asset'] as Map?)?['id'] == remoteId; + await ref.read(assetServiceProvider).applyEdits(remoteId, edits); + await Future.any([ + websocket.waitForEvent('AssetEditReadyV1', isCurrentId, const .new(seconds: 10)), + websocket.waitForEvent('AssetEditReadyV2', isCurrentId, const .new(seconds: 10)), + ]).catchError((_) {}); +} diff --git a/mobile/lib/presentation/actions/edit_datetime.action.dart b/mobile/lib/presentation/actions/edit_datetime.action.dart new file mode 100644 index 0000000000..a3c825c4db --- /dev/null +++ b/mobile/lib/presentation/actions/edit_datetime.action.dart @@ -0,0 +1,100 @@ +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/asset_viewer/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_mobile/utils/timezone.dart'; +import 'package:immich_mobile/widgets/common/date_time_picker.dart'; + +typedef _State = ({List assetIds, RemoteAsset? origin}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + if (assets.isEmpty) { + return null; + } + + return (assetIds: assets.map((asset) => asset.id).toList(growable: false), origin: assets.singleOrNull); +}); + +class EditDateTimeAction extends AssetActionBuilder { + const EditDateTimeAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + if (!ref.watch(_stateProvider(source).select((state) => state != null))) { + return null; + } + + return .new( + icon: Icons.edit_calendar_outlined, + label: context.t.control_bottom_app_bar_edit_time, + onAction: () => _edit(context, ref), + ); + } + + Future _edit(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:assetIds, :origin) = state; + final remoteAssetRepository = ref.read(remoteAssetRepositoryProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + DateTime? initialDate; + String? timeZone; + Duration? offset; + + if (origin != null) { + final exif = await remoteAssetRepository.getExif(origin.id); + + // Prefer the EXIF timezone, so the picker opens on what the asset actually shows. + DateTime dateTime = origin.createdAt.toLocal(); + offset = dateTime.timeZoneOffset; + if (exif?.dateTimeOriginal case final original?) { + timeZone = exif!.timeZone; + (dateTime, offset) = applyTimezoneOffset(dateTime: original, timeZone: exif.timeZone); + } + initialDate = dateTime; + + if (!context.mounted) { + return; + } + } + + final picked = await showDateTimePicker( + context: context, + initialDateTime: initialDate, + initialTZ: timeZone, + initialTZOffset: offset, + ); + if (picked == null || !context.mounted) { + return; + } + + await saveDateTime(context, ref, assetIds, picked); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the date and time for assets"); + } + } +} + +@visibleForTesting +Future saveDateTime(BuildContext context, WidgetRef ref, List assetIds, String dateTime) async { + final message = context.t.edit_date_and_time_action_prompt(count: assetIds.length); + final toastService = ref.read(toastServiceProvider); + + await ref.read(assetServiceProvider).update(assetIds, dateTime: .some(dateTime)); + ref.invalidate(assetExifProvider); + toastService.success(message); +} diff --git a/mobile/lib/presentation/actions/edit_location.action.dart b/mobile/lib/presentation/actions/edit_location.action.dart new file mode 100644 index 0000000000..f83a98099c --- /dev/null +++ b/mobile/lib/presentation/actions/edit_location.action.dart @@ -0,0 +1,85 @@ +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/asset_viewer/asset.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_mobile/widgets/common/location_picker.dart'; +import 'package:maplibre_gl/maplibre_gl.dart'; + +typedef _State = ({List assetIds, RemoteAsset? origin}); + +final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, source) { + final assets = ref.watch(ownedAssetsActionProvider(source)); + if (assets.isEmpty) { + return null; + } + + return (assetIds: assets.map((asset) => asset.id).toList(growable: false), origin: assets.singleOrNull); +}); + +class EditLocationAction extends AssetActionBuilder { + const EditLocationAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + if (!ref.watch(_stateProvider(source).select((state) => state != null))) { + return null; + } + + return .new( + icon: Icons.edit_location_alt_outlined, + label: context.t.control_bottom_app_bar_edit_location, + onAction: () => _edit(context, ref), + ); + } + + Future _edit(BuildContext context, WidgetRef ref) async { + final state = ref.read(_stateProvider(source)); + if (state == null) { + return; + } + + final (:assetIds, :origin) = state; + final remoteAssetRepository = ref.read(remoteAssetRepositoryProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + LatLng? initialLatLng; + if (origin != null) { + final exif = await remoteAssetRepository.getExif(origin.id); + if (exif?.latitude != null && exif?.longitude != null) { + initialLatLng = LatLng(exif!.latitude!, exif.longitude!); + } + if (!context.mounted) { + return; + } + } + + final location = await showLocationPicker(context: context, initialLatLng: initialLatLng); + if (location == null || !context.mounted) { + return; + } + + await saveLocation(context, ref, assetIds, location); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the location for assets"); + } + } +} + +@visibleForTesting +Future saveLocation(BuildContext context, WidgetRef ref, List assetIds, LatLng location) async { + final message = context.t.edit_location_action_prompt(count: assetIds.length); + final toastService = ref.read(toastServiceProvider); + + await ref.read(assetServiceProvider).update(assetIds, location: .some(location)); + ref.invalidate(assetExifProvider); + toastService.success(message); +} diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart deleted file mode 100644 index e93720186b..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart +++ /dev/null @@ -1,52 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class EditDateTimeActionButton extends ConsumerWidget { - final ActionSource source; - - const EditDateTimeActionButton({super.key, required this.source}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).editDateTime(source, context); - if (result == null) { - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'edit_date_and_time_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - maxWidth: 95.0, - iconData: Icons.edit_calendar_outlined, - label: "control_bottom_app_bar_edit_time".t(context: context), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_image_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_image_action_button.widget.dart deleted file mode 100644 index 564b02d884..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/edit_image_action_button.widget.dart +++ /dev/null @@ -1,59 +0,0 @@ -import 'dart:async'; - -import 'package:auto_route/auto_route.dart'; -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset_edit.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/pages/edit/editor.provider.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/images/image_provider.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; -import 'package:immich_mobile/routing/router.dart'; - -class EditImageActionButton extends ConsumerWidget { - const EditImageActionButton({super.key}); - - @override - Widget build(BuildContext context, WidgetRef ref) { - final currentAsset = ref.watch(assetViewerProvider.select((s) => s.currentAsset)); - - Future editImage(List edits) async { - if (currentAsset == null || currentAsset.remoteId == null) { - return; - } - - await ref.read(actionProvider.notifier).applyEdits(ActionSource.viewer, edits); - } - - Future onPress() async { - if (currentAsset == null || currentAsset.remoteId == null) { - return; - } - - final imageProvider = getFullImageProvider(currentAsset, edited: false); - - final image = Image(image: imageProvider); - final (edits, exifInfo) = await ( - ref.read(remoteAssetRepositoryProvider).getAssetEdits(currentAsset.remoteId!), - ref.read(remoteAssetRepositoryProvider).getExif(currentAsset.remoteId!), - ).wait; - - if (exifInfo == null) { - return; - } - - ref.read(editorStateProvider.notifier).init(edits, exifInfo); - await context.pushRoute(DriftEditImageRoute(image: image, applyEdits: editImage)); - } - - return BaseActionButton( - iconData: Icons.tune, - label: "edit".t(context: context), - onPressed: onPress, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart deleted file mode 100644 index b250e325ce..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/edit_location_action_button.widget.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class EditLocationActionButton extends ConsumerWidget { - final ActionSource source; - - const EditLocationActionButton({super.key, required this.source}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).editLocation(source, context); - if (result == null) { - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'edit_location_action_prompt'.t(context: context, args: {'count': result.count.toString()}); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.edit_location_alt_outlined, - label: "control_bottom_app_bar_edit_location".t(context: context), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart index 2dc1c40456..eff5705eae 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/date_time_details.widget.dart @@ -9,6 +9,7 @@ import 'package:immich_mobile/domain/models/exif.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/duration_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/sheet_tile.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; @@ -28,16 +29,15 @@ class DateTimeDetails extends ConsumerWidget { final asset = this.asset; final exifInfo = this.exifInfo; final isOwner = ref.watch(currentUserProvider)?.id == (asset is RemoteAsset ? asset.ownerId : null); + final editDateTime = const EditDateTimeAction(source: .viewer).create(context, ref); return Column( children: [ SheetTile( title: _getDateTime(context, asset, exifInfo), titleStyle: context.textTheme.labelLarge, - trailing: asset.hasRemote && isOwner ? const Icon(Icons.edit, size: 18) : null, - onTap: asset.hasRemote && isOwner - ? () async => await ref.read(actionProvider.notifier).editDateTime(ActionSource.viewer, context) - : null, + trailing: editDateTime == null ? null : const Icon(Icons.edit, size: 18), + onTap: editDateTime?.onAction, ), if (exifInfo != null) _SheetAssetDescription(exif: exifInfo, isEditable: isOwner), ], diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart index 8edfca5bf1..c6d048e458 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_details/location_details.widget.dart @@ -2,14 +2,13 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/models/exif.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/sheet_tile.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; import 'package:immich_mobile/widgets/asset_viewer/detail_panel/exif_map.dart'; import 'package:maplibre_gl/maplibre_gl.dart'; @@ -55,10 +54,6 @@ class _LocationDetailsState extends ConsumerState { } } - Future editLocation() async { - await ref.read(actionProvider.notifier).editLocation(ActionSource.viewer, context); - } - @override Widget build(BuildContext context) { final asset = widget.asset; @@ -70,6 +65,7 @@ class _LocationDetailsState extends ConsumerState { return const SizedBox.shrink(); } + final editLocation = const EditLocationAction(source: .viewer).create(context, ref); final locationName = _getLocationName(exifInfo); final coordinates = "${exifInfo?.latitude?.toStringAsFixed(4)}, ${exifInfo?.longitude?.toStringAsFixed(4)}"; @@ -81,8 +77,8 @@ class _LocationDetailsState extends ConsumerState { SheetTile( title: 'location'.t(context: context), titleStyle: context.textTheme.labelLarge?.copyWith(color: context.colorScheme.onSurfaceSecondary), - trailing: hasCoordinates ? const Icon(Icons.edit_location_alt, size: 20) : null, - onTap: editLocation, + trailing: hasCoordinates && editLocation != null ? const Icon(Icons.edit_location_alt, size: 20) : null, + onTap: editLocation?.onAction, ), if (hasCoordinates) Padding( @@ -117,7 +113,7 @@ class _LocationDetailsState extends ConsumerState { color: context.primaryColor, ), leading: const Icon(Icons.location_off), - onTap: editLocation, + onTap: editLocation?.onAction, ), ], ), diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart index 33eb917c69..e86088cb2d 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart @@ -5,9 +5,9 @@ import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_asset.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/add_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_image_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/ocr_toggle_button.widget.dart'; @@ -15,8 +15,6 @@ import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart' import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; -import 'package:immich_mobile/utils/semver.dart'; import 'package:immich_mobile/widgets/asset_viewer/video_controls.dart'; import 'package:immich_ui/immich_ui.dart'; @@ -41,7 +39,6 @@ class ViewerBottomBar extends ConsumerWidget { final isReadonlyModeEnabled = ref.watch(readonlyModeProvider); final showingDetails = ref.watch(assetViewerProvider.select((s) => s.showingDetails)); final isInLockedView = ref.watch(inLockedViewProvider); - final serverInfo = ref.watch(serverInfoProvider); final isInTrash = ref.read(timelineServiceProvider).origin == TimelineOrigin.trash; final originalTheme = context.themeData; @@ -53,9 +50,7 @@ class ViewerBottomBar extends ConsumerWidget { if (!isInLockedView) ...[ if (!isInTrash) ...[ if (asset.isLocalOnly) const UploadActionButton(source: ActionSource.viewer), - // edit sync was added in 2.6.0 - if (asset.isEditable && serverInfo.serverVersion >= const SemVer(major: 2, minor: 6, patch: 0)) - const EditImageActionButton(), + ..._actionColumnButtons(context, ref, const [EditAssetAction(source: .viewer)]), if (asset.hasRemote) AddActionButton(originalTheme: originalTheme), ], ..._actionColumnButtons(context, ref, const [DeleteAction(source: .viewer)]), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index c8e62c8ec1..9290e157b3 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -6,12 +6,12 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; @@ -83,8 +83,8 @@ class _ArchiveBottomSheetState extends ConsumerState { const ActionColumnButton(action: FavoriteAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), const ActionColumnButton(action: DeleteAction(source: .timeline)), - const EditDateTimeActionButton(source: ActionSource.timeline), - const EditLocationActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), + const ActionColumnButton(action: EditLocationAction(source: .timeline)), const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index ece09d5a76..ac0dd14922 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -7,12 +7,12 @@ import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; @@ -83,8 +83,8 @@ class FavoriteBottomSheet extends ConsumerWidget { const ActionColumnButton(action: ArchiveAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), const ActionColumnButton(action: DeleteAction(source: .timeline)), - const EditDateTimeActionButton(source: ActionSource.timeline), - const EditLocationActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), + const ActionColumnButton(action: EditLocationAction(source: .timeline)), const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index c2bf3edf96..0ca4af56ce 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -6,13 +6,13 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; @@ -90,8 +90,8 @@ class _GeneralBottomSheetState extends ConsumerState { const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ActionColumnButton(action: ArchiveAction(source: .timeline)), if (tagsEnabled) const BulkTagAssetsActionButton(source: ActionSource.timeline), - const EditDateTimeActionButton(source: ActionSource.timeline), - const EditLocationActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), + const ActionColumnButton(action: EditLocationAction(source: .timeline)), const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], diff --git a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart index a9175577b0..f273a70dfe 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart @@ -6,12 +6,12 @@ import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_date_time_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/edit_location_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; @@ -97,8 +97,8 @@ class _RemoteAlbumBottomSheetState extends ConsumerState const DownloadActionButton(source: ActionSource.timeline), if (ownsAlbum) ...[ const ActionColumnButton(action: DeleteAction(source: .timeline)), - const EditDateTimeActionButton(source: ActionSource.timeline), - const EditLocationActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), + const ActionColumnButton(action: EditLocationAction(source: .timeline)), const ActionColumnButton(action: LockAction(source: .timeline)), const ActionColumnButton(action: StackAction(source: .timeline)), ], diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index 2222cbf722..d9ca0df303 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -6,23 +6,17 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/asset_edit.model.dart'; import 'package:immich_mobile/domain/services/remote_album.service.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/asset_viewer/asset.provider.dart' show assetExifProvider; import 'package:immich_mobile/providers/infrastructure/tag.provider.dart'; -import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/providers/websocket.provider.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/services/action.service.dart'; import 'package:immich_mobile/services/foreground_upload.service.dart'; -import 'package:immich_mobile/utils/semver.dart'; import 'package:logging/logging.dart'; -import 'package:openapi/api.dart'; final actionProvider = NotifierProvider(ActionNotifier.new, dependencies: [multiSelectProvider]); @@ -119,50 +113,6 @@ class ActionNotifier extends Notifier { } } - Future editLocation(ActionSource source, BuildContext context) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - final isEdited = await _service.editLocation(ids, context); - if (!isEdited) { - return null; - } - - // This must be called since editing location - // does not update the currentAsset which means - // the exif provider will not be refreshed automatically - if (source == ActionSource.viewer) { - final currentAsset = ref.read(assetViewerProvider).currentAsset; - if (currentAsset != null) { - ref.invalidate(assetExifProvider(currentAsset)); - } - } - - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to edit location for assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future editDateTime(ActionSource source, BuildContext context) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - final isEdited = await _service.editDateTime(ids, context); - if (!isEdited) { - return null; - } - - if (source == ActionSource.viewer) { - ref.invalidate(assetExifProvider); - } - - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to edit date and time for assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future tagAssets(ActionSource source, BuildContext context) async { final ids = _getOwnedRemoteIdsForSource(source); try { @@ -405,37 +355,6 @@ class ActionNotifier extends Notifier { }); } } - - Future applyEdits(ActionSource source, List edits) async { - final ids = _getOwnedRemoteIdsForSource(source); - - if (ids.length != 1) { - _logger.warning('applyEdits called with multiple assets, expected single asset'); - return ActionResult(count: ids.length, success: false, error: 'Expected single asset for applying edits'); - } - - Future editReady; - if (ref.read(serverInfoProvider).serverVersion >= const SemVer(major: 3, minor: 0, patch: 0)) { - editReady = ref.read(websocketProvider.notifier).waitForEvent("AssetEditReadyV2", (dynamic data) { - final eventAsset = SyncAssetV2.fromJson(data["asset"]); - return eventAsset?.id == ids.first; - }, const Duration(seconds: 10)); - } else { - editReady = ref.read(websocketProvider.notifier).waitForEvent("AssetEditReadyV1", (dynamic data) { - final eventAsset = SyncAssetV1.fromJson(data["asset"]); - return eventAsset?.id == ids.first; - }, const Duration(seconds: 10)); - } - - try { - await _service.applyEdits(ids.first, edits); - await editReady; - return const ActionResult(count: 1, success: true); - } catch (error, stack) { - _logger.severe('Failed to apply edits to assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } } extension on Iterable { diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index 28e2d27c7e..415a9c578b 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/asset_edit.model.dart'; import 'package:immich_mobile/domain/services/tag.service.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_album.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; @@ -16,11 +15,7 @@ import 'package:immich_mobile/repositories/asset_media.repository.dart'; import 'package:immich_mobile/repositories/download.repository.dart'; import 'package:immich_mobile/repositories/drift_album_api_repository.dart'; import 'package:immich_mobile/routing/router.dart'; -import 'package:immich_mobile/utils/timezone.dart'; -import 'package:immich_mobile/widgets/common/date_time_picker.dart'; -import 'package:immich_mobile/widgets/common/location_picker.dart'; import 'package:immich_mobile/widgets/common/tag_picker.dart'; -import 'package:maplibre_gl/maplibre_gl.dart' as maplibre; final actionServiceProvider = Provider( (ref) => ActionService( @@ -69,91 +64,6 @@ class ActionService { return count; } - Future editLocation(List remoteIds, BuildContext context) async { - maplibre.LatLng? initialLatLng; - if (remoteIds.length == 1) { - final exif = await _remoteAssetRepository.getExif(remoteIds[0]); - - if (exif?.latitude != null && exif?.longitude != null) { - initialLatLng = maplibre.LatLng(exif!.latitude!, exif.longitude!); - } - } - - if (!context.mounted) { - return false; - } - - final location = await showLocationPicker(context: context, initialLatLng: initialLatLng); - - if (location == null) { - return false; - } - - await _assetApiRepository.updateLocation(remoteIds, location); - await _remoteAssetRepository.updateLocation(remoteIds, location); - - return true; - } - - Future editDateTime(List remoteIds, BuildContext context) async { - DateTime? initialDate; - String? timeZone; - Duration? offset; - - if (remoteIds.length == 1) { - final assetId = remoteIds.first; - final asset = await _remoteAssetRepository.get(assetId); - if (asset == null) { - return false; - } - - final exifData = await _remoteAssetRepository.getExif(assetId); - - // Use EXIF timezone information if available (matching web app and display behavior) - DateTime dt = asset.createdAt.toLocal(); - offset = dt.timeZoneOffset; - - if (exifData?.dateTimeOriginal != null) { - timeZone = exifData!.timeZone; - (dt, offset) = applyTimezoneOffset(dateTime: exifData.dateTimeOriginal!, timeZone: exifData.timeZone); - } - - initialDate = dt; - } - - if (!context.mounted) { - return false; - } - - final dateTime = await showDateTimePicker( - context: context, - initialDateTime: initialDate, - initialTZ: timeZone, - initialTZOffset: offset, - ); - - if (dateTime == null) { - return false; - } - - await applyDateTime(remoteIds, dateTime); - - return true; - } - - @visibleForTesting - Future applyDateTime(List remoteIds, String dateTime) async { - final parsedDateTime = DateTime.parse(dateTime); - final offset = RegExp(r'[+-]\d{2}:\d{2}$').firstMatch(dateTime)?.group(0); - - await _assetApiRepository.updateDateTime(remoteIds, dateTime); - await _remoteAssetRepository.updateDateTime( - remoteIds, - parsedDateTime, - timeZone: offset == null ? null : 'UTC$offset', - ); - } - Future removeFromAlbum(List remoteIds, String albumId) async { final result = await _albumApiRepository.removeAssets(albumId, remoteIds); if (result.removed.isNotEmpty) { @@ -224,12 +134,4 @@ class ActionService { await _remoteAlbumRepository.update(updatedAlbum); return true; } - - Future applyEdits(String remoteId, List edits) async { - if (edits.isEmpty) { - await _assetApiRepository.removeEdits(remoteId); - } else { - await _assetApiRepository.editAsset(remoteId, edits); - } - } } diff --git a/mobile/test/providers/infrastructure/action_provider_test.dart b/mobile/test/providers/infrastructure/action_provider_test.dart deleted file mode 100644 index 7f5c8d4ec2..0000000000 --- a/mobile/test/providers/infrastructure/action_provider_test.dart +++ /dev/null @@ -1,112 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/user.model.dart'; -import 'package:immich_mobile/domain/services/asset.service.dart'; -import 'package:immich_mobile/domain/services/user.service.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/asset_viewer/asset.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/services/action.service.dart'; -import 'package:immich_mobile/services/foreground_upload.service.dart'; -import 'package:mocktail/mocktail.dart'; - -class MockActionService extends Mock implements ActionService {} - -class MockAssetService extends Mock implements AssetService {} - -class MockForegroundUploadService extends Mock implements ForegroundUploadService {} - -class MockUserService extends Mock implements UserService {} - -class FakeBuildContext extends Fake implements BuildContext {} - -final _user = UserDto(id: 'user-1', email: 'user@test.dev', name: 'user', profileChangedAt: DateTime(2026)); - -final _asset = RemoteAsset( - id: 'asset-1', - name: 'photo.jpg', - ownerId: 'user-1', - checksum: 'checksum-1', - type: AssetType.image, - createdAt: DateTime(2026, 6, 10, 10, 27), - updatedAt: DateTime(2026, 6, 10, 10, 27), - isEdited: false, -); - -void main() { - late ProviderContainer container; - late MockActionService actionService; - late MockAssetService assetService; - - setUpAll(() { - registerFallbackValue(FakeBuildContext()); - registerFallbackValue(_asset); - registerFallbackValue([]); - }); - - setUp(() { - actionService = MockActionService(); - assetService = MockAssetService(); - final userService = MockUserService(); - - when(() => actionService.editDateTime(any(), any())).thenAnswer((_) async => true); - when(() => assetService.watchAsset(any())).thenAnswer((_) => const Stream.empty()); - when(() => assetService.getExif(any())).thenAnswer((_) async => null); - when(() => userService.tryGetMyUser()).thenReturn(_user); - when(() => userService.watchMyUser()).thenAnswer((_) => const Stream.empty()); - - container = ProviderContainer( - overrides: [ - actionServiceProvider.overrideWithValue(actionService), - assetServiceProvider.overrideWithValue(assetService), - foregroundUploadServiceProvider.overrideWithValue(MockForegroundUploadService()), - currentUserProvider.overrideWith((ref) => CurrentUserProvider(userService)), - ], - ); - addTearDown(container.dispose); - }); - - group('editDateTime', () { - test('refreshes the exif provider when editing from the viewer', () async { - container.read(assetViewerProvider.notifier).setAsset(_asset); - container.listen(assetExifProvider(_asset), (_, __) {}); - await container.read(assetExifProvider(_asset).future); - - final result = await container.read(actionProvider.notifier).editDateTime(ActionSource.viewer, FakeBuildContext()); - - expect(result?.success, isTrue); - await container.read(assetExifProvider(_asset).future); - verify(() => assetService.getExif(_asset)).called(2); - }); - - test('leaves the exif provider cached when editing from the timeline', () async { - container.read(assetViewerProvider.notifier).setAsset(_asset); - container.listen(assetExifProvider(_asset), (_, __) {}); - await container.read(assetExifProvider(_asset).future); - - final result = await container.read(actionProvider.notifier).editDateTime(ActionSource.timeline, FakeBuildContext()); - - expect(result?.success, isTrue); - await container.read(assetExifProvider(_asset).future); - verify(() => assetService.getExif(_asset)).called(1); - }); - - test('does not refresh the exif provider when the edit is cancelled', () async { - when(() => actionService.editDateTime(any(), any())).thenAnswer((_) async => false); - container.read(assetViewerProvider.notifier).setAsset(_asset); - container.listen(assetExifProvider(_asset), (_, __) {}); - await container.read(assetExifProvider(_asset).future); - - final result = await container.read(actionProvider.notifier).editDateTime(ActionSource.viewer, FakeBuildContext()); - - expect(result, isNull); - await container.read(assetExifProvider(_asset).future); - verify(() => assetService.getExif(_asset)).called(1); - }); - }); -} diff --git a/mobile/test/riverpod_mocks.dart b/mobile/test/riverpod_mocks.dart new file mode 100644 index 0000000000..24867b226e --- /dev/null +++ b/mobile/test/riverpod_mocks.dart @@ -0,0 +1,8 @@ +import 'package:immich_mobile/models/server_info/server_version.model.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; + +class StubServerInfoNotifier extends ServerInfoNotifier { + StubServerInfoNotifier(super.serverInfoService, {required ServerVersion version}) { + state = state.copyWith(serverVersion: version); + } +} diff --git a/mobile/test/services/action.service_test.dart b/mobile/test/services/action.service_test.dart index 76f02e29d0..0a1fbf08bc 100644 --- a/mobile/test/services/action.service_test.dart +++ b/mobile/test/services/action.service_test.dart @@ -89,46 +89,4 @@ void main() { }); }); - group('ActionService.applyDateTime', () { - const ids = ['asset_id_1']; - - test('sends the picked value to the api with its offset intact', () async { - const picked = '2026-06-10T19:15:00.000+06:00'; - when(() => assetApiRepository.updateDateTime(ids, picked)).thenAnswer((_) async {}); - when( - () => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: 'UTC+06:00'), - ).thenAnswer((_) async {}); - - await sut.applyDateTime(ids, picked); - - verify(() => assetApiRepository.updateDateTime(ids, picked)).called(1); - verify(() => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: 'UTC+06:00')).called(1); - }); - - test('handles negative offsets', () async { - const picked = '2026-01-05T08:00:00.000-05:30'; - when(() => assetApiRepository.updateDateTime(ids, picked)).thenAnswer((_) async {}); - when( - () => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: 'UTC-05:30'), - ).thenAnswer((_) async {}); - - await sut.applyDateTime(ids, picked); - - verify(() => assetApiRepository.updateDateTime(ids, picked)).called(1); - verify(() => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: 'UTC-05:30')).called(1); - }); - - test('writes no timezone when the value has no offset', () async { - const picked = '2026-06-10T13:15:00.000Z'; - when(() => assetApiRepository.updateDateTime(ids, picked)).thenAnswer((_) async {}); - when( - () => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: null), - ).thenAnswer((_) async {}); - - await sut.applyDateTime(ids, picked); - - verify(() => assetApiRepository.updateDateTime(ids, picked)).called(1); - verify(() => remoteAssetRepository.updateDateTime(ids, DateTime.parse(picked), timeZone: null)).called(1); - }); - }); } diff --git a/mobile/test/unit/presentation/actions/edit_action_test.dart b/mobile/test/unit/presentation/actions/edit_action_test.dart new file mode 100644 index 0000000000..063301f9c4 --- /dev/null +++ b/mobile/test/unit/presentation/actions/edit_action_test.dart @@ -0,0 +1,172 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/models/server_info/server_version.model.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/edit_asset.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; +import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; +import 'package:immich_mobile/providers/server_info.provider.dart'; +import 'package:immich_mobile/utils/option.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:maplibre_gl/maplibre_gl.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../riverpod_mocks.dart'; +import '../../../service.mocks.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockAssetService assetService; + + setUp(() async { + context = await PresentationContext.create(); + assetService = context.service.asset.service; + }); + + tearDown(() { + context.dispose(); + }); + + RemoteAsset owned({AssetType type = .image}) => + RemoteAssetFactory.create(ownerId: context.currentUser.id, type: type); + + const supportedVersion = ServerVersion(major: 2, minor: 6, patch: 0); + + List reportedVersion(ServerVersion version) => [ + serverInfoProvider.overrideWith((ref) => StubServerInfoNotifier(context.service.serverInfo, version: version)), + ]; + + late BuildContext actionContext; + late WidgetRef actionRef; + + Future pumpAction( + WidgetTester tester, + ActionBuilder action, + Set selection, { + List overrides = const [], + }) => tester.pumpTestWidget( + context, + Consumer( + builder: (widgetContext, ref, _) { + actionContext = widgetContext; + actionRef = ref; + return ActionIconButton(action: action); + }, + ), + overrides: [...context.selected(selection), ...overrides], + ); + + group('EditAssetAction', () { + Future pumpEditAsset( + WidgetTester tester, + Set selection, { + ServerVersion version = supportedVersion, + }) => pumpAction( + tester, + const EditAssetAction(source: .timeline), + selection, + overrides: [...reportedVersion(version)], + ); + + testWidgets('offers to edit a single owned editable asset', (tester) async { + await pumpEditAsset(tester, {owned()}); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden when the server predates edit sync', (tester) async { + await pumpEditAsset(tester, {owned()}, version: const ServerVersion(major: 2, minor: 5, patch: 9)); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden for more than one asset', (tester) async { + await pumpEditAsset(tester, {owned(), owned()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden for an asset owned by someone else', (tester) async { + await pumpEditAsset(tester, {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden for a non-editable asset', (tester) async { + await pumpEditAsset(tester, {owned(type: .video)}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('reads the edits and exif for the asset it is about to open', (tester) async { + final asset = owned(); + + await pumpEditAsset(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await tester.pump(); + + verify(() => context.repository.remoteAsset.repo.getAssetEdits(asset.id)).called(1); + verify(() => context.repository.remoteAsset.repo.getExif(asset.id)).called(1); + }); + }); + + group('EditLocationAction', () { + testWidgets('offers to edit an owned remote asset', (tester) async { + await pumpAction(tester, const EditLocationAction(source: .timeline), {owned()}); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden without any owned remote asset', (tester) async { + await pumpAction(tester, const EditLocationAction(source: .timeline), {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('saves the location against every owned asset and toasts the count', (tester) async { + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpAction(tester, const EditLocationAction(source: .timeline), {mine, theirs}); + await saveLocation(actionContext, actionRef, [mine.id], const LatLng(1, 2)); + await tester.pumpAndSettle(); + + final location = + verify(() => assetService.update([mine.id], location: captureAny(named: 'location'))).captured.single + as Option; + expect(location.unwrapOrNull?.latitude, 1); + expect(location.unwrapOrNull?.longitude, 2); + }); + }); + + group('EditDateTimeAction', () { + testWidgets('offers to edit an owned remote asset', (tester) async { + await pumpAction(tester, const EditDateTimeAction(source: .timeline), {owned()}); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden without any owned remote asset', (tester) async { + await pumpAction(tester, const EditDateTimeAction(source: .timeline), {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('saves the date against every owned asset and toasts the count', (tester) async { + const picked = '2026-06-10T19:15:00.000+06:00'; + final mine = owned(); + final theirs = RemoteAssetFactory.create(); + + await pumpAction(tester, const EditDateTimeAction(source: .timeline), {mine, theirs}); + await saveDateTime(actionContext, actionRef, [mine.id], picked); + await tester.pumpAndSettle(); + + verify(() => assetService.update([mine.id], dateTime: const Some(picked))).called(1); + }); + }); +} diff --git a/mobile/test/unit/presentation/presentation_context.dart b/mobile/test/unit/presentation/presentation_context.dart index 2e5871a419..ba12183652 100644 --- a/mobile/test/unit/presentation/presentation_context.dart +++ b/mobile/test/unit/presentation/presentation_context.dart @@ -54,6 +54,7 @@ class PresentationContext { gCastServiceProvider.overrideWithValue(service.cast), serverInfoServiceProvider.overrideWithValue(service.serverInfo), inLockedViewProvider.overrideWithValue(false), + remoteAssetRepositoryProvider.overrideWithValue(repository.remoteAsset.repo), ]; List selected(Set assets) => [ From 0a97b4b099a891feb6582fcc768132542bd7be66 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:42 +0530 Subject: [PATCH 51/69] refactor: mobile share actions (#29947) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../presentation/actions/share.action.dart | 164 +++++++++++++++ .../actions/share_link.action.dart | 33 +++ .../share_action_button.widget.dart | 192 ------------------ .../share_link_action_button.widget.dart | 33 --- .../asset_viewer/bottom_bar.widget.dart | 4 +- .../archive_bottom_sheet.widget.dart | 8 +- .../favorite_bottom_sheet.widget.dart | 8 +- .../general_bottom_sheet.widget.dart | 8 +- .../local_album_bottom_sheet.widget.dart | 4 +- .../locked_folder_bottom_sheet.widget.dart | 4 +- .../partner_detail_bottom_sheet.widget.dart | 5 +- .../remote_album_bottom_sheet.widget.dart | 8 +- .../infrastructure/action.provider.dart | 35 ---- mobile/lib/services/action.service.dart | 27 --- mobile/lib/utils/action_button.utils.dart | 12 +- mobile/test/services/action.service_test.dart | 4 - .../share_action_button_test.dart | 117 ----------- .../actions/share_action_test.dart | 159 +++++++++++++++ .../presentation/presentation_context.dart | 2 + 19 files changed, 387 insertions(+), 440 deletions(-) create mode 100644 mobile/lib/presentation/actions/share.action.dart create mode 100644 mobile/lib/presentation/actions/share_link.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart delete mode 100644 mobile/test/unit/presentation/action_buttons/share_action_button_test.dart create mode 100644 mobile/test/unit/presentation/actions/share_action_test.dart diff --git a/mobile/lib/presentation/actions/share.action.dart b/mobile/lib/presentation/actions/share.action.dart new file mode 100644 index 0000000000..4c36493265 --- /dev/null +++ b/mobile/lib/presentation/actions/share.action.dart @@ -0,0 +1,164 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/repositories/asset_media.repository.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final shareable = assets.toList(growable: false); + return shareable.isEmpty ? null : shareable; +}); + +class ShareAction extends AssetActionBuilder { + const ShareAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assets = ref.watch(_stateProvider(source)); + if (assets == null) { + return null; + } + + return .new( + icon: CurrentPlatform.isAndroid ? Icons.share_rounded : Icons.ios_share_rounded, + label: context.t.share, + onAction: () => _share(context, ref, assets, ref.read(appConfigProvider).share.fileType), + onSecondaryAction: () => _promptQualityAndShare(context, ref, assets), + ); + } + + Future _promptQualityAndShare(BuildContext context, WidgetRef ref, List assets) async { + // Only show preview option when at least one of the assets is not a video + final showPreview = assets.any((asset) => !asset.isVideo); + + final fileType = await showDialog( + context: context, + builder: (_) => _ShareFileTypeDialog(showPreview: showPreview), + useRootNavigator: false, + ); + if (fileType == null || !context.mounted) { + return; + } + + await _share(context, ref, assets, fileType); + } + + Future _share(BuildContext context, WidgetRef ref, List assets, ShareAssetType fileType) async { + final cancelCompleter = Completer(); + final progress = ValueNotifier(null); + final mediaRepository = ref.read(assetMediaRepositoryProvider); + final toastService = ref.read(toastServiceProvider); + final errorMessage = context.t.scaffold_body_error_occurred; + + await showDialog( + context: context, + barrierDismissible: false, + useRootNavigator: false, + builder: (dialogContext) { + void finish({required bool failed}) { + if (cancelCompleter.isCompleted || !dialogContext.mounted) { + return; + } + if (failed) { + unawaited(.value(toastService.error(errorMessage))); + } + dialogContext.pop(); + } + + unawaited( + mediaRepository + .shareAssets( + assets, + context, + fileType: fileType, + cancelCompleter: cancelCompleter, + onAssetDownloadProgress: (value) => progress.value = value, + ) + .then((count) => finish(failed: count == 0), onError: (_) => finish(failed: true)), + ); + + return _SharePreparingDialog(progress: progress); + }, + ).then((_) { + if (!cancelCompleter.isCompleted) { + cancelCompleter.complete(); + } + progress.dispose(); + }); + } +} + +class _SharePreparingDialog extends StatelessWidget { + final ValueNotifier progress; + + const _SharePreparingDialog({required this.progress}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + content: Column( + mainAxisSize: .min, + children: [ + Container(margin: const .only(bottom: 12), child: Text(context.t.share_dialog_preparing)), + SizedBox( + width: 240, + child: ValueListenableBuilder( + valueListenable: progress, + builder: (context, value, _) { + final percent = value == null ? null : (value * 100).clamp(0, 100); + return Column( + mainAxisSize: .min, + children: [ + LinearProgressIndicator(value: value, minHeight: 8.0), + if (percent != null) + Container(margin: const .only(top: 8), child: Text('${percent.toStringAsFixed(0)}%')), + ], + ); + }, + ), + ), + ], + ), + ); + } +} + +class _ShareFileTypeDialog extends StatelessWidget { + final bool showPreview; + + const _ShareFileTypeDialog({this.showPreview = true}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + title: Text(context.t.select_quality), + contentPadding: const .symmetric(vertical: 8), + content: Column( + mainAxisSize: .min, + children: [ + ListTile( + leading: const Icon(Icons.high_quality_rounded), + title: Text(context.t.share_original), + onTap: () => context.pop(ShareAssetType.original), + ), + if (showPreview) + ListTile( + leading: const Icon(Icons.photo_size_select_large_rounded), + title: Text(context.t.share_preview), + onTap: () => context.pop(ShareAssetType.preview), + ), + ], + ), + actions: [TextButton(onPressed: () => context.pop(), child: Text(context.t.cancel))], + ); + } +} diff --git a/mobile/lib/presentation/actions/share_link.action.dart b/mobile/lib/presentation/actions/share_link.action.dart new file mode 100644 index 0000000000..1966dd8811 --- /dev/null +++ b/mobile/lib/presentation/actions/share_link.action.dart @@ -0,0 +1,33 @@ +import 'dart:async'; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/routing/router.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final remoteIds = assets.remote().map((asset) => asset.id).toList(growable: false); + return remoteIds.isEmpty ? null : remoteIds; +}); + +class ShareLinkAction extends AssetActionBuilder { + const ShareLinkAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final remoteIds = ref.watch(_stateProvider(source)); + if (remoteIds == null) { + return null; + } + + return .new( + icon: Icons.link_rounded, + label: context.t.share_link, + onAction: () async => unawaited(context.pushRoute(SharedLinkEditRoute(assetsList: remoteIds))), + ); + } +} diff --git a/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart deleted file mode 100644 index eadcf0a81e..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/share_action_button.widget.dart +++ /dev/null @@ -1,192 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/generated/translations.g.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/settings.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class _SharePreparingDialog extends StatelessWidget { - final ValueNotifier progress; - - const _SharePreparingDialog({required this.progress}); - - @override - Widget build(BuildContext context) { - return AlertDialog( - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container(margin: const EdgeInsets.only(bottom: 12), child: const Text('share_dialog_preparing').tr()), - SizedBox( - width: 240, - child: ValueListenableBuilder( - valueListenable: progress, - builder: (context, value, _) { - final percent = value == null ? null : (value * 100).clamp(0, 100); - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - LinearProgressIndicator(value: value, minHeight: 8.0), - if (percent != null) - Container(margin: const EdgeInsets.only(top: 8), child: Text('${percent.toStringAsFixed(0)}%')), - ], - ); - }, - ), - ), - ], - ), - ); - } -} - -class _ShareFileTypeDialog extends StatelessWidget { - final bool showPreview; - - const _ShareFileTypeDialog({this.showPreview = true}); - - @override - Widget build(BuildContext context) { - return AlertDialog( - title: Text(context.t.select_quality), - contentPadding: const EdgeInsets.symmetric(vertical: 8), - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - ListTile( - leading: const Icon(Icons.high_quality_rounded), - title: Text(context.t.share_original), - onTap: () => context.pop(ShareAssetType.original), - ), - if (showPreview) - ListTile( - leading: const Icon(Icons.photo_size_select_large_rounded), - title: Text(context.t.share_preview), - onTap: () => context.pop(ShareAssetType.preview), - ), - ], - ), - actions: [TextButton(onPressed: () => context.pop(), child: Text(context.t.cancel))], - ); - } -} - -class ShareActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const ShareActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Set _getSelectedAssets(WidgetRef ref) { - return switch (source) { - ActionSource.timeline => ref.read(multiSelectProvider).selectedAssets, - ActionSource.viewer => switch (ref.read(assetViewerProvider).currentAsset) { - final BaseAsset asset => {asset}, - null => const {}, - }, - }; - } - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final fileType = ref.read(appConfigProvider).share.fileType; - await _share(context, ref, fileType); - } - - Future _onLongPress(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - // only show preview option when at least one of the assets is not a video - // we cant share previews of videos - final assets = _getSelectedAssets(ref); - final showPreview = assets.isEmpty || assets.any((asset) => !asset.isVideo); - - final fileType = await showDialog( - context: context, - builder: (_) => _ShareFileTypeDialog(showPreview: showPreview), - useRootNavigator: false, - ); - - if (fileType == null || !context.mounted) { - return; - } - - await _share(context, ref, fileType); - } - - Future _share(BuildContext context, WidgetRef ref, ShareAssetType fileType) async { - final cancelCompleter = Completer(); - final progress = ValueNotifier(null); - final preparingDialog = _SharePreparingDialog(progress: progress); - await showDialog( - context: context, - builder: (BuildContext buildContext) { - unawaited( - ref - .read(actionProvider.notifier) - .shareAssets( - source, - context, - fileType: fileType, - cancelCompleter: cancelCompleter, - onAssetDownloadProgress: (value) => progress.value = value, - ) - .then((ActionResult result) { - if (cancelCompleter.isCompleted || !context.mounted) { - return; - } - - if (!result.success) { - ImmichToast.show( - context: context, - msg: context.t.scaffold_body_error_occurred, - gravity: ToastGravity.BOTTOM, - toastType: ToastType.error, - ); - } - - buildContext.pop(); - }), - ); - - return preparingDialog; - }, - barrierDismissible: false, - useRootNavigator: false, - ).then((_) { - if (!cancelCompleter.isCompleted) { - cancelCompleter.complete(); - } - progress.dispose(); - }); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Platform.isAndroid ? Icons.share_rounded : Icons.ios_share_rounded, - label: context.t.share, - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - onLongPressed: () => _onLongPress(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart deleted file mode 100644 index dfe8fad025..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/share_link_action_button.widget.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; - -class ShareLinkActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const ShareLinkActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - await ref.read(actionProvider.notifier).shareLink(source, context); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.link_rounded, - label: "share_link".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart index e86088cb2d..c1f6ec8b47 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart @@ -7,8 +7,8 @@ import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/edit_asset.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/add_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/ocr_toggle_button.widget.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; @@ -45,7 +45,7 @@ class ViewerBottomBar extends ConsumerWidget { final actions = [ ..._actionColumnButtons(context, ref, const [RestoreAction(source: .viewer)]), - const ShareActionButton(source: .viewer), + ..._actionColumnButtons(context, ref, const [ShareAction(source: .viewer)]), if (!isInLockedView) ...[ if (!isInTrash) ...[ diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index 9290e157b3..e8499ad967 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -10,10 +10,10 @@ import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -76,9 +76,9 @@ class _ArchiveBottomSheetState extends ConsumerState { maxChildSize: 0.85, shouldCloseOnMinExtent: false, actions: [ - const ShareActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ShareAction(source: .timeline)), if (multiselect.hasRemote) ...[ - const ShareLinkActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ShareLinkAction(source: .timeline)), const ActionColumnButton(action: ArchiveAction(source: .timeline)), const ActionColumnButton(action: FavoriteAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index ac0dd14922..154ba29fa1 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -11,10 +11,10 @@ import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; @@ -76,9 +76,9 @@ class FavoriteBottomSheet extends ConsumerWidget { maxChildSize: 0.7, shouldCloseOnMinExtent: false, actions: [ - const ShareActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ShareAction(source: .timeline)), if (multiselect.hasRemote) ...[ - const ShareLinkActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ShareLinkAction(source: .timeline)), const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ActionColumnButton(action: ArchiveAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index 0ca4af56ce..e21dedc1e3 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -10,11 +10,11 @@ import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; @@ -83,9 +83,9 @@ class _GeneralBottomSheetState extends ConsumerState { shouldCloseOnMinExtent: false, actions: [ const ActionColumnButton(action: FavoriteAction(source: .timeline)), - const ShareActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ShareAction(source: .timeline)), if (multiselect.hasRemote) ...[ - const ShareLinkActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ShareLinkAction(source: .timeline)), if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ActionColumnButton(action: ArchiveAction(source: .timeline)), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart index dc49f22cfc..3e8d982a21 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart @@ -5,7 +5,7 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; @@ -66,7 +66,7 @@ class _LocalAlbumBottomSheetState extends ConsumerState { maxChildSize: 0.85, shouldCloseOnMinExtent: false, actions: const [ - ShareActionButton(source: ActionSource.timeline), + ActionColumnButton(action: ShareAction(source: .timeline)), ActionColumnButton(action: DeleteAction(source: .timeline)), ActionColumnButton(action: CleanupLocalAction(source: .timeline)), UploadActionButton(source: ActionSource.timeline), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart index e0074c7866..3a9d35b46d 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart @@ -4,8 +4,8 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; class LockedFolderBottomSheet extends ConsumerWidget { @@ -18,7 +18,7 @@ class LockedFolderBottomSheet extends ConsumerWidget { maxChildSize: 0.4, shouldCloseOnMinExtent: false, actions: [ - ShareActionButton(source: ActionSource.timeline), + ActionColumnButton(action: ShareAction(source: .timeline)), DownloadActionButton(source: ActionSource.timeline), ActionColumnButton(action: DeleteAction(source: .timeline)), ActionColumnButton(action: LockAction(source: .timeline)), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart index c49c805e3d..84d6b4478b 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart @@ -3,8 +3,9 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -64,7 +65,7 @@ class _PartnerDetailBottomSheetState extends ConsumerState maxChildSize: 0.85, shouldCloseOnMinExtent: false, actions: [ - const ShareActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ShareAction(source: .timeline)), if (multiselect.hasRemote) ...[ - const ShareLinkActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: ShareLinkAction(source: .timeline)), if (ownsAlbum) ...[ const ActionColumnButton(action: ArchiveAction(source: .timeline)), diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index d9ca0df303..e5eb10f550 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -82,17 +82,6 @@ class ActionNotifier extends Notifier { return ActionResult(count: assets.length, success: true); } - Future shareLink(ActionSource source, BuildContext context) async { - final ids = _getRemoteIdsForSource(source); - try { - await _service.shareLink(ids, context); - return ActionResult(count: ids.length, success: true); - } catch (error, stack) { - _logger.severe('Failed to create shared link for assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future emptyTrash(String userId) async { try { final count = await _service.emptyTrash(userId); @@ -239,30 +228,6 @@ class ActionNotifier extends Notifier { } } - Future shareAssets( - ActionSource source, - BuildContext context, { - ShareAssetType fileType = ShareAssetType.original, - Completer? cancelCompleter, - void Function(double progress)? onAssetDownloadProgress, - }) async { - final ids = _getAssets(source).toList(growable: false); - - try { - final count = await _service.shareAssets( - ids, - context, - fileType: fileType, - cancelCompleter: cancelCompleter, - onAssetDownloadProgress: onAssetDownloadProgress, - ); - return ActionResult(count: count, success: count > 0 || ids.isEmpty); - } catch (error, stack) { - _logger.severe('Failed to share assets', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future downloadAll(ActionSource source) async { final assets = _getAssets(source).whereType().toList(growable: false); try { diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index 415a9c578b..7126953ad9 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -1,9 +1,7 @@ import 'dart:async'; -import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/services/tag.service.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_album.repository.dart'; @@ -11,10 +9,8 @@ import 'package:immich_mobile/infrastructure/repositories/remote_asset.repositor import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; -import 'package:immich_mobile/repositories/asset_media.repository.dart'; import 'package:immich_mobile/repositories/download.repository.dart'; import 'package:immich_mobile/repositories/drift_album_api_repository.dart'; -import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/widgets/common/tag_picker.dart'; final actionServiceProvider = Provider( @@ -23,7 +19,6 @@ final actionServiceProvider = Provider( ref.watch(remoteAssetRepositoryProvider), ref.watch(driftAlbumApiRepositoryProvider), ref.watch(remoteAlbumRepository), - ref.watch(assetMediaRepositoryProvider), ref.watch(downloadRepositoryProvider), ref.watch(tagServiceProvider), ), @@ -34,7 +29,6 @@ class ActionService { final RemoteAssetRepository _remoteAssetRepository; final DriftAlbumApiRepository _albumApiRepository; final DriftRemoteAlbumRepository _remoteAlbumRepository; - final AssetMediaRepository _assetMediaRepository; final DownloadRepository _downloadRepository; final TagService _tagService; @@ -43,15 +37,10 @@ class ActionService { this._remoteAssetRepository, this._albumApiRepository, this._remoteAlbumRepository, - this._assetMediaRepository, this._downloadRepository, this._tagService, ); - Future shareLink(List remoteIds, BuildContext context) async { - unawaited(context.pushRoute(SharedLinkEditRoute(assetsList: remoteIds))); - } - Future emptyTrash(String userId) async { final count = await _assetApiRepository.emptyTrash(); await _remoteAssetRepository.emptyTrash(userId); @@ -108,22 +97,6 @@ class ActionService { return _tagService.bulkTagAssets(remoteIds, selectedTagIds.toList()); } - Future shareAssets( - List assets, - BuildContext context, { - ShareAssetType fileType = ShareAssetType.original, - Completer? cancelCompleter, - void Function(double progress)? onAssetDownloadProgress, - }) { - return _assetMediaRepository.shareAssets( - assets, - context, - fileType: fileType, - cancelCompleter: cancelCompleter, - onAssetDownloadProgress: onAssetDownloadProgress, - ); - } - Future> downloadAll(List assets) { return _downloadRepository.downloadAllAssets(assets); } diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 41015fb064..60ffa84066 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -16,6 +16,8 @@ import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/open_in_browser.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/actions/set_profile_picture.action.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/similar_photos.action.dart'; import 'package:immich_mobile/presentation/actions/slideshow.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; @@ -24,8 +26,6 @@ import 'package:immich_mobile/presentation/widgets/action_buttons/download_actio import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_link_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -173,12 +173,8 @@ enum ActionButtonType { ]) { return switch (this) { ActionButtonType.advancedInfo => ActionMenuItem(action: AssetDebugAction(source: context.source)), - ActionButtonType.share => ShareActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.shareLink => ShareLinkActionButton( - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, - ), + ActionButtonType.share => ActionMenuItem(action: ShareAction(source: context.source)), + ActionButtonType.shareLink => ActionMenuItem(action: ShareLinkAction(source: context.source)), ActionButtonType.slideshow => const ActionMenuItem(action: SlideshowAction()), ActionButtonType.archive || ActionButtonType.unarchive => ActionMenuItem(action: ArchiveAction(source: context.source)), diff --git a/mobile/test/services/action.service_test.dart b/mobile/test/services/action.service_test.dart index 0a1fbf08bc..2ab2389056 100644 --- a/mobile/test/services/action.service_test.dart +++ b/mobile/test/services/action.service_test.dart @@ -19,7 +19,6 @@ void main() { late MockRemoteAssetRepository remoteAssetRepository; late MockDriftAlbumApiRepository albumApiRepository; late MockRemoteAlbumRepository remoteAlbumRepository; - late MockAssetMediaRepository assetMediaRepository; late MockDownloadRepository downloadRepository; late MockTagService tagService; @@ -44,7 +43,6 @@ void main() { remoteAssetRepository = MockRemoteAssetRepository(); albumApiRepository = MockDriftAlbumApiRepository(); remoteAlbumRepository = MockRemoteAlbumRepository(); - assetMediaRepository = MockAssetMediaRepository(); downloadRepository = MockDownloadRepository(); tagService = MockTagService(); @@ -53,7 +51,6 @@ void main() { remoteAssetRepository, albumApiRepository, remoteAlbumRepository, - assetMediaRepository, downloadRepository, tagService, ); @@ -88,5 +85,4 @@ void main() { verify(() => remoteAssetRepository.updateRating(assetId, null)).called(1); }); }); - } diff --git a/mobile/test/unit/presentation/action_buttons/share_action_button_test.dart b/mobile/test/unit/presentation/action_buttons/share_action_button_test.dart deleted file mode 100644 index 2f4aa3b8c9..0000000000 --- a/mobile/test/unit/presentation/action_buttons/share_action_button_test.dart +++ /dev/null @@ -1,117 +0,0 @@ -import 'dart:async'; - -import 'package:drift/drift.dart'; -import 'package:drift/native.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/settings_key.dart'; -import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; -import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart'; -import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; - -import '../../factories/remote_asset_factory.dart'; -import '../presentation_context.dart'; - -class _RecordingActionNotifier extends ActionNotifier { - final List sharedFileTypes = []; - - @override - void build() {} - - @override - Future shareAssets( - ActionSource source, - BuildContext context, { - ShareAssetType fileType = ShareAssetType.original, - Completer? cancelCompleter, - void Function(double progress)? onAssetDownloadProgress, - }) async { - sharedFileTypes.add(fileType); - return const ActionResult(count: 1, success: true); - } -} - -class _FakeAssetViewerNotifier extends AssetViewerStateNotifier { - final BaseAsset asset; - - _FakeAssetViewerNotifier(this.asset); - - @override - AssetViewerState build() => AssetViewerState(currentAsset: asset); -} - -void main() { - late PresentationContext context; - late _RecordingActionNotifier actionNotifier; - - setUpAll(() async { - final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); - await SettingsRepository.ensureInitialized(db); - }); - - setUp(() async { - context = await PresentationContext.create(); - actionNotifier = _RecordingActionNotifier(); - await SettingsRepository.instance.clear([SettingsKey.shareFileType]); - }); - - tearDown(() { - context.dispose(); - }); - - Future pumpShareButton(WidgetTester tester) async { - final asset = RemoteAssetFactory.create(ownerId: context.currentUser.id); - await tester.pumpTestWidget( - context, - const ShareActionButton(source: ActionSource.viewer), - overrides: [ - actionProvider.overrideWith(() => actionNotifier), - assetViewerProvider.overrideWith(() => _FakeAssetViewerNotifier(asset)), - ], - ); - } - - Future longPressAndPickPreview(WidgetTester tester) async { - await tester.longPress(find.byType(BaseActionButton)); - await tester.pumpAndSettle(); - await tester.tap(find.byIcon(Icons.photo_size_select_large_rounded)); - await tester.pumpAndSettle(); - } - - group('ShareActionButton', () { - testWidgets('single press shares with the configured default quality', (tester) async { - await pumpShareButton(tester); - - await tester.tap(find.byType(BaseActionButton)); - await tester.pumpAndSettle(); - - expect(actionNotifier.sharedFileTypes, [ShareAssetType.original]); - }); - - testWidgets('long press shares with the quality picked in the dialog', (tester) async { - await pumpShareButton(tester); - - await longPressAndPickPreview(tester); - - expect(actionNotifier.sharedFileTypes, [ShareAssetType.preview]); - }); - - testWidgets('quality picked on long press is a one-time choice and does not change the default', (tester) async { - await pumpShareButton(tester); - - await longPressAndPickPreview(tester); - expect(actionNotifier.sharedFileTypes, [ShareAssetType.preview]); - - await tester.tap(find.byType(BaseActionButton)); - await tester.pumpAndSettle(); - - expect(actionNotifier.sharedFileTypes, [ShareAssetType.preview, ShareAssetType.original]); - expect(SettingsRepository.instance.appConfig.share.fileType, ShareAssetType.original); - }); - }); -} diff --git a/mobile/test/unit/presentation/actions/share_action_test.dart b/mobile/test/unit/presentation/actions/share_action_test.dart new file mode 100644 index 0000000000..9faa6e3a5f --- /dev/null +++ b/mobile/test/unit/presentation/actions/share_action_test.dart @@ -0,0 +1,159 @@ +import 'package:drift/drift.dart'; +import 'package:drift/native.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/settings_key.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/share_link.action.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + + setUpAll(() async { + final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); + await SettingsRepository.ensureInitialized(db); + }); + + setUp(() async { + context = await PresentationContext.create(); + await SettingsRepository.instance.clear([SettingsKey.shareFileType]); + }); + + tearDown(() { + context.dispose(); + }); + + late BuildContext actionContext; + late WidgetRef actionRef; + + Future pumpShare(WidgetTester tester, {Set? selection}) => tester.pumpTestWidget( + context, + Consumer( + builder: (widgetContext, ref, _) { + actionContext = widgetContext; + actionRef = ref; + return const ActionIconButton(action: ShareAction(source: .timeline)); + }, + ), + overrides: [ + ...context.selected(selection ?? {RemoteAssetFactory.create(ownerId: context.currentUser.id)}), + ], + ); + + // TODO: Replace with button tap once long press support in ui is merged + Future invokeSecondaryAction() async { + final resolved = const ShareAction(source: .timeline).create(actionContext, actionRef); + await resolved!.onSecondaryAction!(); + } + + List sharedFileTypes() => verify( + () => context.repository.assetMedia.api.shareAssets( + any(), + any(), + fileType: captureAny(named: 'fileType'), + cancelCompleter: any(named: 'cancelCompleter'), + onAssetDownloadProgress: any(named: 'onAssetDownloadProgress'), + ), + ).captured.cast(); + + Future settle(WidgetTester tester) async { + await tester.pump(); + await tester.pump(const .new(milliseconds: 300)); + } + + Future pickPreviewQuality(WidgetTester tester) async { + final shared = invokeSecondaryAction(); + await settle(tester); + await tester.tap(find.byIcon(Icons.photo_size_select_large_rounded)); + await settle(tester); + await shared; + } + + group('ShareAction', () { + testWidgets('single press shares with the configured default quality', (tester) async { + await pumpShare(tester); + + await tester.tap(find.byType(ImmichIconButton)); + await settle(tester); + + expect(sharedFileTypes(), [ShareAssetType.original]); + }); + + testWidgets('the secondary action shares with the quality picked in the dialog', (tester) async { + await pumpShare(tester); + + await pickPreviewQuality(tester); + + expect(sharedFileTypes(), [ShareAssetType.preview]); + }); + + testWidgets('quality picked there is a one-time choice and does not change the default', (tester) async { + await pumpShare(tester); + + await pickPreviewQuality(tester); + await tester.tap(find.byType(ImmichIconButton)); + await settle(tester); + + expect(sharedFileTypes(), [ShareAssetType.preview, ShareAssetType.original]); + expect(SettingsRepository.instance.appConfig.share.fileType, ShareAssetType.original); + }); + + testWidgets('offers no preview option for a video, which has none to share', (tester) async { + await pumpShare( + tester, + selection: {RemoteAssetFactory.create(ownerId: context.currentUser.id, type: .video)}, + ); + + final shared = invokeSecondaryAction(); + await settle(tester); + + expect(find.byIcon(Icons.high_quality_rounded), findsOneWidget); + expect(find.byIcon(Icons.photo_size_select_large_rounded), findsNothing); + + await tester.tap(find.byIcon(Icons.high_quality_rounded)); + await settle(tester); + await shared; + expect(find.byIcon(Icons.photo_size_select_large_rounded), findsNothing); + }); + + testWidgets('is hidden when nothing is selected', (tester) async { + await pumpShare(tester, selection: const {}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('ShareLinkAction', () { + testWidgets('offers a link for a remote asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ShareLinkAction(source: .timeline)), + overrides: context.selected({RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden for a local-only asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: ShareLinkAction(source: .timeline)), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/presentation_context.dart b/mobile/test/unit/presentation/presentation_context.dart index ba12183652..bfd8e877d8 100644 --- a/mobile/test/unit/presentation/presentation_context.dart +++ b/mobile/test/unit/presentation/presentation_context.dart @@ -19,6 +19,7 @@ import 'package:immich_mobile/providers/infrastructure/user.provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/repositories/asset_media.repository.dart'; import 'package:immich_mobile/services/cleanup.service.dart'; import 'package:immich_mobile/services/gcast.service.dart'; import 'package:immich_mobile/services/server_info.service.dart'; @@ -55,6 +56,7 @@ class PresentationContext { serverInfoServiceProvider.overrideWithValue(service.serverInfo), inLockedViewProvider.overrideWithValue(false), remoteAssetRepositoryProvider.overrideWithValue(repository.remoteAsset.repo), + assetMediaRepositoryProvider.overrideWithValue(repository.assetMedia.api), ]; List selected(Set assets) => [ From 1fa985babb97bb628a8fac16a4c4c6a455d27b2a Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:43 +0530 Subject: [PATCH 52/69] feat: album action (#29770) refactor: mobile album actions Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../actions/remove_from_album.action.dart | 52 +++++++ .../actions/set_album_cover.action.dart | 49 +++++++ ...emove_from_album_action_button.widget.dart | 65 --------- .../set_album_cover.widget.dart | 56 -------- .../remote_album_bottom_sheet.widget.dart | 15 ++- .../infrastructure/action.provider.dart | 27 ---- mobile/lib/services/action.service.dart | 24 ---- mobile/lib/utils/action_button.utils.dart | 18 +-- mobile/test/services/action.service_test.dart | 13 +- .../actions/album_action_test.dart | 127 ++++++++++++++++++ .../presentation/presentation_context.dart | 2 + 11 files changed, 247 insertions(+), 201 deletions(-) create mode 100644 mobile/lib/presentation/actions/remove_from_album.action.dart create mode 100644 mobile/lib/presentation/actions/set_album_cover.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart create mode 100644 mobile/test/unit/presentation/actions/album_action_test.dart diff --git a/mobile/lib/presentation/actions/remove_from_album.action.dart b/mobile/lib/presentation/actions/remove_from_album.action.dart new file mode 100644 index 0000000000..3d648a9cfd --- /dev/null +++ b/mobile/lib/presentation/actions/remove_from_album.action.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final assetIds = assets.remote().map((asset) => asset.id).toList(growable: false); + return assetIds.isEmpty ? null : assetIds; +}); + +class RemoveFromAlbumAction extends AssetActionBuilder { + final String albumId; + + const RemoveFromAlbumAction({required super.source, required this.albumId}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assetIds = ref.watch(_stateProvider(source)); + if (assetIds == null) { + return null; + } + + return .new( + icon: Icons.remove_circle_outline, + label: context.t.remove_from_album, + onAction: () => _remove(context, ref, assetIds), + ); + } + + Future _remove(BuildContext context, WidgetRef ref, List assetIds) async { + final albumService = ref.read(remoteAlbumServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + final count = await albumService.removeAssets(albumId: albumId, assetIds: assetIds); + if (!context.mounted) { + return; + } + + toastService.success(context.t.remove_from_album_action_prompt(count: count)); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to remove the assets from the album"); + } + } +} diff --git a/mobile/lib/presentation/actions/set_album_cover.action.dart b/mobile/lib/presentation/actions/set_album_cover.action.dart new file mode 100644 index 0000000000..0c16c9a9db --- /dev/null +++ b/mobile/lib/presentation/actions/set_album_cover.action.dart @@ -0,0 +1,49 @@ +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +final _stateProvider = Provider.family.autoDispose((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + return assets.remote().map((asset) => asset.id).singleOrNull; +}); + +class SetAlbumCoverAction extends AssetActionBuilder { + final String albumId; + + const SetAlbumCoverAction({required super.source, required this.albumId}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assetId = ref.watch(_stateProvider(source)); + if (assetId == null) { + return null; + } + + return .new( + icon: Icons.image_outlined, + label: context.t.set_as_album_cover, + onAction: () => _setCover(context, ref, assetId), + ); + } + + Future _setCover(BuildContext context, WidgetRef ref, String assetId) async { + final message = context.t.album_cover_updated; + final albumService = ref.read(remoteAlbumServiceProvider); + final toastService = ref.read(toastServiceProvider); + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + await albumService.updateAlbum(albumId, thumbnailAssetId: assetId); + toastService.success(message); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to update the album cover"); + } + } +} diff --git a/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart deleted file mode 100644 index 7049da13f8..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/events.model.dart'; -import 'package:immich_mobile/domain/utils/event_stream.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class RemoveFromAlbumActionButton extends ConsumerWidget { - final String albumId; - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const RemoveFromAlbumActionButton({ - super.key, - required this.albumId, - required this.source, - this.iconOnly = false, - this.menuItem = false, - }); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - if (source == ActionSource.viewer) { - EventStream.shared.emit(const ViewerReloadAssetEvent()); - } - - final result = await ref.read(actionProvider.notifier).removeFromAlbum(source, albumId); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'remove_from_album_action_prompt'.t( - context: context, - args: {'count': result.count.toString()}, - ); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.remove_circle_outline, - label: "remove_from_album".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart b/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart deleted file mode 100644 index e6e572110e..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/set_album_cover.widget.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class SetAlbumCoverActionButton extends ConsumerWidget { - final String albumId; - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const SetAlbumCoverActionButton({ - super.key, - required this.albumId, - required this.source, - this.iconOnly = false, - this.menuItem = false, - }); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final result = await ref.read(actionProvider.notifier).setAlbumCover(source, albumId); - ref.read(multiSelectProvider.notifier).reset(); - if (!context.mounted) { - return; - } - - final successMessage = 'album_cover_updated'.t(context: context); - ImmichToast.show( - context: context, - msg: result.success ? successMessage : 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.image_outlined, - label: 'set_as_album_cover'.t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - maxWidth: 100, - ); - } -} diff --git a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart index 21537a664d..a070b1c2ab 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart @@ -10,12 +10,12 @@ import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; +import 'package:immich_mobile/presentation/actions/remove_from_album.action.dart'; +import 'package:immich_mobile/presentation/actions/set_album_cover.action.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -104,9 +104,14 @@ class _RemoteAlbumBottomSheetState extends ConsumerState ], ], const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), - if (ownsAlbum) RemoveFromAlbumActionButton(source: ActionSource.timeline, albumId: widget.album.id), - if (ownsAlbum && multiselect.selectedAssets.length == 1) - SetAlbumCoverActionButton(source: ActionSource.timeline, albumId: widget.album.id), + if (ownsAlbum) ...[ + ActionColumnButton( + action: RemoveFromAlbumAction(source: .timeline, albumId: widget.album.id), + ), + ActionColumnButton( + action: SetAlbumCoverAction(source: .timeline, albumId: widget.album.id), + ), + ], ], slivers: ownsAlbum ? [const AddToAlbumHeader(), AlbumSelector(onAlbumSelected: addToAlbum, onKeyboardExpanded: onKeyboardExpand)] diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index e5eb10f550..c10ac37b22 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -169,33 +169,6 @@ class ActionNotifier extends Notifier { ); } - Future removeFromAlbum(ActionSource source, String albumId) async { - final ids = _getRemoteIdsForSource(source); - try { - final removedCount = await _service.removeFromAlbum(ids, albumId); - return ActionResult(count: removedCount, success: true); - } catch (error, stack) { - _logger.severe('Failed to remove assets from album', error, stack); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - - Future setAlbumCover(ActionSource source, String albumId) async { - final assets = _getAssets(source); - final asset = assets.first; - if (asset is! RemoteAsset) { - return const ActionResult(count: 1, success: false, error: 'Asset must be remote'); - } - - try { - await _service.setAlbumCover(albumId, asset.id); - return const ActionResult(count: 1, success: true); - } catch (error, stack) { - _logger.severe('Failed to set album cover', error, stack); - return ActionResult(count: 1, success: false, error: error.toString()); - } - } - Future updateDescription(ActionSource source, String description) async { final ids = _getRemoteIdsForSource(source); if (ids.length != 1) { diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index 7126953ad9..90e7978c97 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -4,21 +4,16 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/domain/services/tag.service.dart'; -import 'package:immich_mobile/infrastructure/repositories/remote_album.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; -import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; import 'package:immich_mobile/repositories/download.repository.dart'; -import 'package:immich_mobile/repositories/drift_album_api_repository.dart'; import 'package:immich_mobile/widgets/common/tag_picker.dart'; final actionServiceProvider = Provider( (ref) => ActionService( ref.watch(assetApiRepositoryProvider), ref.watch(remoteAssetRepositoryProvider), - ref.watch(driftAlbumApiRepositoryProvider), - ref.watch(remoteAlbumRepository), ref.watch(downloadRepositoryProvider), ref.watch(tagServiceProvider), ), @@ -27,16 +22,12 @@ final actionServiceProvider = Provider( class ActionService { final AssetApiRepository _assetApiRepository; final RemoteAssetRepository _remoteAssetRepository; - final DriftAlbumApiRepository _albumApiRepository; - final DriftRemoteAlbumRepository _remoteAlbumRepository; final DownloadRepository _downloadRepository; final TagService _tagService; const ActionService( this._assetApiRepository, this._remoteAssetRepository, - this._albumApiRepository, - this._remoteAlbumRepository, this._downloadRepository, this._tagService, ); @@ -53,14 +44,6 @@ class ActionService { return count; } - Future removeFromAlbum(List remoteIds, String albumId) async { - final result = await _albumApiRepository.removeAssets(albumId, remoteIds); - if (result.removed.isNotEmpty) { - await _remoteAlbumRepository.removeAssets(albumId, result.removed); - } - return result.removed.length; - } - Future updateDescription(String assetId, String description) async { // update remote first, then local to ensure consistency await _assetApiRepository.updateDescription(assetId, description); @@ -100,11 +83,4 @@ class ActionService { Future> downloadAll(List assets) { return _downloadRepository.downloadAllAssets(assets); } - - Future setAlbumCover(String albumId, String assetId) async { - final owner = await _remoteAlbumRepository.getOwner(albumId); - final updatedAlbum = await _albumApiRepository.updateAlbum(albumId, owner, thumbnailAssetId: assetId); - await _remoteAlbumRepository.update(updatedAlbum); - return true; - } } diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 60ffa84066..7a416a4441 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -14,7 +14,9 @@ import 'package:immich_mobile/presentation/actions/cast.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/open_in_browser.action.dart'; +import 'package:immich_mobile/presentation/actions/remove_from_album.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; +import 'package:immich_mobile/presentation/actions/set_album_cover.action.dart'; import 'package:immich_mobile/presentation/actions/set_profile_picture.action.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/actions/share_link.action.dart'; @@ -24,8 +26,6 @@ import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/remove_from_album_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/set_album_cover.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -185,17 +185,11 @@ enum ActionButtonType { ActionButtonType.removeFromLockFolder => ActionMenuItem(action: LockAction(source: context.source)), ActionButtonType.deleteLocal => ActionMenuItem(action: CleanupLocalAction(source: context.source)), ActionButtonType.upload => UploadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), - ActionButtonType.removeFromAlbum => RemoveFromAlbumActionButton( - albumId: context.currentAlbum!.id, - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, + ActionButtonType.removeFromAlbum => ActionMenuItem( + action: RemoveFromAlbumAction(source: context.source, albumId: context.currentAlbum!.id), ), - ActionButtonType.setAlbumCover => SetAlbumCoverActionButton( - albumId: context.currentAlbum!.id, - source: context.source, - iconOnly: iconOnly, - menuItem: menuItem, + ActionButtonType.setAlbumCover => ActionMenuItem( + action: SetAlbumCoverAction(source: context.source, albumId: context.currentAlbum!.id), ), ActionButtonType.likeActivity => LikeActivityActionButton(iconOnly: iconOnly, menuItem: menuItem), ActionButtonType.unstack => ActionMenuItem(action: StackAction(source: context.source)), diff --git a/mobile/test/services/action.service_test.dart b/mobile/test/services/action.service_test.dart index 2ab2389056..389d4200da 100644 --- a/mobile/test/services/action.service_test.dart +++ b/mobile/test/services/action.service_test.dart @@ -17,8 +17,6 @@ void main() { late MockAssetApiRepository assetApiRepository; late MockRemoteAssetRepository remoteAssetRepository; - late MockDriftAlbumApiRepository albumApiRepository; - late MockRemoteAlbumRepository remoteAlbumRepository; late MockDownloadRepository downloadRepository; late MockTagService tagService; @@ -41,19 +39,10 @@ void main() { setUp(() { assetApiRepository = MockAssetApiRepository(); remoteAssetRepository = MockRemoteAssetRepository(); - albumApiRepository = MockDriftAlbumApiRepository(); - remoteAlbumRepository = MockRemoteAlbumRepository(); downloadRepository = MockDownloadRepository(); tagService = MockTagService(); - sut = ActionService( - assetApiRepository, - remoteAssetRepository, - albumApiRepository, - remoteAlbumRepository, - downloadRepository, - tagService, - ); + sut = ActionService(assetApiRepository, remoteAssetRepository, downloadRepository, tagService); }); tearDown(() async { diff --git a/mobile/test/unit/presentation/actions/album_action_test.dart b/mobile/test/unit/presentation/actions/album_action_test.dart new file mode 100644 index 0000000000..1cf413cbdc --- /dev/null +++ b/mobile/test/unit/presentation/actions/album_action_test.dart @@ -0,0 +1,127 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/remove_from_album.action.dart'; +import 'package:immich_mobile/presentation/actions/set_album_cover.action.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_album_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + const albumId = 'album-1'; + + late PresentationContext context; + late MockRemoteAlbumService albumService; + + setUp(() async { + context = await PresentationContext.create(); + albumService = context.service.album.service; + }); + + tearDown(() { + context.dispose(); + }); + + List withMockToast() => [toastServiceProvider.overrideWithValue(context.service.toast)]; + + group('RemoveFromAlbumAction', () { + Future pumpRemove(WidgetTester tester, Set selection) => tester.pumpTestAction( + context, + const RemoveFromAlbumAction(source: .timeline, albumId: albumId), + overrides: [...context.selected(selection), ...withMockToast()], + ); + + testWidgets('removes every selected remote asset from the album', (tester) async { + final first = RemoteAssetFactory.create(); + final second = RemoteAssetFactory.create(); + + await pumpRemove(tester, {first, second}); + await tester.pumpAndSettle(); + + verify(() => albumService.removeAssets(albumId: albumId, assetIds: [first.id, second.id])).called(1); + }); + + testWidgets('reports the count the server actually removed', (tester) async { + when( + () => albumService.removeAssets( + albumId: any(named: 'albumId'), + assetIds: any(named: 'assetIds'), + ), + ).thenAnswer((_) async => 1); + + await pumpRemove(tester, {RemoteAssetFactory.create(), RemoteAssetFactory.create()}); + await tester.pumpAndSettle(); + + final message = verify(() => context.service.toast.success(captureAny())).captured.single as String; + expect(message, StaticTranslations.instance.remove_from_album_action_prompt(count: 1)); + }); + + testWidgets('is hidden for a local-only asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton( + action: RemoveFromAlbumAction(source: .timeline, albumId: albumId), + ), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('SetAlbumCoverAction', () { + testWidgets('sets the single selected asset as the cover', (tester) async { + final asset = RemoteAssetFactory.create(); + when( + () => albumService.updateAlbum(any(), thumbnailAssetId: any(named: 'thumbnailAssetId')), + ).thenAnswer((_) async => RemoteAlbumFactory.create(id: albumId)); + + await tester.pumpTestAction( + context, + const SetAlbumCoverAction(source: .timeline, albumId: albumId), + overrides: [ + ...context.selected({asset}), + ...withMockToast(), + ], + ); + await tester.pumpAndSettle(); + + verify(() => albumService.updateAlbum(albumId, thumbnailAssetId: asset.id)).called(1); + + final message = verify(() => context.service.toast.success(captureAny())).captured.single as String; + expect(message, StaticTranslations.instance.album_cover_updated); + }); + + testWidgets('is hidden for more than one asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton( + action: SetAlbumCoverAction(source: .timeline, albumId: albumId), + ), + overrides: context.selected({RemoteAssetFactory.create(), RemoteAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden for a local-only asset', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton( + action: SetAlbumCoverAction(source: .timeline, albumId: albumId), + ), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); +} diff --git a/mobile/test/unit/presentation/presentation_context.dart b/mobile/test/unit/presentation/presentation_context.dart index bfd8e877d8..43c76c8bf8 100644 --- a/mobile/test/unit/presentation/presentation_context.dart +++ b/mobile/test/unit/presentation/presentation_context.dart @@ -14,6 +14,7 @@ import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/providers/infrastructure/user.provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart'; @@ -51,6 +52,7 @@ class PresentationContext { currentUserProvider.overrideWith((ref) => CurrentUserProvider(service.user.service)), assetServiceProvider.overrideWithValue(service.asset.service), cleanupServiceProvider.overrideWithValue(service.cleanup.service), + remoteAlbumServiceProvider.overrideWithValue(service.album.service), partnerServiceProvider.overrideWithValue(service.partner.service), gCastServiceProvider.overrideWithValue(service.cast), serverInfoServiceProvider.overrideWithValue(service.serverInfo), From bc84054cccb4be37c447d1b9277ea440e108b454 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:43 +0530 Subject: [PATCH 53/69] refactor: mobile tag and download actions (#29948) refactor: mobile tag and download action Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../presentation/actions/download.action.dart | 49 ++++++ .../lib/presentation/actions/tag.action.dart | 86 ++++++++++ .../bulk_tag_assets_action_button.widget.dart | 46 ----- .../download_action_button.widget.dart | 47 ------ .../archive_bottom_sheet.widget.dart | 4 +- .../favorite_bottom_sheet.widget.dart | 5 +- .../general_bottom_sheet.widget.dart | 12 +- .../locked_folder_bottom_sheet.widget.dart | 5 +- .../partner_detail_bottom_sheet.widget.dart | 4 +- .../remote_album_bottom_sheet.widget.dart | 4 +- .../infrastructure/action.provider.dart | 43 ----- mobile/lib/services/action.service.dart | 45 +---- mobile/lib/utils/action_button.utils.dart | 4 +- mobile/test/services/action.service_test.dart | 6 +- .../actions/download_tag_action_test.dart | 159 ++++++++++++++++++ 15 files changed, 313 insertions(+), 206 deletions(-) create mode 100644 mobile/lib/presentation/actions/download.action.dart create mode 100644 mobile/lib/presentation/actions/tag.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart create mode 100644 mobile/test/unit/presentation/actions/download_tag_action_test.dart diff --git a/mobile/lib/presentation/actions/download.action.dart b/mobile/lib/presentation/actions/download.action.dart new file mode 100644 index 0000000000..1303fa6b03 --- /dev/null +++ b/mobile/lib/presentation/actions/download.action.dart @@ -0,0 +1,49 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/background_sync.provider.dart'; +import 'package:immich_mobile/repositories/download.repository.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final remote = assets.remote().toList(growable: false); + return remote.isEmpty ? null : remote; +}); + +class DownloadAction extends AssetActionBuilder { + const DownloadAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assets = ref.watch(_stateProvider(source)); + if (assets == null) { + return null; + } + + return .new(icon: Icons.download, label: context.t.download, onAction: () => _download(ref, assets)); + } + + Future _download(WidgetRef ref, List assets) async { + final backgroundSync = ref.read(backgroundSyncProvider); + final downloads = ref.read(downloadRepositoryProvider); + + try { + await downloads.downloadAllAssets(assets); + + unawaited( + Future.delayed(const .new(seconds: 1), () async { + await backgroundSync.syncLocal(); + await backgroundSync.hashAssets(); + }), + ); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to download the assets"); + } + } +} diff --git a/mobile/lib/presentation/actions/tag.action.dart b/mobile/lib/presentation/actions/tag.action.dart new file mode 100644 index 0000000000..749b23d150 --- /dev/null +++ b/mobile/lib/presentation/actions/tag.action.dart @@ -0,0 +1,86 @@ +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/services/tag.service.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/infrastructure/tag.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/user_metadata.provider.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_mobile/widgets/common/tag_picker.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final tagsEnabled = ref.watch( + userMetadataPreferencesProvider.select((value) => value.valueOrNull?.tagsEnabled ?? false), + ); + if (!tagsEnabled) { + return null; + } + + final assets = ref.watch(ownedAssetsActionProvider(source)); + final assetIds = assets.map((asset) => asset.id).toList(growable: false); + return assetIds.isEmpty ? null : assetIds; +}); + +class TagAction extends AssetActionBuilder { + const TagAction({required super.source}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assetIds = ref.watch(_stateProvider(source)); + if (assetIds == null) { + return null; + } + + return .new( + icon: Icons.sell_outlined, + label: context.t.control_bottom_app_bar_add_tags, + onAction: () => _tag(context, ref, assetIds), + ); + } + + Future _tag(BuildContext context, WidgetRef ref, List assetIds) async { + final clearSelection = ref.read(clearSelectionProvider(source)); + + try { + final results = await showTagPickerModal(context: context); + if (results == null || !context.mounted) { + return; + } + + final (selected, created) = results; + await tagAssets(context, ref, assetIds, selected: selected, created: created); + clearSelection(); + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to tag the assets"); + } + } +} + +@visibleForTesting +Future tagAssets( + BuildContext context, + WidgetRef ref, + List assetIds, { + required Set selected, + required Set created, +}) async { + final tagService = ref.read(tagServiceProvider); + final toastService = ref.read(toastServiceProvider); + final tagIds = {...selected}; + + if (created.isNotEmpty) { + final tags = await tagService.upsertTags(created.toList()); + tagIds.addAll(tags.map((tag) => tag.id)); + } + if (tagIds.isEmpty) { + return; + } + + final count = await tagService.bulkTagAssets(assetIds, tagIds.toList()); + ref.invalidate(tagProvider); + if (context.mounted) { + toastService.success(context.t.tagged_assets(count: count)); + } +} diff --git a/mobile/lib/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart deleted file mode 100644 index b9ac47cd57..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; - -class BulkTagAssetsActionButton extends ConsumerWidget { - final ActionSource source; - - const BulkTagAssetsActionButton({super.key, required this.source}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - final result = await ref.read(actionProvider.notifier).tagAssets(source, context); - if (result == null) { - return; - } - - ref.read(multiSelectProvider.notifier).reset(); - - if (!context.mounted) { - return; - } - - ImmichToast.show( - context: context, - msg: result.success - ? 'tagged_assets'.t(context: context, args: {'count': result.count.toString()}) - : 'errors.failed_to_tag_assets'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: result.success ? ToastType.success : ToastType.error, - ); - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.sell_outlined, - label: "control_bottom_app_bar_add_tags".t(context: context), - onPressed: () => _onTap(context, ref), - ); - } -} diff --git a/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart deleted file mode 100644 index b6f8cc614e..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/download_action_button.widget.dart +++ /dev/null @@ -1,47 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/utils/background_sync.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/background_sync.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; - -class DownloadActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - const DownloadActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref, BackgroundSyncManager backgroundSyncManager) async { - if (!context.mounted) { - return; - } - - try { - await ref.read(actionProvider.notifier).downloadAll(source); - - Future.delayed(const Duration(seconds: 1), () async { - await backgroundSyncManager.syncLocal(); - await backgroundSyncManager.hashAssets(); - }); - } finally { - ref.read(multiSelectProvider.notifier).reset(); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - final backgroundManager = ref.watch(backgroundSyncProvider); - - return BaseActionButton( - iconData: Icons.download, - maxWidth: 95, - label: "download".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref, backgroundManager), - ); - } -} diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index e8499ad967..032ccda917 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -6,6 +6,7 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; @@ -13,7 +14,6 @@ import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -81,7 +81,7 @@ class _ArchiveBottomSheetState extends ConsumerState { const ActionColumnButton(action: ShareLinkAction(source: .timeline)), const ActionColumnButton(action: ArchiveAction(source: .timeline)), const ActionColumnButton(action: FavoriteAction(source: .timeline)), - if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: DownloadAction(source: .timeline)), const ActionColumnButton(action: DeleteAction(source: .timeline)), const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), const ActionColumnButton(action: EditLocationAction(source: .timeline)), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index 154ba29fa1..ea213fbdc7 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; @@ -14,7 +14,6 @@ import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; @@ -81,7 +80,7 @@ class FavoriteBottomSheet extends ConsumerWidget { const ActionColumnButton(action: ShareLinkAction(source: .timeline)), const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ActionColumnButton(action: ArchiveAction(source: .timeline)), - if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: DownloadAction(source: .timeline)), const ActionColumnButton(action: DeleteAction(source: .timeline)), const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), const ActionColumnButton(action: EditLocationAction(source: .timeline)), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index e21dedc1e3..2ad037f2ad 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -6,6 +6,7 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; import 'package:immich_mobile/presentation/actions/edit_location.action.dart'; import 'package:immich_mobile/presentation/actions/favorite.action.dart'; @@ -13,13 +14,11 @@ import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/bulk_tag_assets_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/tag.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/user_metadata.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -48,9 +47,6 @@ class _GeneralBottomSheetState extends ConsumerState { @override Widget build(BuildContext context) { final multiselect = ref.watch(multiSelectProvider); - final tagsEnabled = ref.watch( - userMetadataPreferencesProvider.select((value) => value.valueOrNull?.tagsEnabled ?? false), - ); Future addToAlbum(RemoteAlbum album) async { final result = await ref.read(actionProvider.notifier).addToAlbum(ActionSource.timeline, album); @@ -86,10 +82,10 @@ class _GeneralBottomSheetState extends ConsumerState { const ActionColumnButton(action: ShareAction(source: .timeline)), if (multiselect.hasRemote) ...[ const ActionColumnButton(action: ShareLinkAction(source: .timeline)), - if (multiselect.onlyRemote) const DownloadActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: DownloadAction(source: .timeline)), const ActionColumnButton(action: FavoriteAction(source: .timeline)), const ActionColumnButton(action: ArchiveAction(source: .timeline)), - if (tagsEnabled) const BulkTagAssetsActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: TagAction(source: .timeline)), const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), const ActionColumnButton(action: EditLocationAction(source: .timeline)), const ActionColumnButton(action: LockAction(source: .timeline)), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart index 3a9d35b46d..1d3d5b0d26 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart @@ -1,11 +1,10 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; class LockedFolderBottomSheet extends ConsumerWidget { @@ -19,7 +18,7 @@ class LockedFolderBottomSheet extends ConsumerWidget { shouldCloseOnMinExtent: false, actions: [ ActionColumnButton(action: ShareAction(source: .timeline)), - DownloadActionButton(source: ActionSource.timeline), + ActionColumnButton(action: DownloadAction(source: .timeline)), ActionColumnButton(action: DeleteAction(source: .timeline)), ActionColumnButton(action: LockAction(source: .timeline)), ], diff --git a/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart index 84d6b4478b..8edc2e04e6 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart @@ -4,8 +4,8 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -66,7 +66,7 @@ class _PartnerDetailBottomSheetState extends ConsumerState const ActionColumnButton(action: ArchiveAction(source: .timeline)), const ActionColumnButton(action: FavoriteAction(source: .timeline)), ], - const DownloadActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: DownloadAction(source: .timeline)), if (ownsAlbum) ...[ const ActionColumnButton(action: DeleteAction(source: .timeline)), const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart index c10ac37b22..919836737f 100644 --- a/mobile/lib/providers/infrastructure/action.provider.dart +++ b/mobile/lib/providers/infrastructure/action.provider.dart @@ -10,9 +10,7 @@ import 'package:immich_mobile/domain/services/remote_album.service.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/tag.provider.dart'; import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/services/action.service.dart'; import 'package:immich_mobile/services/foreground_upload.service.dart'; @@ -57,11 +55,6 @@ class ActionNotifier extends Notifier { return _getAssets(source).whereType().toIds().toList(growable: false); } - List _getOwnedRemoteIdsForSource(ActionSource source) { - final ownerId = ref.read(currentUserProvider)?.id; - return _getAssets(source).whereType().ownedAssets(ownerId).toIds().toList(growable: false); - } - Set _getAssets(ActionSource source) { return switch (source) { ActionSource.timeline => ref.read(multiSelectProvider).selectedAssets, @@ -102,23 +95,6 @@ class ActionNotifier extends Notifier { } } - Future tagAssets(ActionSource source, BuildContext context) async { - final ids = _getOwnedRemoteIdsForSource(source); - try { - final count = await _service.tagAssets(ids, context); - if (count == null) { - return null; - } - - ref.invalidate(tagProvider); - return ActionResult(count: count, success: true); - } catch (error, stack) { - _logger.severe('Failed to tag assets', error, stack); - ref.invalidate(tagProvider); - return ActionResult(count: ids.length, success: false, error: error.toString()); - } - } - Future addToAlbum(ActionSource source, RemoteAlbum album) async { final selected = _getAssets(source).toList(growable: false); if (selected.isEmpty) { @@ -201,18 +177,6 @@ class ActionNotifier extends Notifier { } } - Future downloadAll(ActionSource source) async { - final assets = _getAssets(source).whereType().toList(growable: false); - try { - final didEnqueue = await _service.downloadAll(assets); - final enqueueCount = didEnqueue.where((e) => e).length; - return ActionResult(count: enqueueCount, success: true); - } catch (error, stack) { - _logger.severe('Failed to download assets', error, stack); - return ActionResult(count: assets.length, success: false, error: error.toString()); - } - } - Future upload( ActionSource source, { List? assets, @@ -297,11 +261,4 @@ class ActionNotifier extends Notifier { extension on Iterable { Iterable toIds() => map((e) => e.id); - - Iterable ownedAssets(String? ownerId) { - if (ownerId == null) { - return const []; - } - return whereType().where((a) => a.ownerId == ownerId); - } } diff --git a/mobile/lib/services/action.service.dart b/mobile/lib/services/action.service.dart index 90e7978c97..ec9b7cd446 100644 --- a/mobile/lib/services/action.service.dart +++ b/mobile/lib/services/action.service.dart @@ -1,36 +1,19 @@ import 'dart:async'; -import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/services/tag.service.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/repositories/asset_api.repository.dart'; -import 'package:immich_mobile/repositories/download.repository.dart'; -import 'package:immich_mobile/widgets/common/tag_picker.dart'; final actionServiceProvider = Provider( - (ref) => ActionService( - ref.watch(assetApiRepositoryProvider), - ref.watch(remoteAssetRepositoryProvider), - ref.watch(downloadRepositoryProvider), - ref.watch(tagServiceProvider), - ), + (ref) => ActionService(ref.watch(assetApiRepositoryProvider), ref.watch(remoteAssetRepositoryProvider)), ); class ActionService { final AssetApiRepository _assetApiRepository; final RemoteAssetRepository _remoteAssetRepository; - final DownloadRepository _downloadRepository; - final TagService _tagService; - const ActionService( - this._assetApiRepository, - this._remoteAssetRepository, - this._downloadRepository, - this._tagService, - ); + const ActionService(this._assetApiRepository, this._remoteAssetRepository); Future emptyTrash(String userId) async { final count = await _assetApiRepository.emptyTrash(); @@ -59,28 +42,4 @@ class ActionService { return true; } - - Future tagAssets(List remoteIds, BuildContext context) async { - final tagResults = await showTagPickerModal(context: context); - if (tagResults == null) { - // user cancelled - return null; - } - - final selectedTagIds = Set.from(tagResults.$1); - final selectedNewTagValues = tagResults.$2; - - if (selectedNewTagValues.isNotEmpty) { - final upsertedTags = await _tagService.upsertTags(selectedNewTagValues.toList()); - selectedTagIds.addAll(upsertedTags.map((t) => t.id)); - } - if (selectedTagIds.isEmpty) { - return 0; - } - return _tagService.bulkTagAssets(remoteIds, selectedTagIds.toList()); - } - - Future> downloadAll(List assets) { - return _downloadRepository.downloadAllAssets(assets); - } } diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index 7a416a4441..e3a2876d32 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -12,6 +12,7 @@ import 'package:immich_mobile/presentation/actions/archive.action.dart'; import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; import 'package:immich_mobile/presentation/actions/cast.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; import 'package:immich_mobile/presentation/actions/lock.action.dart'; import 'package:immich_mobile/presentation/actions/open_in_browser.action.dart'; import 'package:immich_mobile/presentation/actions/remove_from_album.action.dart'; @@ -24,7 +25,6 @@ import 'package:immich_mobile/presentation/actions/similar_photos.action.dart'; import 'package:immich_mobile/presentation/actions/slideshow.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/download_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -178,7 +178,7 @@ enum ActionButtonType { ActionButtonType.slideshow => const ActionMenuItem(action: SlideshowAction()), ActionButtonType.archive || ActionButtonType.unarchive => ActionMenuItem(action: ArchiveAction(source: context.source)), - ActionButtonType.download => DownloadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), + ActionButtonType.download => ActionMenuItem(action: DownloadAction(source: context.source)), ActionButtonType.restoreTrash => ActionMenuItem(action: RestoreAction(source: context.source)), ActionButtonType.delete => ActionMenuItem(action: DeleteAction(source: context.source)), ActionButtonType.moveToLockFolder || diff --git a/mobile/test/services/action.service_test.dart b/mobile/test/services/action.service_test.dart index 389d4200da..2d90e24503 100644 --- a/mobile/test/services/action.service_test.dart +++ b/mobile/test/services/action.service_test.dart @@ -17,8 +17,6 @@ void main() { late MockAssetApiRepository assetApiRepository; late MockRemoteAssetRepository remoteAssetRepository; - late MockDownloadRepository downloadRepository; - late MockTagService tagService; late Drift db; @@ -39,10 +37,8 @@ void main() { setUp(() { assetApiRepository = MockAssetApiRepository(); remoteAssetRepository = MockRemoteAssetRepository(); - downloadRepository = MockDownloadRepository(); - tagService = MockTagService(); - sut = ActionService(assetApiRepository, remoteAssetRepository, downloadRepository, tagService); + sut = ActionService(assetApiRepository, remoteAssetRepository); }); tearDown(() async { diff --git a/mobile/test/unit/presentation/actions/download_tag_action_test.dart b/mobile/test/unit/presentation/actions/download_tag_action_test.dart new file mode 100644 index 0000000000..382b12ec83 --- /dev/null +++ b/mobile/test/unit/presentation/actions/download_tag_action_test.dart @@ -0,0 +1,159 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/tag.model.dart'; +import 'package:immich_mobile/domain/services/tag.service.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/download.action.dart'; +import 'package:immich_mobile/presentation/actions/tag.action.dart'; +import 'package:immich_mobile/providers/background_sync.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/user_metadata.provider.dart'; +import 'package:immich_mobile/repositories/download.repository.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../repository.mocks.dart'; +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockTagService tagService; + + setUp(() async { + context = await PresentationContext.create(); + tagService = context.service.tag.service; + }); + + tearDown(() { + context.dispose(); + }); + + RemoteAsset owned() => RemoteAssetFactory.create(ownerId: context.currentUser.id); + + group('DownloadAction', () { + Future pumpDownload(WidgetTester tester, Set selection) => tester.pumpTestAction( + context, + const DownloadAction(source: .timeline), + overrides: [ + ...context.selected(selection), + downloadRepositoryProvider.overrideWithValue(context.repository.download.repo), + backgroundSyncProvider.overrideWithValue(context.service.backgroundSync), + ], + ); + + Future settleDownload(WidgetTester tester) async { + await tester.pump(); + await tester.pump(const .new(seconds: 1)); + await tester.pumpAndSettle(); + } + + testWidgets('downloads every selected remote asset', (tester) async { + final asset = owned(); + + await pumpDownload(tester, {asset}); + await settleDownload(tester); + + verify(() => context.repository.download.repo.downloadAllAssets([asset])).called(1); + }); + + testWidgets('ignores local-only assets, which are already on the device', (tester) async { + final remote = owned(); + + await pumpDownload(tester, {remote, LocalAssetFactory.create()}); + await settleDownload(tester); + + verify(() => context.repository.download.repo.downloadAllAssets([remote])).called(1); + }); + + testWidgets('is hidden when nothing remote is selected', (tester) async { + await tester.pumpTestWidget( + context, + const ActionIconButton(action: DownloadAction(source: .timeline)), + overrides: context.selected({LocalAssetFactory.create()}), + ); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('TagAction', () { + late BuildContext actionContext; + late WidgetRef actionRef; + + Future pumpTag(WidgetTester tester, Set selection) => tester.pumpTestWidget( + context, + Consumer( + builder: (widgetContext, ref, _) { + actionContext = widgetContext; + actionRef = ref; + return const ActionIconButton(action: TagAction(source: .timeline)); + }, + ), + overrides: [ + ...context.selected(selection), + toastServiceProvider.overrideWithValue(context.service.toast), + tagServiceProvider.overrideWithValue(tagService), + userMetadataPreferencesProvider.overrideWith((ref) async => const .new(tagsEnabled: true)), + ], + ); + + Future applyTags(List assetIds, {Set selected = const {}, Set created = const {}}) => + tagAssets(actionContext, actionRef, assetIds, selected: selected, created: created); + + testWidgets('offers tagging for an owned asset', (tester) async { + await pumpTag(tester, {owned()}); + + expect(find.byType(ImmichIconButton), findsOneWidget); + }); + + testWidgets('is hidden without any owned asset', (tester) async { + await pumpTag(tester, {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('applies the picked tags and reports the count', (tester) async { + final asset = owned(); + when(() => tagService.bulkTagAssets(any(), any())).thenAnswer((_) async => 1); + + await pumpTag(tester, {asset}); + await applyTags([asset.id], selected: {'tag-1'}); + await tester.pumpAndSettle(); + + verify(() => tagService.bulkTagAssets([asset.id], ['tag-1'])).called(1); + + final message = verify(() => context.service.toast.success(captureAny())).captured.single as String; + expect(message, StaticTranslations.instance.tagged_assets(count: 1)); + }); + + testWidgets('creates new tags first and applies them alongside the picked ones', (tester) async { + final asset = owned(); + when(() => tagService.upsertTags(any())).thenAnswer((_) async => [const Tag(id: 'made-1', value: 'brand new')]); + when(() => tagService.bulkTagAssets(any(), any())).thenAnswer((_) async => 1); + + await pumpTag(tester, {asset}); + await applyTags([asset.id], selected: {'tag-1'}, created: {'brand new'}); + await tester.pumpAndSettle(); + + verify(() => tagService.upsertTags(['brand new'])).called(1); + final tagIds = verify(() => tagService.bulkTagAssets([asset.id], captureAny())).captured.single as List; + expect(tagIds, containsAll(['tag-1', 'made-1'])); + }); + + testWidgets('does nothing when no tag was chosen or created', (tester) async { + final asset = owned(); + + await pumpTag(tester, {asset}); + await applyTags([asset.id]); + await tester.pumpAndSettle(); + + verifyNever(() => tagService.bulkTagAssets(any(), any())); + verifyNever(() => context.service.toast.success(any())); + }); + }); +} From 3d42c1424c2bb446f95aba67c58c8e6f445a460c Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:43 +0530 Subject: [PATCH 54/69] refactor: mobile upload action (#29949) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../presentation/actions/upload.action.dart | 145 ++++++++++++ .../upload_action_button.widget.dart | 152 ------------- .../asset_viewer/bottom_bar.widget.dart | 5 +- .../general_bottom_sheet.widget.dart | 4 +- .../local_album_bottom_sheet.widget.dart | 4 +- mobile/lib/utils/action_button.utils.dart | 6 +- .../actions/upload_action_test.dart | 213 ++++++++++++++++++ 7 files changed, 368 insertions(+), 161 deletions(-) create mode 100644 mobile/lib/presentation/actions/upload.action.dart delete mode 100644 mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart create mode 100644 mobile/test/unit/presentation/actions/upload_action_test.dart diff --git a/mobile/lib/presentation/actions/upload.action.dart b/mobile/lib/presentation/actions/upload.action.dart new file mode 100644 index 0000000000..ceb35c8786 --- /dev/null +++ b/mobile/lib/presentation/actions/upload.action.dart @@ -0,0 +1,145 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/enums.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.dart'; +import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:immich_mobile/utils/error_handler.dart'; +import 'package:immich_ui/immich_ui.dart'; + +final _stateProvider = Provider.family.autoDispose?, ActionSource>((ref, source) { + final assets = ref.watch(assetsActionProvider(source)); + final local = assets.backedUp(isBackedUp: false).local().toList(growable: false); + return local.isEmpty ? null : local; +}); + +class UploadAction extends AssetActionBuilder { + final bool showProgress; + + const UploadAction({required super.source, this.showProgress = false}); + + @override + ActionItem? create(BuildContext context, WidgetRef ref) { + final assets = ref.watch(_stateProvider(source)); + if (assets == null) { + return null; + } + + return .new(icon: Icons.backup_outlined, label: context.t.upload, onAction: () => _upload(context, ref, assets)); + } + + Future _upload(BuildContext context, WidgetRef ref, List assets) async { + try { + if (!showProgress) { + await uploadAssets(context, ref, assets); + return; + } + + // The dialog is not awaited: it stays up while the upload runs and is + // dismissed below, unless the user cancelled it themselves first + var isDialogOpen = true; + unawaited( + showDialog( + context: context, + barrierDismissible: false, + builder: (_) => const _UploadProgressDialog(), + ).whenComplete(() => isDialogOpen = false), + ); + + await uploadAssets(context, ref, assets); + + if (isDialogOpen && context.mounted) { + Navigator.of(context, rootNavigator: true).pop(); + } + } catch (error, stack) { + handleError(error, stack: stack, description: "Failed to upload the assets"); + } + } +} + +@visibleForTesting +Future uploadAssets(BuildContext context, WidgetRef ref, List assets) async { + final progress = ref.read(assetUploadProgressProvider.notifier); + final uploads = ref.read(foregroundUploadServiceProvider); + final toastService = ref.read(toastServiceProvider); + final errorMessage = context.t.scaffold_body_error_occurred; + + final cancelToken = Completer(); + ref.read(manualUploadCancelTokenProvider.notifier).state = cancelToken; + + final uploaded = {}; + final failed = {}; + for (final asset in assets) { + progress.setProgress(asset.id, 0.0); + } + + try { + await uploads.uploadManual( + assets, + cancelToken: cancelToken, + callbacks: UploadCallbacks( + onProgress: (id, _, bytes, total) => progress.setProgress(id, total > 0 ? bytes / total : 0.0), + onSuccess: (id, _) { + uploaded.add(id); + progress.remove(id); + }, + onError: (id, _) { + failed.add(id); + progress.setError(id); + }, + ), + ); + } finally { + ref.read(manualUploadCancelTokenProvider.notifier).state = null; + } + + final uploadedCount = uploaded.difference(failed).length; + if (!cancelToken.isCompleted && (uploadedCount != assets.length || failed.isNotEmpty)) { + toastService.error(errorMessage); + } + + unawaited(Future.delayed(const Duration(seconds: 2), progress.clear)); +} + +class _UploadProgressDialog extends ConsumerWidget { + const _UploadProgressDialog(); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final progressMap = ref.watch(assetUploadProgressProvider); + + final values = progressMap.values.where((value) => value >= 0).toList(growable: false); + final progress = values.isEmpty ? 0.0 : values.reduce((a, b) => a + b) / values.length; + final hasError = progressMap.values.any((value) => value < 0); + + return AlertDialog( + title: Text(context.t.uploading), + content: Column( + mainAxisSize: .min, + children: [ + if (hasError) + const Icon(Icons.error_outline, color: Colors.red, size: 48) + else + CircularProgressIndicator(value: progress > 0 ? progress : null), + const SizedBox(height: 16), + Text(hasError ? context.t.scaffold_body_error_occurred : '${(progress * 100).toInt()}%'), + ], + ), + actions: [ + ImmichTextButton( + onPressed: () { + ref.read(manualUploadCancelTokenProvider)?.complete(); + ref.read(manualUploadCancelTokenProvider.notifier).state = null; + Navigator.of(context, rootNavigator: true).pop(); + }, + labelText: context.t.cancel, + ), + ], + ); + } +} diff --git a/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart deleted file mode 100644 index 1d09ad23a8..0000000000 --- a/mobile/lib/presentation/widgets/action_buttons/upload_action_button.widget.dart +++ /dev/null @@ -1,152 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/extensions/translate_extensions.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; -import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; -import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; -import 'package:immich_mobile/providers/view_intent/view_intent_file_path.provider.dart'; -import 'package:immich_mobile/services/foreground_upload.service.dart'; -import 'package:immich_mobile/services/view_intent.service.dart'; -import 'package:immich_mobile/widgets/common/immich_toast.dart'; -import 'package:immich_ui/immich_ui.dart'; - -class UploadActionButton extends ConsumerWidget { - final ActionSource source; - final bool iconOnly; - final bool menuItem; - - const UploadActionButton({super.key, required this.source, this.iconOnly = false, this.menuItem = false}); - - Future _onTap(BuildContext context, WidgetRef ref) async { - if (!context.mounted) { - return; - } - - final isTimeline = source == ActionSource.timeline; - final viewerIntentFilePath = source == ActionSource.viewer ? ref.read(viewIntentFilePathProvider) : null; - List? assets; - var isUploadDialogOpen = false; - var wasUploadCancelled = false; - Future? uploadDialogFuture; - - if (source == ActionSource.timeline) { - assets = ref.read(multiSelectProvider).selectedAssets.whereType().toList(); - if (assets.isEmpty) { - return; - } - ref.read(multiSelectProvider.notifier).reset(); - } else { - isUploadDialogOpen = true; - uploadDialogFuture = - showDialog( - context: context, - barrierDismissible: false, - builder: (dialogContext) => _UploadProgressDialog( - onCancel: () { - wasUploadCancelled = true; - }, - ), - ).whenComplete(() { - isUploadDialogOpen = false; - }); - unawaited(uploadDialogFuture); - } - - var success = false; - if (!isTimeline && viewerIntentFilePath != null) { - final viewIntentService = ref.read(viewIntentServiceProvider); - viewIntentService.markUploadActive(viewerIntentFilePath); - var hasError = false; - try { - await ref - .read(foregroundUploadServiceProvider) - .uploadShareIntent( - [File(viewerIntentFilePath)], - onError: (_, _) { - hasError = true; - }, - ); - } finally { - await viewIntentService.markUploadInactive(viewerIntentFilePath); - } - success = !hasError; - } else { - final result = await ref.read(actionProvider.notifier).upload(source, assets: assets); - success = result.success; - } - - if (!isTimeline && context.mounted && isUploadDialogOpen) { - Navigator.of(context, rootNavigator: true).pop(); - } - - if (context.mounted && !success && !wasUploadCancelled) { - ImmichToast.show( - context: context, - msg: 'scaffold_body_error_occurred'.t(context: context), - gravity: ToastGravity.BOTTOM, - toastType: ToastType.error, - ); - } - } - - @override - Widget build(BuildContext context, WidgetRef ref) { - return BaseActionButton( - iconData: Icons.backup_outlined, - label: "upload".t(context: context), - iconOnly: iconOnly, - menuItem: menuItem, - onPressed: () => _onTap(context, ref), - ); - } -} - -class _UploadProgressDialog extends ConsumerWidget { - final VoidCallback onCancel; - - const _UploadProgressDialog({required this.onCancel}); - - @override - Widget build(BuildContext context, WidgetRef ref) { - final progressMap = ref.watch(assetUploadProgressProvider); - - // Calculate overall progress from all assets - final values = progressMap.values.where((v) => v >= 0).toList(); - final progress = values.isEmpty ? 0.0 : values.reduce((a, b) => a + b) / values.length; - final hasError = progressMap.values.any((v) => v < 0); - final percentage = (progress * 100).toInt(); - - return AlertDialog( - title: Text('uploading'.t(context: context)), - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (hasError) - const Icon(Icons.error_outline, color: Colors.red, size: 48) - else - CircularProgressIndicator(value: progress > 0 ? progress : null), - const SizedBox(height: 16), - Text(hasError ? 'Error' : '$percentage%'), - ], - ), - actions: [ - ImmichTextButton( - onPressed: () { - ref.read(manualUploadCancelTokenProvider)?.complete(); - ref.read(manualUploadCancelTokenProvider.notifier).state = null; - onCancel(); - Navigator.of(context, rootNavigator: true).pop(); - }, - labelText: 'cancel'.t(context: context), - ), - ], - ); - } -} diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart index c1f6ec8b47..fb82b61d62 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/services/timeline.service.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; @@ -8,8 +7,8 @@ import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/edit_asset.action.dart'; import 'package:immich_mobile/presentation/actions/restore.action.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/add_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/ocr_toggle_button.widget.dart'; import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; @@ -49,7 +48,7 @@ class ViewerBottomBar extends ConsumerWidget { if (!isInLockedView) ...[ if (!isInTrash) ...[ - if (asset.isLocalOnly) const UploadActionButton(source: ActionSource.viewer), + ..._actionColumnButtons(context, ref, const [UploadAction(source: .viewer, showProgress: true)]), ..._actionColumnButtons(context, ref, const [EditAssetAction(source: .viewer)]), if (asset.hasRemote) AddActionButton(originalTheme: originalTheme), ], diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index 2ad037f2ad..df0fca336f 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -15,7 +15,7 @@ import 'package:immich_mobile/presentation/actions/share.action.dart'; import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/actions/tag.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -93,7 +93,7 @@ class _GeneralBottomSheetState extends ConsumerState { ], const ActionColumnButton(action: DeleteAction(source: .timeline)), const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), - if (multiselect.onlyLocal) const UploadActionButton(source: ActionSource.timeline), + const ActionColumnButton(action: UploadAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart index 3e8d982a21..80a5b43686 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart @@ -6,7 +6,7 @@ import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; @@ -69,7 +69,7 @@ class _LocalAlbumBottomSheetState extends ConsumerState { ActionColumnButton(action: ShareAction(source: .timeline)), ActionColumnButton(action: DeleteAction(source: .timeline)), ActionColumnButton(action: CleanupLocalAction(source: .timeline)), - UploadActionButton(source: ActionSource.timeline), + ActionColumnButton(action: UploadAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index e3a2876d32..28a9442dc7 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -24,9 +24,9 @@ import 'package:immich_mobile/presentation/actions/share_link.action.dart'; import 'package:immich_mobile/presentation/actions/similar_photos.action.dart'; import 'package:immich_mobile/presentation/actions/slideshow.action.dart'; import 'package:immich_mobile/presentation/actions/stack.action.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; -import 'package:immich_mobile/presentation/widgets/action_buttons/upload_action_button.widget.dart'; import 'package:immich_mobile/routing/router.dart'; class ActionButtonContext { @@ -184,7 +184,9 @@ enum ActionButtonType { ActionButtonType.moveToLockFolder || ActionButtonType.removeFromLockFolder => ActionMenuItem(action: LockAction(source: context.source)), ActionButtonType.deleteLocal => ActionMenuItem(action: CleanupLocalAction(source: context.source)), - ActionButtonType.upload => UploadActionButton(source: context.source, iconOnly: iconOnly, menuItem: menuItem), + ActionButtonType.upload => ActionMenuItem( + action: UploadAction(source: context.source, showProgress: context.source == ActionSource.viewer), + ), ActionButtonType.removeFromAlbum => ActionMenuItem( action: RemoveFromAlbumAction(source: context.source, albumId: context.currentAlbum!.id), ), diff --git a/mobile/test/unit/presentation/actions/upload_action_test.dart b/mobile/test/unit/presentation/actions/upload_action_test.dart new file mode 100644 index 0000000000..2489f3100c --- /dev/null +++ b/mobile/test/unit/presentation/actions/upload_action_test.dart @@ -0,0 +1,213 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/generated/translations.g.dart'; +import 'package:immich_mobile/presentation/actions/action.widget.dart'; +import 'package:immich_mobile/presentation/actions/upload.action.dart'; +import 'package:immich_mobile/providers/backup/asset_upload_progress.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/toast.provider.dart'; +import 'package:immich_mobile/services/foreground_upload.service.dart'; +import 'package:immich_ui/immich_ui.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../../service.mocks.dart'; +import '../../factories/local_asset_factory.dart'; +import '../../factories/remote_asset_factory.dart'; +import '../presentation_context.dart'; + +void main() { + late PresentationContext context; + late MockForegroundUploadService uploadService; + + setUp(() async { + context = await PresentationContext.create(); + uploadService = context.service.upload; + }); + + tearDown(() { + context.dispose(); + }); + + List uploadOverrides() => [ + foregroundUploadServiceProvider.overrideWithValue(uploadService), + toastServiceProvider.overrideWithValue(context.service.toast), + ]; + + Future pumpUpload(WidgetTester tester, Set selection, {bool showProgress = false}) => + tester.pumpTestWidget( + context, + ActionIconButton( + action: UploadAction(source: .timeline, showProgress: showProgress), + ), + overrides: [...context.selected(selection), ...uploadOverrides()], + ); + + Future settleUpload(WidgetTester tester) async { + await tester.pump(); + await tester.pump(const .new(seconds: 2)); + await tester.pumpAndSettle(); + } + + void answerUploadWith({Set succeeded = const {}, Set failed = const {}, Completer? until}) { + when( + () => uploadService.uploadManual( + any(), + cancelToken: any(named: 'cancelToken'), + callbacks: any(named: 'callbacks'), + ), + ).thenAnswer((invocation) async { + if (until != null) { + await until.future; + } + final callbacks = invocation.namedArguments[#callbacks] as UploadCallbacks; + for (final id in succeeded) { + callbacks.onSuccess?.call(id, id); + } + for (final id in failed) { + callbacks.onError?.call(id, 'boom'); + } + }); + } + + group('UploadAction', () { + testWidgets('uploads the selected local assets', (tester) async { + final asset = LocalAssetFactory.create(); + answerUploadWith(succeeded: {asset.id}); + + await pumpUpload(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await settleUpload(tester); + + final uploaded = + verify( + () => uploadService.uploadManual( + captureAny(), + cancelToken: any(named: 'cancelToken'), + callbacks: any(named: 'callbacks'), + ), + ).captured.single + as List; + expect(uploaded.map((a) => a.id), [asset.id]); + }); + + testWidgets('ignores assets that are already backed up', (tester) async { + final notBackedUp = LocalAssetFactory.create(); + answerUploadWith(succeeded: {notBackedUp.id}); + + await pumpUpload(tester, {notBackedUp, LocalAssetFactory.create(remoteId: 'already-there')}); + await tester.tap(find.byType(ImmichIconButton)); + await settleUpload(tester); + + final uploaded = + verify( + () => uploadService.uploadManual( + captureAny(), + cancelToken: any(named: 'cancelToken'), + callbacks: any(named: 'callbacks'), + ), + ).captured.single + as List; + expect(uploaded.map((a) => a.id), [notBackedUp.id]); + }); + + testWidgets('reports an error when an asset fails to upload', (tester) async { + final asset = LocalAssetFactory.create(); + answerUploadWith(failed: {asset.id}); + + await pumpUpload(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await settleUpload(tester); + + final message = verify(() => context.service.toast.error(captureAny())).captured.single as String; + expect(message, StaticTranslations.instance.scaffold_body_error_occurred); + }); + + testWidgets('treats a cancelled upload as deliberate, not a failure', (tester) async { + final asset = LocalAssetFactory.create(); + when( + () => uploadService.uploadManual( + any(), + cancelToken: any(named: 'cancelToken'), + callbacks: any(named: 'callbacks'), + ), + ).thenAnswer((invocation) async { + (invocation.namedArguments[#cancelToken] as Completer).complete(); + }); + + await pumpUpload(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await settleUpload(tester); + + verifyNever(() => context.service.toast.error(any())); + }); + + testWidgets('shows the progress dialog while uploading and closes it after', (tester) async { + final asset = LocalAssetFactory.create(); + final uploading = Completer(); + answerUploadWith(succeeded: {asset.id}, until: uploading); + + await pumpUpload(tester, {asset}, showProgress: true); + await tester.tap(find.byType(ImmichIconButton)); + await tester.pump(); + + expect(find.text(StaticTranslations.instance.uploading), findsOneWidget); + + uploading.complete(); + await settleUpload(tester); + + expect(find.text(StaticTranslations.instance.uploading), findsNothing); + }); + + testWidgets('shows no dialog when not asked to', (tester) async { + final asset = LocalAssetFactory.create(); + answerUploadWith(succeeded: {asset.id}); + + await pumpUpload(tester, {asset}); + await tester.tap(find.byType(ImmichIconButton)); + await tester.pump(); + + expect(find.text(StaticTranslations.instance.uploading), findsNothing); + await settleUpload(tester); + }); + + testWidgets('is hidden for a remote asset, which has nothing to upload', (tester) async { + await pumpUpload(tester, {RemoteAssetFactory.create()}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + + testWidgets('is hidden when every local asset is already backed up', (tester) async { + await pumpUpload(tester, {LocalAssetFactory.create(remoteId: 'already-there')}); + + expect(find.byType(ImmichIconButton), findsNothing); + }); + }); + + group('uploadAssets', () { + testWidgets('clears the tracked progress once the upload settles', (tester) async { + final asset = LocalAssetFactory.create(); + answerUploadWith(succeeded: {asset.id}); + + late WidgetRef capturedRef; + await tester.pumpTestWidget( + context, + Consumer( + builder: (_, ref, _) { + capturedRef = ref; + return const SizedBox.shrink(); + }, + ), + overrides: uploadOverrides(), + ); + + await uploadAssets(tester.element(find.byType(SizedBox)), capturedRef, [asset]); + await settleUpload(tester); + + expect(capturedRef.read(assetUploadProgressProvider), isEmpty); + expect(capturedRef.read(manualUploadCancelTokenProvider), isNull); + }); + }); +} From cafd6c7c0f12add9b2c0f06a0cc1c26ef26e2756 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sat, 1 Aug 2026 08:06:44 +0530 Subject: [PATCH 55/69] refactor: cleanup actions & action tests (#30265) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../repositories/settings.repository.dart | 10 ++++++ .../asset_viewer/bottom_bar.widget.dart | 9 ++--- .../archive_bottom_sheet.widget.dart | 29 +++++++-------- .../favorite_bottom_sheet.widget.dart | 26 +++++++------- .../general_bottom_sheet.widget.dart | 36 +++++++++---------- .../local_album_bottom_sheet.widget.dart | 10 +++--- .../locked_folder_bottom_sheet.widget.dart | 10 +++--- .../partner_detail_bottom_sheet.widget.dart | 6 ++-- .../remote_album_bottom_sheet.widget.dart | 34 ++++++++---------- .../trash_bottom_sheet.widget.dart | 6 ++-- .../local_album_repository_test.dart | 4 +++ .../asset_viewer_system_ui_test.dart | 4 +++ mobile/test/unit/mocks.dart | 4 +++ .../actions/album_action_test.dart | 4 +-- .../actions/archive_action_test.dart | 4 +-- .../actions/asset_debug_action_test.dart | 4 +-- .../actions/cast_action_test.dart | 4 +-- .../actions/delete_action_test.dart | 2 +- .../actions/download_tag_action_test.dart | 4 +-- .../actions/edit_action_test.dart | 4 +-- .../actions/favorite_action_test.dart | 4 +-- .../actions/lock_action_test.dart | 4 +-- .../actions/open_in_browser_action_test.dart | 4 +-- .../actions/partner_action_test.dart | 4 +-- .../actions/restore_action_test.dart | 4 +-- .../actions/share_action_test.dart | 14 ++------ .../actions/stack_action_test.dart | 4 +-- .../actions/upload_action_test.dart | 4 +-- .../unit/presentation/partner_page_test.dart | 2 +- .../presentation/presentation_context.dart | 6 ++-- 30 files changed, 132 insertions(+), 132 deletions(-) diff --git a/mobile/lib/infrastructure/repositories/settings.repository.dart b/mobile/lib/infrastructure/repositories/settings.repository.dart index 7063779336..c5f8fb48d8 100644 --- a/mobile/lib/infrastructure/repositories/settings.repository.dart +++ b/mobile/lib/infrastructure/repositories/settings.repository.dart @@ -1,4 +1,5 @@ import 'package:drift/drift.dart'; +import 'package:flutter/foundation.dart'; import 'package:immich_mobile/domain/models/config/app_config.dart'; import 'package:immich_mobile/domain/models/settings_key.dart'; import 'package:immich_mobile/infrastructure/entities/settings.entity.drift.dart'; @@ -29,6 +30,15 @@ class SettingsRepository extends CachedKeyValueRepository reset() async { + final instance = _instance; + if (instance != null) { + await instance.clear(SettingsKey.values); + _instance = null; + } + } + @override List get keys => SettingsKey.values; diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart index fb82b61d62..3ed2b3a576 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart @@ -43,13 +43,14 @@ class ViewerBottomBar extends ConsumerWidget { final originalTheme = context.themeData; final actions = [ - ..._actionColumnButtons(context, ref, const [RestoreAction(source: .viewer)]), - ..._actionColumnButtons(context, ref, const [ShareAction(source: .viewer)]), + ..._actionColumnButtons(context, ref, const [RestoreAction(source: .viewer), ShareAction(source: .viewer)]), if (!isInLockedView) ...[ if (!isInTrash) ...[ - ..._actionColumnButtons(context, ref, const [UploadAction(source: .viewer, showProgress: true)]), - ..._actionColumnButtons(context, ref, const [EditAssetAction(source: .viewer)]), + ..._actionColumnButtons(context, ref, const [ + UploadAction(source: .viewer, showProgress: true), + EditAssetAction(source: .viewer), + ]), if (asset.hasRemote) AddActionButton(originalTheme: originalTheme), ], ..._actionColumnButtons(context, ref, const [DeleteAction(source: .viewer)]), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart index 032ccda917..3e5edaa149 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/archive_bottom_sheet.widget.dart @@ -17,7 +17,6 @@ import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; class ArchiveBottomSheet extends ConsumerStatefulWidget { @@ -44,8 +43,6 @@ class _ArchiveBottomSheetState extends ConsumerState { @override Widget build(BuildContext context) { - final multiselect = ref.watch(multiSelectProvider); - Future addToAlbum(RemoteAlbum album) async { final result = await ref.read(actionProvider.notifier).addToAlbum(ActionSource.timeline, album); @@ -75,20 +72,18 @@ class _ArchiveBottomSheetState extends ConsumerState { initialChildSize: 0.25, maxChildSize: 0.85, shouldCloseOnMinExtent: false, - actions: [ - const ActionColumnButton(action: ShareAction(source: .timeline)), - if (multiselect.hasRemote) ...[ - const ActionColumnButton(action: ShareLinkAction(source: .timeline)), - const ActionColumnButton(action: ArchiveAction(source: .timeline)), - const ActionColumnButton(action: FavoriteAction(source: .timeline)), - const ActionColumnButton(action: DownloadAction(source: .timeline)), - const ActionColumnButton(action: DeleteAction(source: .timeline)), - const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), - const ActionColumnButton(action: EditLocationAction(source: .timeline)), - const ActionColumnButton(action: LockAction(source: .timeline)), - const ActionColumnButton(action: StackAction(source: .timeline)), - ], - const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), + actions: const [ + .new(action: ShareAction(source: .timeline)), + .new(action: ShareLinkAction(source: .timeline)), + .new(action: ArchiveAction(source: .timeline)), + .new(action: FavoriteAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: EditDateTimeAction(source: .timeline)), + .new(action: EditLocationAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), + .new(action: StackAction(source: .timeline)), + .new(action: CleanupLocalAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart index ea213fbdc7..7540da4fff 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/favorite_bottom_sheet.widget.dart @@ -74,20 +74,18 @@ class FavoriteBottomSheet extends ConsumerWidget { initialChildSize: 0.4, maxChildSize: 0.7, shouldCloseOnMinExtent: false, - actions: [ - const ActionColumnButton(action: ShareAction(source: .timeline)), - if (multiselect.hasRemote) ...[ - const ActionColumnButton(action: ShareLinkAction(source: .timeline)), - const ActionColumnButton(action: FavoriteAction(source: .timeline)), - const ActionColumnButton(action: ArchiveAction(source: .timeline)), - const ActionColumnButton(action: DownloadAction(source: .timeline)), - const ActionColumnButton(action: DeleteAction(source: .timeline)), - const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), - const ActionColumnButton(action: EditLocationAction(source: .timeline)), - const ActionColumnButton(action: LockAction(source: .timeline)), - const ActionColumnButton(action: StackAction(source: .timeline)), - ], - const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), + actions: const [ + .new(action: ShareAction(source: .timeline)), + .new(action: ShareLinkAction(source: .timeline)), + .new(action: FavoriteAction(source: .timeline)), + .new(action: ArchiveAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: EditDateTimeAction(source: .timeline)), + .new(action: EditLocationAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), + .new(action: StackAction(source: .timeline)), + .new(action: CleanupLocalAction(source: .timeline)), ], slivers: multiselect.hasRemote ? [const AddToAlbumHeader(), AlbumSelector(onAlbumSelected: addAssetsToAlbum)] diff --git a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart index df0fca336f..d5407e768f 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart @@ -5,6 +5,7 @@ import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/archive.action.dart'; +import 'package:immich_mobile/presentation/actions/asset_debug.action.dart'; import 'package:immich_mobile/presentation/actions/delete.action.dart'; import 'package:immich_mobile/presentation/actions/download.action.dart'; import 'package:immich_mobile/presentation/actions/edit_datetime.action.dart'; @@ -19,7 +20,6 @@ import 'package:immich_mobile/presentation/actions/upload.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; class GeneralBottomSheet extends ConsumerStatefulWidget { @@ -46,8 +46,6 @@ class _GeneralBottomSheetState extends ConsumerState { @override Widget build(BuildContext context) { - final multiselect = ref.watch(multiSelectProvider); - Future addToAlbum(RemoteAlbum album) async { final result = await ref.read(actionProvider.notifier).addToAlbum(ActionSource.timeline, album); @@ -77,23 +75,21 @@ class _GeneralBottomSheetState extends ConsumerState { minChildSize: widget.minChildSize, maxChildSize: 0.85, shouldCloseOnMinExtent: false, - actions: [ - const ActionColumnButton(action: FavoriteAction(source: .timeline)), - const ActionColumnButton(action: ShareAction(source: .timeline)), - if (multiselect.hasRemote) ...[ - const ActionColumnButton(action: ShareLinkAction(source: .timeline)), - const ActionColumnButton(action: DownloadAction(source: .timeline)), - const ActionColumnButton(action: FavoriteAction(source: .timeline)), - const ActionColumnButton(action: ArchiveAction(source: .timeline)), - const ActionColumnButton(action: TagAction(source: .timeline)), - const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), - const ActionColumnButton(action: EditLocationAction(source: .timeline)), - const ActionColumnButton(action: LockAction(source: .timeline)), - const ActionColumnButton(action: StackAction(source: .timeline)), - ], - const ActionColumnButton(action: DeleteAction(source: .timeline)), - const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), - const ActionColumnButton(action: UploadAction(source: .timeline)), + actions: const [ + .new(action: AssetDebugAction(source: .timeline)), + .new(action: ShareAction(source: .timeline)), + .new(action: ShareLinkAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: FavoriteAction(source: .timeline)), + .new(action: ArchiveAction(source: .timeline)), + .new(action: TagAction(source: .timeline)), + .new(action: EditDateTimeAction(source: .timeline)), + .new(action: EditLocationAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), + .new(action: StackAction(source: .timeline)), + .new(action: CleanupLocalAction(source: .timeline)), + .new(action: UploadAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart index 80a5b43686..478b37212e 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/local_album_bottom_sheet.widget.dart @@ -65,11 +65,11 @@ class _LocalAlbumBottomSheetState extends ConsumerState { initialChildSize: 0.25, maxChildSize: 0.85, shouldCloseOnMinExtent: false, - actions: const [ - ActionColumnButton(action: ShareAction(source: .timeline)), - ActionColumnButton(action: DeleteAction(source: .timeline)), - ActionColumnButton(action: CleanupLocalAction(source: .timeline)), - ActionColumnButton(action: UploadAction(source: .timeline)), + actions: const [ + .new(action: ShareAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: CleanupLocalAction(source: .timeline)), + .new(action: UploadAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart index 1d3d5b0d26..d7334337ae 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/locked_folder_bottom_sheet.widget.dart @@ -16,11 +16,11 @@ class LockedFolderBottomSheet extends ConsumerWidget { initialChildSize: 0.25, maxChildSize: 0.4, shouldCloseOnMinExtent: false, - actions: [ - ActionColumnButton(action: ShareAction(source: .timeline)), - ActionColumnButton(action: DownloadAction(source: .timeline)), - ActionColumnButton(action: DeleteAction(source: .timeline)), - ActionColumnButton(action: LockAction(source: .timeline)), + actions: [ + .new(action: ShareAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), + .new(action: DeleteAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), ], ); } diff --git a/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart index 8edc2e04e6..8a20f26c73 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/partner_detail_bottom_sheet.widget.dart @@ -64,9 +64,9 @@ class _PartnerDetailBottomSheetState extends ConsumerState[ + .new(action: ShareAction(source: .timeline)), + .new(action: DownloadAction(source: .timeline)), ], slivers: [ const AddToAlbumHeader(), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart index aacb3fa1a1..1e51a26811 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart @@ -19,7 +19,6 @@ import 'package:immich_mobile/presentation/actions/stack.action.dart'; import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/infrastructure/action.provider.dart'; -import 'package:immich_mobile/providers/timeline/multiselect.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/widgets/common/immich_toast.dart'; @@ -48,7 +47,6 @@ class _RemoteAlbumBottomSheetState extends ConsumerState @override Widget build(BuildContext context) { - final multiselect = ref.watch(multiSelectProvider); final ownsAlbum = ref.watch(currentUserProvider)?.id == widget.album.ownerId; Future addToAlbum(RemoteAlbum album) async { @@ -85,25 +83,23 @@ class _RemoteAlbumBottomSheetState extends ConsumerState minChildSize: 0.22, maxChildSize: 0.85, shouldCloseOnMinExtent: false, - actions: [ - const ActionColumnButton(action: ShareAction(source: .timeline)), - if (multiselect.hasRemote) ...[ - const ActionColumnButton(action: ShareLinkAction(source: .timeline)), + actions: [ + const .new(action: ShareAction(source: .timeline)), + const .new(action: ShareLinkAction(source: .timeline)), - if (ownsAlbum) ...[ - const ActionColumnButton(action: ArchiveAction(source: .timeline)), - const ActionColumnButton(action: FavoriteAction(source: .timeline)), - ], - const ActionColumnButton(action: DownloadAction(source: .timeline)), - if (ownsAlbum) ...[ - const ActionColumnButton(action: DeleteAction(source: .timeline)), - const ActionColumnButton(action: EditDateTimeAction(source: .timeline)), - const ActionColumnButton(action: EditLocationAction(source: .timeline)), - const ActionColumnButton(action: LockAction(source: .timeline)), - const ActionColumnButton(action: StackAction(source: .timeline)), - ], + if (ownsAlbum) ...const [ + .new(action: ArchiveAction(source: .timeline)), + .new(action: FavoriteAction(source: .timeline)), ], - const ActionColumnButton(action: CleanupLocalAction(source: .timeline)), + const .new(action: DownloadAction(source: .timeline)), + if (ownsAlbum) ...const [ + .new(action: DeleteAction(source: .timeline)), + .new(action: EditDateTimeAction(source: .timeline)), + .new(action: EditLocationAction(source: .timeline)), + .new(action: LockAction(source: .timeline)), + .new(action: StackAction(source: .timeline)), + ], + const .new(action: CleanupLocalAction(source: .timeline)), if (ownsAlbum) ...[ ActionColumnButton( action: RemoveFromAlbumAction(source: .timeline, albumId: widget.album.id), diff --git a/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart index 31a36cb970..1d378f1350 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/trash_bottom_sheet.widget.dart @@ -19,9 +19,9 @@ class TrashBottomBar extends ConsumerWidget { top: false, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - ActionColumnButton(action: DeleteAction(source: .timeline)), - ActionColumnButton(action: RestoreAction(source: .timeline)), + children: [ + .new(action: DeleteAction(source: .timeline)), + .new(action: RestoreAction(source: .timeline)), ], ), ), diff --git a/mobile/test/infrastructure/repositories/local_album_repository_test.dart b/mobile/test/infrastructure/repositories/local_album_repository_test.dart index bd4acca483..ada4281e2a 100644 --- a/mobile/test/infrastructure/repositories/local_album_repository_test.dart +++ b/mobile/test/infrastructure/repositories/local_album_repository_test.dart @@ -17,6 +17,10 @@ void main() { mediumFactory = MediumFactory(db); }); + tearDown(() async { + await db.close(); + }); + group('getAll', () { test('sorts albums by backupSelection & isIosSharedAlbum', () async { final localAlbumRepo = mediumFactory.getRepository(); diff --git a/mobile/test/presentation/widgets/asset_viewer/asset_viewer_system_ui_test.dart b/mobile/test/presentation/widgets/asset_viewer/asset_viewer_system_ui_test.dart index 14d876a654..3ec55bb515 100644 --- a/mobile/test/presentation/widgets/asset_viewer/asset_viewer_system_ui_test.dart +++ b/mobile/test/presentation/widgets/asset_viewer/asset_viewer_system_ui_test.dart @@ -39,6 +39,10 @@ void main() { context = await PresentationContext.create(); }); + tearDown(() async { + await context.dispose(); + }); + testWidgets('status bar icons are light while the asset viewer is open in light mode', (tester) async { // Emulate arriving from a light-themed page whose AppBar set dark status // bar icons (the state the viewer is opened from in light mode). diff --git a/mobile/test/unit/mocks.dart b/mobile/test/unit/mocks.dart index 31dfb6f862..1d43198263 100644 --- a/mobile/test/unit/mocks.dart +++ b/mobile/test/unit/mocks.dart @@ -95,6 +95,7 @@ class RepositoryMocks { void _stubAssetMediaRepository() { when(assetMedia.shareAssets).thenAnswer((_) async => 1); + when(assetMedia.getOriginalFilename).thenAnswer((_) async => null); } void _stubDownloadRepository() { @@ -389,6 +390,9 @@ extension type const AssetMediaRepositoryStub(MockAssetMediaRepository api) impl cancelCompleter: any(named: 'cancelCompleter'), onAssetDownloadProgress: any(named: 'onAssetDownloadProgress'), ); + + Future Function() get getOriginalFilename => + () => api.getOriginalFilename(any()); } extension type const DownloadRepositoryStub(MockDownloadRepository repo) implements Stub { diff --git a/mobile/test/unit/presentation/actions/album_action_test.dart b/mobile/test/unit/presentation/actions/album_action_test.dart index 1cf413cbdc..7baa14a4eb 100644 --- a/mobile/test/unit/presentation/actions/album_action_test.dart +++ b/mobile/test/unit/presentation/actions/album_action_test.dart @@ -26,8 +26,8 @@ void main() { albumService = context.service.album.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); List withMockToast() => [toastServiceProvider.overrideWithValue(context.service.toast)]; diff --git a/mobile/test/unit/presentation/actions/archive_action_test.dart b/mobile/test/unit/presentation/actions/archive_action_test.dart index 82f015903f..555d6af2ff 100644 --- a/mobile/test/unit/presentation/actions/archive_action_test.dart +++ b/mobile/test/unit/presentation/actions/archive_action_test.dart @@ -20,8 +20,8 @@ void main() { assetService = context.service.asset.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); RemoteAsset owned({AssetVisibility visibility = .timeline}) => diff --git a/mobile/test/unit/presentation/actions/asset_debug_action_test.dart b/mobile/test/unit/presentation/actions/asset_debug_action_test.dart index 1644df0396..f545075809 100644 --- a/mobile/test/unit/presentation/actions/asset_debug_action_test.dart +++ b/mobile/test/unit/presentation/actions/asset_debug_action_test.dart @@ -16,8 +16,8 @@ void main() { await StoreService.I.put(StoreKey.advancedTroubleshooting, true); }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); group('AssetDebugAction', () { diff --git a/mobile/test/unit/presentation/actions/cast_action_test.dart b/mobile/test/unit/presentation/actions/cast_action_test.dart index 45f1a842f5..7c16ea398e 100644 --- a/mobile/test/unit/presentation/actions/cast_action_test.dart +++ b/mobile/test/unit/presentation/actions/cast_action_test.dart @@ -13,8 +13,8 @@ void main() { context = await PresentationContext.create(); }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); void Function(bool) captureConnectionListener() => diff --git a/mobile/test/unit/presentation/actions/delete_action_test.dart b/mobile/test/unit/presentation/actions/delete_action_test.dart index 4b75b01eaf..29d81a5c2c 100644 --- a/mobile/test/unit/presentation/actions/delete_action_test.dart +++ b/mobile/test/unit/presentation/actions/delete_action_test.dart @@ -32,7 +32,7 @@ void main() { tearDown(() async { debugDefaultTargetPlatformOverride = null; await StoreService.I.put(StoreKey.manageLocalMediaAndroid, false); - context.dispose(); + await context.dispose(); }); RemoteAsset owned({AssetVisibility visibility = .timeline, DateTime? deletedAt, String? localId}) => diff --git a/mobile/test/unit/presentation/actions/download_tag_action_test.dart b/mobile/test/unit/presentation/actions/download_tag_action_test.dart index 382b12ec83..de003ffed5 100644 --- a/mobile/test/unit/presentation/actions/download_tag_action_test.dart +++ b/mobile/test/unit/presentation/actions/download_tag_action_test.dart @@ -29,8 +29,8 @@ void main() { tagService = context.service.tag.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); RemoteAsset owned() => RemoteAssetFactory.create(ownerId: context.currentUser.id); diff --git a/mobile/test/unit/presentation/actions/edit_action_test.dart b/mobile/test/unit/presentation/actions/edit_action_test.dart index 063301f9c4..9e8dcfb4b2 100644 --- a/mobile/test/unit/presentation/actions/edit_action_test.dart +++ b/mobile/test/unit/presentation/actions/edit_action_test.dart @@ -28,8 +28,8 @@ void main() { assetService = context.service.asset.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); RemoteAsset owned({AssetType type = .image}) => diff --git a/mobile/test/unit/presentation/actions/favorite_action_test.dart b/mobile/test/unit/presentation/actions/favorite_action_test.dart index cb4d6130ab..4d61965b1f 100644 --- a/mobile/test/unit/presentation/actions/favorite_action_test.dart +++ b/mobile/test/unit/presentation/actions/favorite_action_test.dart @@ -20,8 +20,8 @@ void main() { assetService = context.service.asset.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); RemoteAsset owned({bool isFavorite = false}) => diff --git a/mobile/test/unit/presentation/actions/lock_action_test.dart b/mobile/test/unit/presentation/actions/lock_action_test.dart index f5ffbd73d4..9bad0f5a43 100644 --- a/mobile/test/unit/presentation/actions/lock_action_test.dart +++ b/mobile/test/unit/presentation/actions/lock_action_test.dart @@ -18,8 +18,8 @@ void main() { assetService = context.service.asset.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); RemoteAsset owned({AssetVisibility visibility = .timeline}) => diff --git a/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart b/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart index 0ed99e7704..edd9ec4a7c 100644 --- a/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart +++ b/mobile/test/unit/presentation/actions/open_in_browser_action_test.dart @@ -13,8 +13,8 @@ void main() { context = await PresentationContext.create(); }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); group('webPathFor', () { diff --git a/mobile/test/unit/presentation/actions/partner_action_test.dart b/mobile/test/unit/presentation/actions/partner_action_test.dart index a1d645ffec..786d2d7f60 100644 --- a/mobile/test/unit/presentation/actions/partner_action_test.dart +++ b/mobile/test/unit/presentation/actions/partner_action_test.dart @@ -19,8 +19,8 @@ void main() { partnerService = context.service.partner.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); List overrides({List candidates = const []}) => [ diff --git a/mobile/test/unit/presentation/actions/restore_action_test.dart b/mobile/test/unit/presentation/actions/restore_action_test.dart index 4597e7ccb0..530e1b76e9 100644 --- a/mobile/test/unit/presentation/actions/restore_action_test.dart +++ b/mobile/test/unit/presentation/actions/restore_action_test.dart @@ -18,8 +18,8 @@ void main() { assetService = context.service.asset.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); RemoteAsset owned({bool trashed = true}) => diff --git a/mobile/test/unit/presentation/actions/share_action_test.dart b/mobile/test/unit/presentation/actions/share_action_test.dart index 9faa6e3a5f..20cc25b73b 100644 --- a/mobile/test/unit/presentation/actions/share_action_test.dart +++ b/mobile/test/unit/presentation/actions/share_action_test.dart @@ -1,12 +1,8 @@ -import 'package:drift/drift.dart'; -import 'package:drift/native.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/enums.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; -import 'package:immich_mobile/domain/models/settings_key.dart'; -import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; import 'package:immich_mobile/presentation/actions/share.action.dart'; @@ -21,18 +17,12 @@ import '../presentation_context.dart'; void main() { late PresentationContext context; - setUpAll(() async { - final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); - await SettingsRepository.ensureInitialized(db); - }); - setUp(() async { context = await PresentationContext.create(); - await SettingsRepository.instance.clear([SettingsKey.shareFileType]); }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); late BuildContext actionContext; diff --git a/mobile/test/unit/presentation/actions/stack_action_test.dart b/mobile/test/unit/presentation/actions/stack_action_test.dart index fdaf83886c..11321c28af 100644 --- a/mobile/test/unit/presentation/actions/stack_action_test.dart +++ b/mobile/test/unit/presentation/actions/stack_action_test.dart @@ -18,8 +18,8 @@ void main() { assetService = context.service.asset.service; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); RemoteAsset owned({String? stackId}) => RemoteAssetFactory.create(ownerId: context.currentUser.id, stackId: stackId); diff --git a/mobile/test/unit/presentation/actions/upload_action_test.dart b/mobile/test/unit/presentation/actions/upload_action_test.dart index 2489f3100c..8aeb7a915f 100644 --- a/mobile/test/unit/presentation/actions/upload_action_test.dart +++ b/mobile/test/unit/presentation/actions/upload_action_test.dart @@ -27,8 +27,8 @@ void main() { uploadService = context.service.upload; }); - tearDown(() { - context.dispose(); + tearDown(() async { + await context.dispose(); }); List uploadOverrides() => [ diff --git a/mobile/test/unit/presentation/partner_page_test.dart b/mobile/test/unit/presentation/partner_page_test.dart index e6ff8fc83f..2cabbb9d4c 100644 --- a/mobile/test/unit/presentation/partner_page_test.dart +++ b/mobile/test/unit/presentation/partner_page_test.dart @@ -15,7 +15,7 @@ void main() { late PresentationContext context; setUp(() async => context = await PresentationContext.create()); - tearDown(() => context.dispose()); + tearDown(() async => await context.dispose()); group('PartnerSharedByList', () { testWidgets('shows the empty-state add button when there are no partners', (tester) async { diff --git a/mobile/test/unit/presentation/presentation_context.dart b/mobile/test/unit/presentation/presentation_context.dart index 43c76c8bf8..5b23890ef8 100644 --- a/mobile/test/unit/presentation/presentation_context.dart +++ b/mobile/test/unit/presentation/presentation_context.dart @@ -11,6 +11,7 @@ import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/domain/services/store.service.dart'; import 'package:immich_mobile/generated/codegen_loader.g.dart'; import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; import 'package:immich_mobile/presentation/actions/action.dart'; import 'package:immich_mobile/presentation/actions/action.widget.dart'; @@ -37,7 +38,6 @@ class PresentationContext { service = ServiceMocks(), repository = RepositoryMocks() { setup(); - addTearDown(dispose); } static const String serverEndpoint = 'http://localhost:3000'; @@ -75,6 +75,7 @@ class PresentationContext { await StoreService.I.put(StoreKey.serverEndpoint, serverEndpoint); _db = db; } + await SettingsRepository.ensureInitialized(_db!); return PresentationContext._(user: UserFactory.createDto()); } @@ -82,7 +83,8 @@ class PresentationContext { when(service.user.tryGetMyUser).thenReturn(currentUser); } - void dispose() { + Future dispose() async { + await SettingsRepository.reset(); service.resetAll(); } } From f1a90b7f36ad9f28c9c31f9d19fbd490a94f4cb4 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Mon, 3 Aug 2026 11:06:38 +0200 Subject: [PATCH 56/69] feat: log hint about downgrades when migration is missing (#30493) --- server/src/repositories/database.repository.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/src/repositories/database.repository.ts b/server/src/repositories/database.repository.ts index 3fc9fea2e3..1b5592d356 100644 --- a/server/src/repositories/database.repository.ts +++ b/server/src/repositories/database.repository.ts @@ -9,6 +9,7 @@ import semver from 'semver'; import { EXTENSION_NAMES, POSTGRES_VERSION_RANGE, + serverVersion, VECTOR_EXTENSIONS, VECTOR_INDEX_TABLES, VECTOR_VERSION_RANGE, @@ -382,6 +383,17 @@ export class DatabaseRepository { if (error) { this.logger.error(`Migrations failed: ${error}`); + + const missing = + error instanceof Error ? error.message.match(/previously executed migration (.+) is missing/u) : null; + if (missing) { + throw new Error( + `Migration "${missing[1]}" was already applied to this database but is not in this version of Immich (${serverVersion}). ` + + `This usually means the database was migrated by a newer version. Downgrades are not supported.`, + { cause: error }, + ); + } + throw error; } From b3718fd18a37d4cb82f2f20a1484c62ae0c80335 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:53:40 +0200 Subject: [PATCH 57/69] chore(deps): update dependency @testing-library/jest-dom to v7 (#30308) --- pnpm-lock.yaml | 16 ++++++++++------ web/package.json | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b5503526c1..44d920aaa9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -952,8 +952,8 @@ importers: specifier: ^4.2.4 version: 4.3.3(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0)) '@testing-library/jest-dom': - specifier: ^6.4.2 - version: 6.9.1 + specifier: ^7.0.0 + version: 7.0.0(@testing-library/dom@10.4.1) '@testing-library/svelte': specifier: ^5.2.8 version: 5.4.2(svelte@5.56.8(@typescript-eslint/types@8.65.0))(vite@8.1.5(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(tsx@4.23.1)(yaml@2.9.0))(vitest@4.1.10) @@ -4995,9 +4995,11 @@ packages: resolution: {integrity: sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==} engines: {node: '>=18'} - '@testing-library/jest-dom@6.9.1': - resolution: {integrity: sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==} - engines: {node: '>=14', npm: '>=6', yarn: '>=1'} + '@testing-library/jest-dom@7.0.0': + resolution: {integrity: sha512-HKAH9C6mBo5yBG6yRO5i43L2iisencAo5z+o5P/saHUoY+miC5ivXRxHBJcFyB5ypPNxHJdK3BoF/3O4DIptMg==} + engines: {node: '>=22', npm: '>=6', yarn: '>=1'} + peerDependencies: + '@testing-library/dom': '>=10 <11' '@testing-library/svelte-core@1.1.3': resolution: {integrity: sha512-KkMAvXeWorxN2Yn0kdC1lfoAItxpoj4uOWzxK5leDrNxonLvS5nwBFvztrroyTszQ0Wf/EU6iLT8JhY5qcn22g==} @@ -6805,6 +6807,7 @@ packages: cron-parser@4.9.0: resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} engines: {node: '>=12.0.0'} + deprecated: v4 is no longer maintained, upgrade to v5 cron@4.4.0: resolution: {integrity: sha512-fkdfq+b+AHI4cKdhZlppHveI/mgz2qpiYxcm+t5E5TsxX7QrLS1VE0+7GENEk9z0EeGPcpSciGv6ez24duWhwQ==} @@ -17751,9 +17754,10 @@ snapshots: picocolors: 1.1.1 pretty-format: 27.5.1 - '@testing-library/jest-dom@6.9.1': + '@testing-library/jest-dom@7.0.0(@testing-library/dom@10.4.1)': dependencies: '@adobe/css-tools': 4.5.0 + '@testing-library/dom': 10.4.1 aria-query: 5.3.1 css.escape: 1.5.1 dom-accessibility-api: 0.6.3 diff --git a/web/package.json b/web/package.json index aeaeb3ee20..338e2f5abe 100644 --- a/web/package.json +++ b/web/package.json @@ -80,7 +80,7 @@ "@sveltejs/kit": "^2.56.1", "@sveltejs/vite-plugin-svelte": "7.2.0", "@tailwindcss/vite": "^4.2.4", - "@testing-library/jest-dom": "^6.4.2", + "@testing-library/jest-dom": "^7.0.0", "@testing-library/svelte": "^5.2.8", "@testing-library/user-event": "^14.5.2", "@trivago/prettier-plugin-sort-imports": "^6.0.2", From fb4a08c17ae7480429339c3631913881fc9a264a Mon Sep 17 00:00:00 2001 From: Ben Beckford Date: Mon, 3 Aug 2026 02:55:40 -0700 Subject: [PATCH 58/69] chore(server): test assetFileFilter (#30430) --- .../workflow/workflow-core-plugin.spec.ts | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/server/test/medium/specs/workflow/workflow-core-plugin.spec.ts b/server/test/medium/specs/workflow/workflow-core-plugin.spec.ts index 1ad40ecca7..8bd65af73f 100644 --- a/server/test/medium/specs/workflow/workflow-core-plugin.spec.ts +++ b/server/test/medium/specs/workflow/workflow-core-plugin.spec.ts @@ -406,6 +406,101 @@ describe('core plugin', () => { }); }); + describe('assetFileFilter', () => { + it('should match assets case-insensitively', async () => { + const { user } = await ctx.newUser(); + const [{ asset: asset1 }, { asset: asset2 }] = await Promise.all([ + ctx.newAsset({ ownerId: user.id, originalFileName: 'exampleFile.png' }), + ctx.newAsset({ ownerId: user.id, originalFileName: 'anotherfile.jpg' }), + ]); + + const workflow = await createWorkflow({ + ownerId: user.id, + trigger: WorkflowTrigger.AssetCreate, + steps: [ + { + method: 'immich-plugin-core#assetFileFilter', + config: { matchType: 'contains', pattern: 'File' }, + }, + { + method: 'immich-plugin-core#assetFavorite', + }, + ], + }); + + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset1.id }), + ).resolves.toBeUndefined(); + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset2.id }), + ).resolves.toBeUndefined(); + await expect(ctx.get(AssetRepository).getById(asset1.id)).resolves.toMatchObject({ isFavorite: true }); + await expect(ctx.get(AssetRepository).getById(asset2.id)).resolves.toMatchObject({ isFavorite: true }); + }); + + it('should match assets by regex', async () => { + const { user } = await ctx.newUser(); + const [{ asset: asset1 }, { asset: asset2 }] = await Promise.all([ + ctx.newAsset({ ownerId: user.id, originalFileName: 'exampleFile.png' }), + ctx.newAsset({ ownerId: user.id, originalFileName: 'anotherfile.jpg' }), + ]); + + const workflow = await createWorkflow({ + ownerId: user.id, + trigger: WorkflowTrigger.AssetCreate, + steps: [ + { + method: 'immich-plugin-core#assetFileFilter', + config: { matchType: 'regex', pattern: '.+png' }, + }, + { + method: 'immich-plugin-core#assetFavorite', + }, + ], + }); + + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset1.id }), + ).resolves.toBeUndefined(); + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset2.id }), + ).resolves.toBeUndefined(); + await expect(ctx.get(AssetRepository).getById(asset1.id)).resolves.toMatchObject({ isFavorite: true }); + await expect(ctx.get(AssetRepository).getById(asset2.id)).resolves.toMatchObject({ isFavorite: false }); + }); + + it('should filter assets by path if specified', async () => { + const { user } = await ctx.newUser(); + const [{ asset: asset1 }, { asset: asset2 }] = await Promise.all([ + ctx.newAsset({ ownerId: user.id, originalPath: '/library/folder/file1.png' }), + ctx.newAsset({ ownerId: user.id, originalPath: '/library/file2.png' }), + ]); + + const workflow = await createWorkflow({ + ownerId: user.id, + trigger: WorkflowTrigger.AssetCreate, + steps: [ + { + method: 'immich-plugin-core#assetFileFilter', + config: { matchType: 'contains', pattern: 'folder', usePath: true }, + }, + { + method: 'immich-plugin-core#assetFavorite', + }, + ], + }); + + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset1.id }), + ).resolves.toBeUndefined(); + await expect( + ctx.sut.handleAssetTrigger({ workflowId: workflow.id, assetId: asset2.id }), + ).resolves.toBeUndefined(); + await expect(ctx.get(AssetRepository).getById(asset1.id)).resolves.toMatchObject({ isFavorite: true }); + await expect(ctx.get(AssetRepository).getById(asset2.id)).resolves.toMatchObject({ isFavorite: false }); + }); + }); + describe('assetTypeFilter', () => { it('should favorite asset if it is a video', async () => { const { user } = await ctx.newUser(); From 4082fbf232f98285484b48459db1fb39bc559d32 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 3 Aug 2026 20:28:18 +1000 Subject: [PATCH 59/69] fix(web): Fix face thumbnail when swapping merge direction (#30466) --- .../modals/PersonMergeSuggestionModal.svelte | 35 +++++++++++-------- .../[[assetId=id]]/FaceThumbnail.svelte | 5 ++- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/web/src/lib/modals/PersonMergeSuggestionModal.svelte b/web/src/lib/modals/PersonMergeSuggestionModal.svelte index 2f799c2939..94006ed5e7 100644 --- a/web/src/lib/modals/PersonMergeSuggestionModal.svelte +++ b/web/src/lib/modals/PersonMergeSuggestionModal.svelte @@ -63,13 +63,16 @@
{#if !choosePersonToMerge}
- + + {#key personToMerge.id} + + {/key}
@@ -101,14 +104,16 @@ } }} > - 0} - circle - shadow - url={getPeopleThumbnailUrl(personToBeMergedInto)} - altText={personToBeMergedInto.name} - widthStyle="100%" - /> + {#key personToBeMergedInto.id} + 0} + circle + shadow + url={getPeopleThumbnailUrl(personToBeMergedInto)} + altText={personToBeMergedInto.name} + widthStyle="100%" + /> + {/key} {:else}
diff --git a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/FaceThumbnail.svelte b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/FaceThumbnail.svelte index 4a594ddce1..8f2f82e9b5 100644 --- a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/FaceThumbnail.svelte +++ b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/FaceThumbnail.svelte @@ -40,7 +40,10 @@ class:dark:border-immich-dark-primary={border} class:border-immich-primary={border} > - + + {#key person.id} + + {/key}
Date: Mon, 3 Aug 2026 10:42:44 +0000 Subject: [PATCH 60/69] feat(web): search album description in add-to-album modal (#30462) Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> --- .../components/asset-viewer/AlbumListItem.svelte | 3 +++ .../album-selection/album-selection-utils.spec.ts | 13 +++++++++++++ .../album-selection/album-selection-utils.ts | 6 +++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/web/src/lib/components/asset-viewer/AlbumListItem.svelte b/web/src/lib/components/asset-viewer/AlbumListItem.svelte index af40deb27a..3d4be59a2c 100644 --- a/web/src/lib/components/asset-viewer/AlbumListItem.svelte +++ b/web/src/lib/components/asset-viewer/AlbumListItem.svelte @@ -40,6 +40,9 @@ const albumNameArray: string[] = $derived.by(() => { let { albumName } = album; let findIndex = normalizeSearchString(albumName).indexOf(normalizeSearchString(searchQuery)); + if (findIndex === -1) { + return [albumName, '', '']; + } let findLength = searchQuery.length; return [ albumName.slice(0, findIndex), diff --git a/web/src/lib/components/shared-components/album-selection/album-selection-utils.spec.ts b/web/src/lib/components/shared-components/album-selection/album-selection-utils.spec.ts index 669ce22f85..c7c3413b84 100644 --- a/web/src/lib/components/shared-components/album-selection/album-selection-utils.spec.ts +++ b/web/src/lib/components/shared-components/album-selection/album-selection-utils.spec.ts @@ -108,6 +108,19 @@ describe('Album Modal', () => { ]); }); + it('search matches on description as well as name', () => { + const converter = new AlbumModalRowConverter(AlbumSortBy.MostRecentPhoto, SortOrder.Desc); + const holidayAlbum = albumFactory.build({ albumName: 'Vacances 2019', description: 'Crete' }); + const constructionAlbum = albumFactory.build({ albumName: 'Construction' }); + const modalRows = converter.toModalRows('Crete', [], [holidayAlbum, constructionAlbum], -1, []); + + expect(modalRows).toStrictEqual([ + createNewAlbumRow(false), + createSectionRow('ALBUMS'), + createAlbumRow(holidayAlbum, false), + ]); + }); + it('selection can select new album row', () => { const converter = new AlbumModalRowConverter(AlbumSortBy.MostRecentPhoto, SortOrder.Desc); const holidayAlbum = albumFactory.build({ albumName: 'Holidays' }); diff --git a/web/src/lib/components/shared-components/album-selection/album-selection-utils.ts b/web/src/lib/components/shared-components/album-selection/album-selection-utils.ts index ad96b27c06..5d4e46a063 100644 --- a/web/src/lib/components/shared-components/album-selection/album-selection-utils.ts +++ b/web/src/lib/components/shared-components/album-selection/album-selection-utils.ts @@ -46,10 +46,14 @@ export class AlbumModalRowConverter { const recentAlbumsToShow = search.length === 0 ? recentAlbums : []; const rows: AlbumModalRow[] = [{ type: AlbumModalRowType.NEW_ALBUM, selected: selectedRowIndex === 0 }]; + const normalizedSearch = normalizeSearchString(search); const filteredAlbums = sortAlbums( search.length > 0 && albums.length > 0 ? albums.filter((album) => { - return normalizeSearchString(album.albumName).includes(normalizeSearchString(search)); + return ( + normalizeSearchString(album.albumName).includes(normalizedSearch) || + normalizeSearchString(album.description).includes(normalizedSearch) + ); }) : albums, { sortBy: this.sortBy, orderBy: this.orderBy }, From 04453b72060bdcd0659d784a5c0c5eaf21be984b Mon Sep 17 00:00:00 2001 From: Gueye Papa Djadji Date: Mon, 3 Aug 2026 10:56:00 +0000 Subject: [PATCH 61/69] fix(server): reject invalid or deleted user when creating a partner (#30431) --- server/src/services/partner.service.spec.ts | 14 ++++++++++++++ server/src/services/partner.service.ts | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/server/src/services/partner.service.spec.ts b/server/src/services/partner.service.spec.ts index 029462a865..b947f3795a 100644 --- a/server/src/services/partner.service.spec.ts +++ b/server/src/services/partner.service.spec.ts @@ -54,6 +54,7 @@ describe(PartnerService.name, () => { const auth = AuthFactory.create({ id: user1.id }); mocks.partner.get.mockResolvedValue(void 0); + mocks.user.get.mockResolvedValue(user2); mocks.partner.create.mockResolvedValue(getForPartner(partner)); await expect(sut.create(auth, { sharedWithId: user2.id })).resolves.toBeDefined(); @@ -76,6 +77,19 @@ describe(PartnerService.name, () => { expect(mocks.partner.create).not.toHaveBeenCalled(); }); + + it('should throw an error when sharedWithId does not resolve to an existing (non-deleted) user', async () => { + const user1 = UserFactory.create(); + const user2 = UserFactory.create(); + const auth = AuthFactory.create({ id: user1.id }); + + mocks.partner.get.mockResolvedValue(void 0); + mocks.user.get.mockResolvedValue(void 0); + + await expect(sut.create(auth, { sharedWithId: user2.id })).rejects.toBeInstanceOf(BadRequestException); + + expect(mocks.partner.create).not.toHaveBeenCalled(); + }); }); describe('remove', () => { diff --git a/server/src/services/partner.service.ts b/server/src/services/partner.service.ts index cc950edb5b..26d7701077 100644 --- a/server/src/services/partner.service.ts +++ b/server/src/services/partner.service.ts @@ -16,6 +16,12 @@ export class PartnerService extends BaseService { throw new BadRequestException(`Partner already exists`); } + const user = await this.userRepository.get(sharedWithId, {}); + if (!user) { + this.logger.debug('Partner creation failed: user not found'); + throw new BadRequestException('Invalid user'); + } + const partner = await this.partnerRepository.create(partnerId); return this.mapPartner(partner, PartnerDirection.SharedBy); } From 089486535295309982988d8c52fe00678d17540d Mon Sep 17 00:00:00 2001 From: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> Date: Mon, 3 Aug 2026 13:38:09 +0200 Subject: [PATCH 62/69] chore: typescript 7 extension for vscode (#30516) --- .vscode/extensions.json | 4 +++- .vscode/settings.json | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 399fedae33..782e0192f6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -12,6 +12,8 @@ "editorconfig.editorconfig", "foxundermoon.shell-format", "timonwong.shellcheck", - "bluebrown.yamlfmt" + "bluebrown.yamlfmt", + // TODO TS 7 while it's still in preview + "typescriptteam.native-preview" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 30dac3216e..23d4385964 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -60,6 +60,8 @@ "**/dist/**": true, "**/node_modules/**": true }, + // TODO remove once the ts7 extension is stable + "js/ts.experimental.useTsgo": true, "js/ts.preferences.importModuleSpecifier": "non-relative", "search.exclude": { "**/.svelte-kit": true, From cee08a2320dbddb563a7fa8cca7979e4c954edb0 Mon Sep 17 00:00:00 2001 From: Santo Shakil Date: Mon, 3 Aug 2026 18:59:05 +0600 Subject: [PATCH 63/69] fix(server): remove the asset row when an upload fails after creating it (#30349) --- server/src/services/asset-media.service.spec.ts | 6 ++++++ server/src/services/asset-media.service.ts | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/server/src/services/asset-media.service.spec.ts b/server/src/services/asset-media.service.spec.ts index 5a9a85f179..14527debba 100644 --- a/server/src/services/asset-media.service.spec.ts +++ b/server/src/services/asset-media.service.spec.ts @@ -317,6 +317,12 @@ describe(AssetMediaService.name, () => { ).rejects.toBeInstanceOf(BadRequestException); expect(mocks.asset.create).not.toHaveBeenCalled(); + expect(mocks.asset.remove).not.toHaveBeenCalled(); + expect(mocks.job.queue).toHaveBeenCalledWith({ + name: JobName.FileDelete, + data: { files: [file.originalPath, undefined] }, + }); + expect(mocks.event.emit).not.toHaveBeenCalled(); expect(mocks.user.updateUsage).not.toHaveBeenCalledWith(authStub.user1.user.id, file.size); expect(mocks.storage.utimes).not.toHaveBeenCalledWith( file.originalPath, diff --git a/server/src/services/asset-media.service.ts b/server/src/services/asset-media.service.ts index 818bd5eb91..1bb9d1e5b6 100644 --- a/server/src/services/asset-media.service.ts +++ b/server/src/services/asset-media.service.ts @@ -1,7 +1,7 @@ import { BadRequestException, Injectable, InternalServerErrorException, NotFoundException } from '@nestjs/common'; import sanitize from 'sanitize-filename'; import { StorageCore } from 'src/cores/storage.core'; -import { AuthSharedLink } from 'src/database'; +import { Asset, AuthSharedLink } from 'src/database'; import { AssetBulkUploadCheckResponseDto, AssetMediaResponseDto, @@ -128,6 +128,7 @@ export class AssetMediaService extends BaseService { file: UploadFile, sidecarFile?: UploadFile, ): Promise { + let asset: Asset | undefined; try { await this.requireAccess({ auth, @@ -145,7 +146,7 @@ export class AssetMediaService extends BaseService { ); } - const asset = await this.assetRepository.create({ + asset = await this.assetRepository.create({ ownerId: auth.user.id, libraryId: null, @@ -215,6 +216,11 @@ export class AssetMediaService extends BaseService { return { status: AssetMediaStatus.DUPLICATE, id: duplicateId }; } + // clean up the asset row if one was created + if (asset) { + await this.assetRepository.remove({ id: asset.id }); + } + this.logger.error(`Error uploading file ${error}`, error?.stack); throw error; } From 774a9fd86845053c3bac682489517cd7e88c8d12 Mon Sep 17 00:00:00 2001 From: Azharul Haque <13651113+DrHaque@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:30:15 -0400 Subject: [PATCH 64/69] fix(mobile): correct mislabeled Bengali locale entry (#30519) Fixes mislabeled locale entry: 'Bosnian (bl)': Locale('bn') actually loads Bengali, not Bosnian. --- mobile/lib/constants/locales.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/lib/constants/locales.dart b/mobile/lib/constants/locales.dart index d689e6cc1e..429a3718da 100644 --- a/mobile/lib/constants/locales.dart +++ b/mobile/lib/constants/locales.dart @@ -7,7 +7,7 @@ const Map locales = { 'Arabic (ar)': Locale('ar'), 'Basque (eu)': Locale('eu'), 'Belarusian (be)': Locale('be'), - 'Bosnian (bl)': Locale('bn'), + 'Bengali (bn)': Locale('bn'), 'Brazilian Portuguese (pt_BR)': Locale('pt', 'BR'), 'Bulgarian (bg)': Locale('bg'), 'Catalan (ca)': Locale('ca'), From c2db36934f0586af32df0273b36fcb37078cd075 Mon Sep 17 00:00:00 2001 From: Adrien Fabre Date: Mon, 3 Aug 2026 16:00:04 +0200 Subject: [PATCH 65/69] feat: Display the number of selected items in AlbumPickerModal title (#30485) --- i18n/en.json | 1 + .../lib/components/SchemaAlbumPicker.svelte | 2 +- web/src/lib/modals/AlbumPickerModal.spec.ts | 58 +++++++++++++++++++ web/src/lib/modals/AlbumPickerModal.svelte | 11 +++- .../lib/modals/AssetAddToAlbumModal.svelte | 2 +- 5 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 web/src/lib/modals/AlbumPickerModal.spec.ts diff --git a/i18n/en.json b/i18n/en.json index 1dbd50e294..857265f004 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -30,6 +30,7 @@ "add_to_album_bottom_sheet_added": "Added to {album}", "add_to_album_bottom_sheet_already_exists": "Already in {album}", "add_to_album_bottom_sheet_some_local_assets": "Some local assets could not be added to album", + "add_to_album_item_count": "Add {count, plural, one {# item} other {# items}} to album", "add_to_albums": "Add to albums", "add_to_albums_count": "Add to albums ({count})", "add_to_bottom_bar": "Add to", diff --git a/web/src/lib/components/SchemaAlbumPicker.svelte b/web/src/lib/components/SchemaAlbumPicker.svelte index b7eb9dd7dd..e4eb271a3d 100644 --- a/web/src/lib/components/SchemaAlbumPicker.svelte +++ b/web/src/lib/components/SchemaAlbumPicker.svelte @@ -14,7 +14,7 @@ let { array, label, description, albumIds = $bindable([]) }: Props = $props(); const onAlbums = async () => { - const albums = await modalManager.show(AlbumPickerModal); + const albums = await modalManager.show(AlbumPickerModal, {}); if (!albums || albums.length === 0) { return; } diff --git a/web/src/lib/modals/AlbumPickerModal.spec.ts b/web/src/lib/modals/AlbumPickerModal.spec.ts new file mode 100644 index 0000000000..4245f3e17f --- /dev/null +++ b/web/src/lib/modals/AlbumPickerModal.spec.ts @@ -0,0 +1,58 @@ +import { render, screen, waitFor } from '@testing-library/svelte'; +import { init, register, waitLocale } from 'svelte-i18n'; +import { getAnimateMock } from '$lib/__mocks__/animate.mock'; +import { getIntersectionObserverMock } from '$lib/__mocks__/intersection-observer.mock'; +import { sdkMock } from '$lib/__mocks__/sdk.mock'; +import { getVisualViewportMock } from '$lib/__mocks__/visual-viewport.mock'; +import AlbumPickerModal from './AlbumPickerModal.svelte'; + +describe('AlbumPickerModal component', () => { + const onClose = vi.fn(); + + beforeAll(async () => { + await init({ fallbackLocale: 'en-US' }); + register('en-US', () => import('$i18n/en.json')); + await waitLocale('en-US'); + }); + + beforeEach(() => { + vi.stubGlobal('IntersectionObserver', getIntersectionObserverMock()); + vi.stubGlobal('visualViewport', getVisualViewportMock()); + vi.resetAllMocks(); + Element.prototype.animate = getAnimateMock(); + }); + + afterAll(async () => { + await waitFor(() => { + expect(document.body.style.pointerEvents).not.toBe('none'); + }); + }); + + it('shows the singular selection count title when selectedItemsCount is 1', async () => { + // Called by onMount() + sdkMock.getAllAlbums.mockResolvedValueOnce([]); + + render(AlbumPickerModal, { props: { onClose, selectedItemsCount: 1 } }); + + expect(await screen.findByText('Add 1 item to album')).toBeInTheDocument(); + expect(screen.queryByText('Select albums')).not.toBeInTheDocument(); + }); + + it('shows the plural selection count title when selectedItemsCount is greater than 1', async () => { + sdkMock.getAllAlbums.mockResolvedValueOnce([]); + + render(AlbumPickerModal, { props: { onClose, selectedItemsCount: 3 } }); + + expect(await screen.findByText('Add 3 items to album')).toBeInTheDocument(); + expect(screen.queryByText('Select albums')).not.toBeInTheDocument(); + }); + + it('shows the generic title when selectedItemsCount is not provided', async () => { + sdkMock.getAllAlbums.mockResolvedValueOnce([]); + + render(AlbumPickerModal, { props: { onClose } }); + + expect(await screen.findByText('Select albums')).toBeInTheDocument(); + expect(screen.queryByText('Add 1 item to album')).not.toBeInTheDocument(); + }); +}); diff --git a/web/src/lib/modals/AlbumPickerModal.svelte b/web/src/lib/modals/AlbumPickerModal.svelte index 561deeac23..19430e271c 100644 --- a/web/src/lib/modals/AlbumPickerModal.svelte +++ b/web/src/lib/modals/AlbumPickerModal.svelte @@ -23,9 +23,10 @@ type Props = { onClose: (albums?: AlbumResponseDto[]) => void; + selectedItemsCount?: number; }; - let { onClose }: Props = $props(); + let { onClose, selectedItemsCount }: Props = $props(); onMount(async () => { albums = await getAllAlbums({}); @@ -147,9 +148,15 @@ } } }; + + const title = $derived( + selectedItemsCount === undefined + ? $t('select_albums') + : $t('add_to_album_item_count', { values: { count: selectedItemsCount } }), + ); - +
{#if loading} diff --git a/web/src/lib/modals/AssetAddToAlbumModal.svelte b/web/src/lib/modals/AssetAddToAlbumModal.svelte index b35c125d08..7259dd8245 100644 --- a/web/src/lib/modals/AssetAddToAlbumModal.svelte +++ b/web/src/lib/modals/AssetAddToAlbumModal.svelte @@ -24,4 +24,4 @@ }; - + From 4d9a27691ee00de3e519a47e1906f6e906bfbde4 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Mon, 3 Aug 2026 19:53:12 +0530 Subject: [PATCH 66/69] fix: action provider overrides (#30480) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- mobile/lib/presentation/actions/action.dart | 4 +++- .../presentation/actions/archive.action.dart | 2 +- .../presentation/actions/delete.action.dart | 4 ++-- .../presentation/actions/download.action.dart | 2 +- .../actions/edit_asset.action.dart | 2 +- .../actions/edit_datetime.action.dart | 2 +- .../actions/edit_location.action.dart | 2 +- .../presentation/actions/favorite.action.dart | 2 +- .../lib/presentation/actions/lock.action.dart | 2 +- .../actions/remove_from_album.action.dart | 2 +- .../presentation/actions/restore.action.dart | 2 +- .../actions/set_album_cover.action.dart | 2 +- .../presentation/actions/share.action.dart | 2 +- .../actions/share_link.action.dart | 2 +- .../presentation/actions/stack.action.dart | 2 +- .../lib/presentation/actions/tag.action.dart | 2 +- .../presentation/actions/upload.action.dart | 2 +- .../presentation/presentation_context.dart | 19 +++++++++++-------- 18 files changed, 31 insertions(+), 26 deletions(-) diff --git a/mobile/lib/presentation/actions/action.dart b/mobile/lib/presentation/actions/action.dart index 072c2524be..d880b7ddf7 100644 --- a/mobile/lib/presentation/actions/action.dart +++ b/mobile/lib/presentation/actions/action.dart @@ -33,6 +33,7 @@ final assetsActionProvider = Provider.family.autoDispose, null => const {}, }, }), + dependencies: [multiSelectProvider], ); final clearSelectionProvider = Provider.family.autoDispose((ref, source) { @@ -41,10 +42,11 @@ final clearSelectionProvider = Provider.family.autoDispose, ActionSource>( (ref, source) => ref.watch(assetsActionProvider(source)).owned(ref.watch(authUserProvider).id), + dependencies: [assetsActionProvider], ); abstract class AssetActionBuilder extends ActionBuilder { diff --git a/mobile/lib/presentation/actions/archive.action.dart b/mobile/lib/presentation/actions/archive.action.dart index f04611c4c0..f8e4a1e038 100644 --- a/mobile/lib/presentation/actions/archive.action.dart +++ b/mobile/lib/presentation/actions/archive.action.dart @@ -22,7 +22,7 @@ final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, .map((asset) => asset.id) .toList(growable: false); return assetIds.isEmpty ? null : (shouldArchive: shouldArchive, assetIds: assetIds); -}); +}, dependencies: [ownedAssetsActionProvider]); class ArchiveAction extends AssetActionBuilder { const ArchiveAction({required super.source}); diff --git a/mobile/lib/presentation/actions/delete.action.dart b/mobile/lib/presentation/actions/delete.action.dart index 0fe297bd03..31d01b32ef 100644 --- a/mobile/lib/presentation/actions/delete.action.dart +++ b/mobile/lib/presentation/actions/delete.action.dart @@ -40,7 +40,7 @@ final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, final trash = trashEnabled && !ownedRemote.every((asset) => asset.isTrashed || asset.isLocked); return (localIds: localIds, remoteIds: ownedRemote.map((asset) => asset.id).toList(growable: false), trash: trash); -}); +}, dependencies: [assetsActionProvider]); class DeleteAction extends AssetActionBuilder { const DeleteAction({required super.source}); @@ -149,7 +149,7 @@ final _cleanupStateProvider = Provider.family.autoDispose?, ActionS final assets = ref.watch(assetsActionProvider(source)); final assetIds = assets.backedUp().map((asset) => asset.localId).nonNulls.toList(growable: false); return assetIds.isEmpty ? null : assetIds; -}); +}, dependencies: [assetsActionProvider]); class CleanupLocalAction extends AssetActionBuilder { const CleanupLocalAction({required super.source}); diff --git a/mobile/lib/presentation/actions/download.action.dart b/mobile/lib/presentation/actions/download.action.dart index 1303fa6b03..60a1395bcd 100644 --- a/mobile/lib/presentation/actions/download.action.dart +++ b/mobile/lib/presentation/actions/download.action.dart @@ -14,7 +14,7 @@ final _stateProvider = Provider.family.autoDispose?, ActionSou final assets = ref.watch(assetsActionProvider(source)); final remote = assets.remote().toList(growable: false); return remote.isEmpty ? null : remote; -}); +}, dependencies: [assetsActionProvider]); class DownloadAction extends AssetActionBuilder { const DownloadAction({required super.source}); diff --git a/mobile/lib/presentation/actions/edit_asset.action.dart b/mobile/lib/presentation/actions/edit_asset.action.dart index d0a7e73122..9b11032df9 100644 --- a/mobile/lib/presentation/actions/edit_asset.action.dart +++ b/mobile/lib/presentation/actions/edit_asset.action.dart @@ -28,7 +28,7 @@ final _stateProvider = Provider.family.autoDispose(( final assets = ref.watch(ownedAssetsActionProvider(source)); return assets.where((asset) => asset.isEditable).singleOrNull; -}); +}, dependencies: [ownedAssetsActionProvider]); class EditAssetAction extends AssetActionBuilder { const EditAssetAction({required super.source}); diff --git a/mobile/lib/presentation/actions/edit_datetime.action.dart b/mobile/lib/presentation/actions/edit_datetime.action.dart index a3c825c4db..31de23d1a7 100644 --- a/mobile/lib/presentation/actions/edit_datetime.action.dart +++ b/mobile/lib/presentation/actions/edit_datetime.action.dart @@ -21,7 +21,7 @@ final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, } return (assetIds: assets.map((asset) => asset.id).toList(growable: false), origin: assets.singleOrNull); -}); +}, dependencies: [ownedAssetsActionProvider]); class EditDateTimeAction extends AssetActionBuilder { const EditDateTimeAction({required super.source}); diff --git a/mobile/lib/presentation/actions/edit_location.action.dart b/mobile/lib/presentation/actions/edit_location.action.dart index f83a98099c..5ce74a0f40 100644 --- a/mobile/lib/presentation/actions/edit_location.action.dart +++ b/mobile/lib/presentation/actions/edit_location.action.dart @@ -21,7 +21,7 @@ final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, } return (assetIds: assets.map((asset) => asset.id).toList(growable: false), origin: assets.singleOrNull); -}); +}, dependencies: [ownedAssetsActionProvider]); class EditLocationAction extends AssetActionBuilder { const EditLocationAction({required super.source}); diff --git a/mobile/lib/presentation/actions/favorite.action.dart b/mobile/lib/presentation/actions/favorite.action.dart index 17c841b745..402d2f3833 100644 --- a/mobile/lib/presentation/actions/favorite.action.dart +++ b/mobile/lib/presentation/actions/favorite.action.dart @@ -18,7 +18,7 @@ final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, final shouldFavorite = assets.favorite(isFavorite: false).isNotEmpty; final assetIds = assets.favorite(isFavorite: !shouldFavorite).map((asset) => asset.id).toList(growable: false); return (shouldFavorite: shouldFavorite, assetIds: assetIds); -}); +}, dependencies: [ownedAssetsActionProvider]); class FavoriteAction extends AssetActionBuilder { const FavoriteAction({required super.source}); diff --git a/mobile/lib/presentation/actions/lock.action.dart b/mobile/lib/presentation/actions/lock.action.dart index b7fd01ad18..3d090b712d 100644 --- a/mobile/lib/presentation/actions/lock.action.dart +++ b/mobile/lib/presentation/actions/lock.action.dart @@ -23,7 +23,7 @@ final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, // Only locking has an on-device copy to clean up; unlocking leaves the device alone. localIds: shouldLock ? targets.map((asset) => asset.localId).nonNulls.toList(growable: false) : const [], ); -}); +}, dependencies: [ownedAssetsActionProvider]); class LockAction extends AssetActionBuilder { const LockAction({required super.source}); diff --git a/mobile/lib/presentation/actions/remove_from_album.action.dart b/mobile/lib/presentation/actions/remove_from_album.action.dart index 3d648a9cfd..9e2d9d582f 100644 --- a/mobile/lib/presentation/actions/remove_from_album.action.dart +++ b/mobile/lib/presentation/actions/remove_from_album.action.dart @@ -11,7 +11,7 @@ final _stateProvider = Provider.family.autoDispose?, ActionSource>( final assets = ref.watch(assetsActionProvider(source)); final assetIds = assets.remote().map((asset) => asset.id).toList(growable: false); return assetIds.isEmpty ? null : assetIds; -}); +}, dependencies: [assetsActionProvider]); class RemoveFromAlbumAction extends AssetActionBuilder { final String albumId; diff --git a/mobile/lib/presentation/actions/restore.action.dart b/mobile/lib/presentation/actions/restore.action.dart index 0a2f34abf8..0a1b707b39 100644 --- a/mobile/lib/presentation/actions/restore.action.dart +++ b/mobile/lib/presentation/actions/restore.action.dart @@ -11,7 +11,7 @@ final _stateProvider = Provider.family.autoDispose?, ActionSource>( final assets = ref.watch(ownedAssetsActionProvider(source)); final assetIds = assets.trashed().map((asset) => asset.id).toList(growable: false); return assetIds.isEmpty ? null : assetIds; -}); +}, dependencies: [ownedAssetsActionProvider]); class RestoreAction extends AssetActionBuilder { const RestoreAction({required super.source}); diff --git a/mobile/lib/presentation/actions/set_album_cover.action.dart b/mobile/lib/presentation/actions/set_album_cover.action.dart index 0c16c9a9db..d5ad367eed 100644 --- a/mobile/lib/presentation/actions/set_album_cover.action.dart +++ b/mobile/lib/presentation/actions/set_album_cover.action.dart @@ -11,7 +11,7 @@ import 'package:immich_mobile/utils/error_handler.dart'; final _stateProvider = Provider.family.autoDispose((ref, source) { final assets = ref.watch(assetsActionProvider(source)); return assets.remote().map((asset) => asset.id).singleOrNull; -}); +}, dependencies: [assetsActionProvider]); class SetAlbumCoverAction extends AssetActionBuilder { final String albumId; diff --git a/mobile/lib/presentation/actions/share.action.dart b/mobile/lib/presentation/actions/share.action.dart index 4c36493265..3b8a6318de 100644 --- a/mobile/lib/presentation/actions/share.action.dart +++ b/mobile/lib/presentation/actions/share.action.dart @@ -16,7 +16,7 @@ final _stateProvider = Provider.family.autoDispose?, ActionSourc final assets = ref.watch(assetsActionProvider(source)); final shareable = assets.toList(growable: false); return shareable.isEmpty ? null : shareable; -}); +}, dependencies: [assetsActionProvider]); class ShareAction extends AssetActionBuilder { const ShareAction({required super.source}); diff --git a/mobile/lib/presentation/actions/share_link.action.dart b/mobile/lib/presentation/actions/share_link.action.dart index 1966dd8811..4285105ed3 100644 --- a/mobile/lib/presentation/actions/share_link.action.dart +++ b/mobile/lib/presentation/actions/share_link.action.dart @@ -12,7 +12,7 @@ final _stateProvider = Provider.family.autoDispose?, ActionSource>( final assets = ref.watch(assetsActionProvider(source)); final remoteIds = assets.remote().map((asset) => asset.id).toList(growable: false); return remoteIds.isEmpty ? null : remoteIds; -}); +}, dependencies: [assetsActionProvider]); class ShareLinkAction extends AssetActionBuilder { const ShareLinkAction({required super.source}); diff --git a/mobile/lib/presentation/actions/stack.action.dart b/mobile/lib/presentation/actions/stack.action.dart index 9697dc02be..5ab978a7e4 100644 --- a/mobile/lib/presentation/actions/stack.action.dart +++ b/mobile/lib/presentation/actions/stack.action.dart @@ -23,7 +23,7 @@ final _stateProvider = Provider.family.autoDispose<_State?, ActionSource>((ref, assetIds: assets.map((asset) => asset.id).toList(growable: false), stackIds: assets.map((asset) => asset.stackId).nonNulls.toList(growable: false), ); -}); +}, dependencies: [ownedAssetsActionProvider]); class StackAction extends AssetActionBuilder { const StackAction({required super.source}); diff --git a/mobile/lib/presentation/actions/tag.action.dart b/mobile/lib/presentation/actions/tag.action.dart index 749b23d150..978648708f 100644 --- a/mobile/lib/presentation/actions/tag.action.dart +++ b/mobile/lib/presentation/actions/tag.action.dart @@ -21,7 +21,7 @@ final _stateProvider = Provider.family.autoDispose?, ActionSource>( final assets = ref.watch(ownedAssetsActionProvider(source)); final assetIds = assets.map((asset) => asset.id).toList(growable: false); return assetIds.isEmpty ? null : assetIds; -}); +}, dependencies: [ownedAssetsActionProvider]); class TagAction extends AssetActionBuilder { const TagAction({required super.source}); diff --git a/mobile/lib/presentation/actions/upload.action.dart b/mobile/lib/presentation/actions/upload.action.dart index ceb35c8786..e52659beb7 100644 --- a/mobile/lib/presentation/actions/upload.action.dart +++ b/mobile/lib/presentation/actions/upload.action.dart @@ -16,7 +16,7 @@ final _stateProvider = Provider.family.autoDispose?, ActionSour final assets = ref.watch(assetsActionProvider(source)); final local = assets.backedUp(isBackedUp: false).local().toList(growable: false); return local.isEmpty ? null : local; -}); +}, dependencies: [assetsActionProvider]); class UploadAction extends AssetActionBuilder { final bool showProgress; diff --git a/mobile/test/unit/presentation/presentation_context.dart b/mobile/test/unit/presentation/presentation_context.dart index 5b23890ef8..36ae8d087d 100644 --- a/mobile/test/unit/presentation/presentation_context.dart +++ b/mobile/test/unit/presentation/presentation_context.dart @@ -101,15 +101,18 @@ extension PumpPresentationWidget on WidgetTester { useFallbackTranslations: true, assetLoader: const CodegenLoader(), child: ProviderScope( - overrides: [...context.overrides, ...overrides], + overrides: context.overrides, child: Builder( - builder: (context) => MaterialApp( - debugShowCheckedModeBanner: false, - scaffoldMessengerKey: scaffoldMessengerKey, - localizationsDelegates: context.localizationDelegates, - supportedLocales: context.supportedLocales, - locale: context.locale, - home: Scaffold(body: widget), + builder: (context) => ProviderScope( + overrides: overrides, + child: MaterialApp( + debugShowCheckedModeBanner: false, + scaffoldMessengerKey: scaffoldMessengerKey, + localizationsDelegates: context.localizationDelegates, + supportedLocales: context.supportedLocales, + locale: context.locale, + home: Scaffold(body: widget), + ), ), ), ), From e5c3bdad17da1c70bc59d2d09398f8b35d820746 Mon Sep 17 00:00:00 2001 From: Santo Shakil Date: Mon, 3 Aug 2026 20:23:29 +0600 Subject: [PATCH 67/69] fix(mobile): sync stack changes from the websocket (#30479) --- mobile/lib/providers/websocket.provider.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mobile/lib/providers/websocket.provider.dart b/mobile/lib/providers/websocket.provider.dart index 2eb8ddc2b4..c6ed09360a 100644 --- a/mobile/lib/providers/websocket.provider.dart +++ b/mobile/lib/providers/websocket.provider.dart @@ -103,7 +103,8 @@ class WebsocketNotifier extends StateNotifier { socket.on('AssetUploadReadyV2', _handleSyncAssetUploadReadyV2); socket.on('AssetEditReadyV1', _handleSyncAssetEditReadyV1); socket.on('AssetEditReadyV2', _handleSyncAssetEditReadyV2); - socket.on('on_album_update', _handleAlbumUpdate); + socket.on('on_album_update', _handleRemoteChange); + socket.on('on_asset_stack_update', _handleRemoteChange); socket.on('on_config_update', _handleOnConfigUpdate); socket.on('on_new_release', _handleReleaseUpdates); } catch (e) { @@ -185,7 +186,7 @@ class WebsocketNotifier extends StateNotifier { unawaited(_ref.read(backgroundSyncProvider).syncWebsocketEditV1(data)); } - void _handleAlbumUpdate(dynamic _) { + void _handleRemoteChange(dynamic _) { unawaited(_ref.read(backgroundSyncProvider).syncRemote()); } From 46c42e0935bb5eab65e395478623eb65f097df2b Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Mon, 3 Aug 2026 16:50:28 +0200 Subject: [PATCH 68/69] chore: delete mergify config (#30521) --- .mergify.yml | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml deleted file mode 100644 index 12f3ef6715..0000000000 --- a/.mergify.yml +++ /dev/null @@ -1,7 +0,0 @@ -merge_queue: - status_comments: outcomes - -queue_rules: - - name: default - batch_size: 3 - batch_max_wait_time: 2 min From 0d7147dceca9290c5f8b4fe8b3e3b138aac2afc2 Mon Sep 17 00:00:00 2001 From: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> Date: Mon, 3 Aug 2026 18:18:24 +0200 Subject: [PATCH 69/69] fix: metadata extraction as LensModel can be a float (#30512) --- .../src/repositories/metadata.repository.ts | 6 +++++- server/src/services/metadata.service.ts | 4 +++- .../specs/services/metadata.service.spec.ts | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/server/src/repositories/metadata.repository.ts b/server/src/repositories/metadata.repository.ts index 94047bf326..1d504f6c71 100644 --- a/server/src/repositories/metadata.repository.ts +++ b/server/src/repositories/metadata.repository.ts @@ -20,7 +20,8 @@ type TagsWithWrongTypes = | 'TagsList' | 'Keywords' | 'HierarchicalSubject' - | 'ISO'; + | 'ISO' + | 'LensModel'; export interface ImmichTags extends Omit { ContentIdentifier?: string; @@ -43,6 +44,9 @@ export interface ImmichTags extends Omit { Description?: StringOrNumber; ImageDescription?: StringOrNumber; + // Apparently LensModel can also be a float: https://github.com/immich-app/immich/issues/30492 + LensModel?: StringOrNumber; + // Extended properties for image regions, such as faces RegionInfo?: { AppliedToDimensions: { diff --git a/server/src/services/metadata.service.ts b/server/src/services/metadata.service.ts index 171dcfe514..37dd92e27d 100644 --- a/server/src/services/metadata.service.ts +++ b/server/src/services/metadata.service.ts @@ -117,7 +117,9 @@ const validateRange = (value: number | undefined, min: number, max: number): Non }; const getLensModel = (exifTags: ImmichTags): string | null => { - const lensModel = (exifTags.LensID ?? exifTags.LensType ?? exifTags.LensSpec ?? exifTags.LensModel ?? '').trim(); + const lensModel = String( + exifTags.LensID ?? exifTags.LensType ?? exifTags.LensSpec ?? exifTags.LensModel ?? '', + ).trim(); if (lensModel === '----') { return null; } diff --git a/server/test/medium/specs/services/metadata.service.spec.ts b/server/test/medium/specs/services/metadata.service.spec.ts index 6dc66e3ed5..37603520f7 100644 --- a/server/test/medium/specs/services/metadata.service.spec.ts +++ b/server/test/medium/specs/services/metadata.service.spec.ts @@ -152,4 +152,23 @@ describe(MetadataService.name, () => { ).resolves.toEqual({ dateTimeOriginal: new Date('4260-03-05T04:04:12.000Z') }); }); }); + + it('should handle float lens models (#30492)', async () => { + const { sut, ctx } = setup(); + ctx.getMock(EventRepository).emit.mockResolvedValue(); + const { filePath } = await createTestFile({ LensModel: 1.8 }); + const { user } = await ctx.newUser(); + const { asset } = await ctx.newAsset({ originalPath: filePath, ownerId: user.id }); + await ctx.newExif({ assetId: asset.id, description: '' }); + + await sut.handleMetadataExtraction({ id: asset.id }); + + await expect( + ctx.database + .selectFrom('asset_exif') + .where('assetId', '=', asset.id) + .select('lensModel') + .executeTakeFirstOrThrow(), + ).resolves.toEqual({ lensModel: '1.8' }); + }); });